-
-
Notifications
You must be signed in to change notification settings - Fork 267
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
49 changed files
with
1,802 additions
and
172 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
using System.Reflection; | ||
|
||
[assembly: AssemblyProduct("SMAPI")] | ||
[assembly: AssemblyVersion("2.5.4")] | ||
[assembly: AssemblyFileVersion("2.5.4")] | ||
[assembly: AssemblyVersion("2.5.5")] | ||
[assembly: AssemblyFileVersion("2.5.5")] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<!-- | ||
This build task is run from the ModBuildConfig project after it's been compiled, and copies the | ||
package files to the bin\Pathoschild.Stardew.ModBuildConfig folder. | ||
--> | ||
<Target Name="AfterBuild"> | ||
<PropertyGroup> | ||
<PackagePath>$(SolutionDir)\..\bin\Pathoschild.Stardew.ModBuildConfig</PackagePath> | ||
</PropertyGroup> | ||
<RemoveDir Directories="$(PackagePath)" /> | ||
<Copy SourceFiles="$(ProjectDir)/package.nuspec" DestinationFolder="$(PackagePath)" /> | ||
<Copy SourceFiles="$(ProjectDir)/build/smapi.targets" DestinationFiles="$(PackagePath)/build/Pathoschild.Stardew.ModBuildConfig.targets" /> | ||
<Copy SourceFiles="$(TargetDir)/StardewModdingAPI.ModBuildConfig.dll" DestinationFiles="$(PackagePath)/build/StardewModdingAPI.ModBuildConfig.dll" /> | ||
<Copy SourceFiles="$(SolutionDir)/SMAPI.ModBuildConfig.Analyzer/bin/netstandard1.3/StardewModdingAPI.ModBuildConfig.Analyzer.dll" DestinationFiles="$(PackagePath)/analyzers/dotnet/cs/StardewModdingAPI.ModBuildConfig.Analyzer.dll" /> | ||
<Copy SourceFiles="$(SolutionDir)/SMAPI.ModBuildConfig.Analyzer/tools/install.ps1" DestinationFiles="$(PackagePath)/tools/install.ps1" /> | ||
<Copy SourceFiles="$(SolutionDir)/SMAPI.ModBuildConfig.Analyzer/tools/uninstall.ps1" DestinationFiles="$(PackagePath)/tools/uninstall.ps1" /> | ||
</Target> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
88 changes: 88 additions & 0 deletions
88
src/SMAPI.ModBuildConfig.Analyzer.Tests/Framework/DiagnosticResult.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
// <generated /> | ||
using Microsoft.CodeAnalysis; | ||
using System; | ||
|
||
namespace SMAPI.ModBuildConfig.Analyzer.Tests.Framework | ||
{ | ||
/// <summary> | ||
/// Location where the diagnostic appears, as determined by path, line number, and column number. | ||
/// </summary> | ||
public struct DiagnosticResultLocation | ||
{ | ||
public DiagnosticResultLocation(string path, int line, int column) | ||
{ | ||
if (line < -1) | ||
{ | ||
throw new ArgumentOutOfRangeException(nameof(line), "line must be >= -1"); | ||
} | ||
|
||
if (column < -1) | ||
{ | ||
throw new ArgumentOutOfRangeException(nameof(column), "column must be >= -1"); | ||
} | ||
|
||
this.Path = path; | ||
this.Line = line; | ||
this.Column = column; | ||
} | ||
|
||
public string Path { get; } | ||
public int Line { get; } | ||
public int Column { get; } | ||
} | ||
|
||
/// <summary> | ||
/// Struct that stores information about a Diagnostic appearing in a source | ||
/// </summary> | ||
public struct DiagnosticResult | ||
{ | ||
private DiagnosticResultLocation[] locations; | ||
|
||
public DiagnosticResultLocation[] Locations | ||
{ | ||
get | ||
{ | ||
if (this.locations == null) | ||
{ | ||
this.locations = new DiagnosticResultLocation[] { }; | ||
} | ||
return this.locations; | ||
} | ||
|
||
set | ||
{ | ||
this.locations = value; | ||
} | ||
} | ||
|
||
public DiagnosticSeverity Severity { get; set; } | ||
|
||
public string Id { get; set; } | ||
|
||
public string Message { get; set; } | ||
|
||
public string Path | ||
{ | ||
get | ||
{ | ||
return this.Locations.Length > 0 ? this.Locations[0].Path : ""; | ||
} | ||
} | ||
|
||
public int Line | ||
{ | ||
get | ||
{ | ||
return this.Locations.Length > 0 ? this.Locations[0].Line : -1; | ||
} | ||
} | ||
|
||
public int Column | ||
{ | ||
get | ||
{ | ||
return this.Locations.Length > 0 ? this.Locations[0].Column : -1; | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.