From 1634222a0c032a6e99ce6b8531d6a3e52148b991 Mon Sep 17 00:00:00 2001 From: Larry Golding Date: Tue, 1 Sep 2020 11:05:00 -0700 Subject: [PATCH 1/9] Introduce Sarif.Multitool.Library project. --- scripts/Projects.psm1 | 1 + .../Sarif.Multitool.Library.csproj | 14 ++++++++++++++ src/Sarif.Sdk.sln | 14 ++++++++++++++ 3 files changed, 29 insertions(+) create mode 100644 src/Sarif.Multitool.Library/Sarif.Multitool.Library.csproj diff --git a/scripts/Projects.psm1 b/scripts/Projects.psm1 index c15aacf59..63f8edfde 100644 --- a/scripts/Projects.psm1 +++ b/scripts/Projects.psm1 @@ -26,6 +26,7 @@ $Projects.Libraries = @( "Sarif", "Sarif.Converters", "Sarif.Driver", + "Sarif.Multitool.Library" "Sarif.WorkItems" ) diff --git a/src/Sarif.Multitool.Library/Sarif.Multitool.Library.csproj b/src/Sarif.Multitool.Library/Sarif.Multitool.Library.csproj new file mode 100644 index 000000000..8a577e7c5 --- /dev/null +++ b/src/Sarif.Multitool.Library/Sarif.Multitool.Library.csproj @@ -0,0 +1,14 @@ + + + + SARIF Multitool Library + The public API exposing the commands used by the SARIF Multitool. + + + + + + netstandard2.0;net461 + + + diff --git a/src/Sarif.Sdk.sln b/src/Sarif.Sdk.sln index e19387366..6496d72e3 100644 --- a/src/Sarif.Sdk.sln +++ b/src/Sarif.Sdk.sln @@ -116,6 +116,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "policies", "policies", "{C2 ..\policies\github-dsp.config.xml = ..\policies\github-dsp.config.xml EndProjectSection EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sarif.Multitool.Library", "Sarif.Multitool.Library\Sarif.Multitool.Library.csproj", "{04994C98-A105-4D37-A765-64F822BF1EB3}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -318,6 +320,18 @@ Global {58EF0BEA-348C-43B7-9F6A-526F4A7D01FD}.Release|x64.Build.0 = Release|Any CPU {58EF0BEA-348C-43B7-9F6A-526F4A7D01FD}.Release|x86.ActiveCfg = Release|Any CPU {58EF0BEA-348C-43B7-9F6A-526F4A7D01FD}.Release|x86.Build.0 = Release|Any CPU + {04994C98-A105-4D37-A765-64F822BF1EB3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {04994C98-A105-4D37-A765-64F822BF1EB3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {04994C98-A105-4D37-A765-64F822BF1EB3}.Debug|x64.ActiveCfg = Debug|Any CPU + {04994C98-A105-4D37-A765-64F822BF1EB3}.Debug|x64.Build.0 = Debug|Any CPU + {04994C98-A105-4D37-A765-64F822BF1EB3}.Debug|x86.ActiveCfg = Debug|Any CPU + {04994C98-A105-4D37-A765-64F822BF1EB3}.Debug|x86.Build.0 = Debug|Any CPU + {04994C98-A105-4D37-A765-64F822BF1EB3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {04994C98-A105-4D37-A765-64F822BF1EB3}.Release|Any CPU.Build.0 = Release|Any CPU + {04994C98-A105-4D37-A765-64F822BF1EB3}.Release|x64.ActiveCfg = Release|Any CPU + {04994C98-A105-4D37-A765-64F822BF1EB3}.Release|x64.Build.0 = Release|Any CPU + {04994C98-A105-4D37-A765-64F822BF1EB3}.Release|x86.ActiveCfg = Release|Any CPU + {04994C98-A105-4D37-A765-64F822BF1EB3}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE From 70c5548977236945d2b1b4109a4dfc944e2b49a7 Mon Sep 17 00:00:00 2001 From: Larry Golding Date: Tue, 1 Sep 2020 11:14:15 -0700 Subject: [PATCH 2/9] Reference Library from Multitool, move one source file. --- .../Extensions.cs | 0 src/Sarif.Multitool.Library/Sarif.Multitool.Library.csproj | 4 ++++ src/Sarif.Multitool/Sarif.Multitool.csproj | 1 + 3 files changed, 5 insertions(+) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/Extensions.cs (100%) diff --git a/src/Sarif.Multitool/Extensions.cs b/src/Sarif.Multitool.Library/Extensions.cs similarity index 100% rename from src/Sarif.Multitool/Extensions.cs rename to src/Sarif.Multitool.Library/Extensions.cs diff --git a/src/Sarif.Multitool.Library/Sarif.Multitool.Library.csproj b/src/Sarif.Multitool.Library/Sarif.Multitool.Library.csproj index 8a577e7c5..bcfc2f20b 100644 --- a/src/Sarif.Multitool.Library/Sarif.Multitool.Library.csproj +++ b/src/Sarif.Multitool.Library/Sarif.Multitool.Library.csproj @@ -11,4 +11,8 @@ netstandard2.0;net461 + + + + diff --git a/src/Sarif.Multitool/Sarif.Multitool.csproj b/src/Sarif.Multitool/Sarif.Multitool.csproj index cdd531653..a1a99f650 100644 --- a/src/Sarif.Multitool/Sarif.Multitool.csproj +++ b/src/Sarif.Multitool/Sarif.Multitool.csproj @@ -45,6 +45,7 @@ + From fe0633f9aa3ea769850bb375eed05d9bf32f2980 Mon Sep 17 00:00:00 2001 From: Larry Golding Date: Tue, 1 Sep 2020 12:38:21 -0700 Subject: [PATCH 3/9] Move remaining files to library. --- .../AbsoluteUriCommand.cs | 0 .../AbsoluteUriOptions.cs | 0 .../CommandBase.cs | 4 +-- .../CommandUtilities.cs | 0 .../ConvertCommand.cs | 0 .../ConvertOptions.cs | 0 .../ExportRuleDocumentationCommand.cs | 0 .../ExportRuleDocumentationOptions.cs | 0 .../ExportRulesMetadataCommand.cs | 0 .../FileWorkItemsCommand.cs | 0 .../FileWorkItemsOptions.cs | 0 .../IntegerExtensions.cs | 0 .../JTokenExtensions.cs | 0 .../MergeCommand.cs | 6 ---- .../MergeOptions.cs | 0 .../MultitoolResources.Designer.cs | 2 +- .../MultitoolResources.resx | 0 .../PageCommand.cs | 0 .../PageOptions.cs | 0 .../QueryCommand.cs | 0 .../QueryOptions.cs | 0 .../RebaseUriCommand.cs | 0 .../RebaseUriOptions.cs | 0 .../ResultMatchSetCommand.cs | 0 .../ResultMatchSetOptions.cs | 0 .../ResultMatchingCommand.cs | 0 .../ResultMatchingOptions.cs | 0 .../RewriteCommand.cs | 0 .../RewriteOptions.cs | 0 ...P1001.ProvideRequiredLocationProperties.cs | 0 .../DSP1002.InlineThreadFlowLocations.cs | 0 ...DSP1003.ProvideRequiredRegionProperties.cs | 0 ...iewArraysThatExceedConfigurableDefaults.cs | 0 ....LocationsMustBeRelativeUrisOrFilePaths.cs | 0 .../Rules/DSP1006.ProvideCheckoutPath.cs | 0 ...rovideRequiredRelatedLocationProperties.cs | 0 .../Rules/RuleId.cs | 0 .../Rules/RuleResources.Designer.cs | 2 +- .../Rules/RuleResources.resx | 0 .../SARIF1001.RuleIdentifiersMustBeValid.cs | 0 .../Rules/SARIF1002.UrisMustBeValid.cs | 0 .../SARIF1004.ExpressUriBaseIdsCorrectly.cs | 0 .../Rules/SARIF1005.UriMustBeAbsolute.cs | 0 ...06.InvocationPropertiesMustBeConsistent.cs | 0 ...IF1007.RegionPropertiesMustBeConsistent.cs | 0 ...sicalLocationPropertiesMustBeConsistent.cs | 0 ...dexPropertiesMustBeConsistentWithArrays.cs | 0 .../Rules/SARIF1010.RuleIdMustBeConsistent.cs | 0 .../Rules/SARIF1011.ReferenceFinalSchema.cs | 0 ...essageArgumentsMustBeConsistentWithRule.cs | 0 .../SARIF2001.TerminateMessagesWithPeriod.cs | 0 .../SARIF2002.ProvideMessageArguments.cs | 0 ...RIF2003.ProvideVersionControlProvenance.cs | 0 .../Rules/SARIF2004.OptimizeFileSize.cs | 0 .../Rules/SARIF2005.ProvideToolProperties.cs | 0 .../Rules/SARIF2006.UrisShouldBeReachable.cs | 0 ...ARIF2007.ExpressPathsRelativeToRepoRoot.cs | 0 .../Rules/SARIF2008.ProvideSchema.cs | 0 ...09.ConsiderConventionalIdentifierValues.cs | 0 .../Rules/SARIF2010.ProvideCodeSnippets.cs | 0 .../Rules/SARIF2011.ProvideContextRegion.cs | 0 .../Rules/SARIF2012.ProvideRuleProperties.cs | 0 .../SARIF2013.ProvideEmbeddedFileContent.cs | 0 .../SARIF2014.ProvideDynamicMessageContent.cs | 0 .../SARIF2015.EnquoteDynamicMessageContent.cs | 0 .../SARIF2016.FileUrisShouldBeRelative.cs | 0 .../Rules/SarifValidationSkimmerBase.cs | 0 .../Sarif.Multitool.Library.csproj | 36 +++++++++++++++++++ .../SarifPropertyName.cs | 0 .../SarifValidationContext.cs | 0 .../StringExtensions.cs | 0 .../TransformCommand.cs | 0 .../TransformOptions.cs | 0 .../ValidateCommand.cs | 0 .../ValidateOptions.cs | 0 src/Sarif.Multitool/Sarif.Multitool.csproj | 33 +++-------------- 76 files changed, 44 insertions(+), 39 deletions(-) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/AbsoluteUriCommand.cs (100%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/AbsoluteUriOptions.cs (100%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/CommandBase.cs (97%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/CommandUtilities.cs (100%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/ConvertCommand.cs (100%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/ConvertOptions.cs (100%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/ExportRuleDocumentationCommand.cs (100%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/ExportRuleDocumentationOptions.cs (100%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/ExportRulesMetadataCommand.cs (100%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/FileWorkItemsCommand.cs (100%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/FileWorkItemsOptions.cs (100%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/IntegerExtensions.cs (100%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/JTokenExtensions.cs (100%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/MergeCommand.cs (96%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/MergeOptions.cs (100%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/MultitoolResources.Designer.cs (97%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/MultitoolResources.resx (100%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/PageCommand.cs (100%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/PageOptions.cs (100%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/QueryCommand.cs (100%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/QueryOptions.cs (100%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/RebaseUriCommand.cs (100%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/RebaseUriOptions.cs (100%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/ResultMatchSetCommand.cs (100%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/ResultMatchSetOptions.cs (100%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/ResultMatchingCommand.cs (100%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/ResultMatchingOptions.cs (100%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/RewriteCommand.cs (100%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/RewriteOptions.cs (100%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/Rules/DSP1001.ProvideRequiredLocationProperties.cs (100%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/Rules/DSP1002.InlineThreadFlowLocations.cs (100%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/Rules/DSP1003.ProvideRequiredRegionProperties.cs (100%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/Rules/DSP1004.ReviewArraysThatExceedConfigurableDefaults.cs (100%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/Rules/DSP1005.LocationsMustBeRelativeUrisOrFilePaths.cs (100%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/Rules/DSP1006.ProvideCheckoutPath.cs (100%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/Rules/DSP1007.ProvideRequiredRelatedLocationProperties.cs (100%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/Rules/RuleId.cs (100%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/Rules/RuleResources.Designer.cs (99%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/Rules/RuleResources.resx (100%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/Rules/SARIF1001.RuleIdentifiersMustBeValid.cs (100%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/Rules/SARIF1002.UrisMustBeValid.cs (100%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/Rules/SARIF1004.ExpressUriBaseIdsCorrectly.cs (100%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/Rules/SARIF1005.UriMustBeAbsolute.cs (100%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/Rules/SARIF1006.InvocationPropertiesMustBeConsistent.cs (100%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/Rules/SARIF1007.RegionPropertiesMustBeConsistent.cs (100%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/Rules/SARIF1008.PhysicalLocationPropertiesMustBeConsistent.cs (100%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/Rules/SARIF1009.IndexPropertiesMustBeConsistentWithArrays.cs (100%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/Rules/SARIF1010.RuleIdMustBeConsistent.cs (100%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/Rules/SARIF1011.ReferenceFinalSchema.cs (100%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/Rules/SARIF1012.MessageArgumentsMustBeConsistentWithRule.cs (100%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/Rules/SARIF2001.TerminateMessagesWithPeriod.cs (100%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/Rules/SARIF2002.ProvideMessageArguments.cs (100%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/Rules/SARIF2003.ProvideVersionControlProvenance.cs (100%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/Rules/SARIF2004.OptimizeFileSize.cs (100%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/Rules/SARIF2005.ProvideToolProperties.cs (100%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/Rules/SARIF2006.UrisShouldBeReachable.cs (100%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/Rules/SARIF2007.ExpressPathsRelativeToRepoRoot.cs (100%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/Rules/SARIF2008.ProvideSchema.cs (100%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/Rules/SARIF2009.ConsiderConventionalIdentifierValues.cs (100%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/Rules/SARIF2010.ProvideCodeSnippets.cs (100%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/Rules/SARIF2011.ProvideContextRegion.cs (100%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/Rules/SARIF2012.ProvideRuleProperties.cs (100%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/Rules/SARIF2013.ProvideEmbeddedFileContent.cs (100%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/Rules/SARIF2014.ProvideDynamicMessageContent.cs (100%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/Rules/SARIF2015.EnquoteDynamicMessageContent.cs (100%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/Rules/SARIF2016.FileUrisShouldBeRelative.cs (100%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/Rules/SarifValidationSkimmerBase.cs (100%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/SarifPropertyName.cs (100%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/SarifValidationContext.cs (100%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/StringExtensions.cs (100%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/TransformCommand.cs (100%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/TransformOptions.cs (100%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/ValidateCommand.cs (100%) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/ValidateOptions.cs (100%) diff --git a/src/Sarif.Multitool/AbsoluteUriCommand.cs b/src/Sarif.Multitool.Library/AbsoluteUriCommand.cs similarity index 100% rename from src/Sarif.Multitool/AbsoluteUriCommand.cs rename to src/Sarif.Multitool.Library/AbsoluteUriCommand.cs diff --git a/src/Sarif.Multitool/AbsoluteUriOptions.cs b/src/Sarif.Multitool.Library/AbsoluteUriOptions.cs similarity index 100% rename from src/Sarif.Multitool/AbsoluteUriOptions.cs rename to src/Sarif.Multitool.Library/AbsoluteUriOptions.cs diff --git a/src/Sarif.Multitool/CommandBase.cs b/src/Sarif.Multitool.Library/CommandBase.cs similarity index 97% rename from src/Sarif.Multitool/CommandBase.cs rename to src/Sarif.Multitool.Library/CommandBase.cs index 1ccc69554..e70bd98e8 100644 --- a/src/Sarif.Multitool/CommandBase.cs +++ b/src/Sarif.Multitool.Library/CommandBase.cs @@ -13,8 +13,8 @@ namespace Microsoft.CodeAnalysis.Sarif.Multitool { public abstract class CommandBase { - internal const int SUCCESS = 0; - internal const int FAILURE = 1; + public const int SUCCESS = 0; + public const int FAILURE = 1; protected static bool ValidateNonNegativeCommandLineOption(long optionValue, string optionName) { diff --git a/src/Sarif.Multitool/CommandUtilities.cs b/src/Sarif.Multitool.Library/CommandUtilities.cs similarity index 100% rename from src/Sarif.Multitool/CommandUtilities.cs rename to src/Sarif.Multitool.Library/CommandUtilities.cs diff --git a/src/Sarif.Multitool/ConvertCommand.cs b/src/Sarif.Multitool.Library/ConvertCommand.cs similarity index 100% rename from src/Sarif.Multitool/ConvertCommand.cs rename to src/Sarif.Multitool.Library/ConvertCommand.cs diff --git a/src/Sarif.Multitool/ConvertOptions.cs b/src/Sarif.Multitool.Library/ConvertOptions.cs similarity index 100% rename from src/Sarif.Multitool/ConvertOptions.cs rename to src/Sarif.Multitool.Library/ConvertOptions.cs diff --git a/src/Sarif.Multitool/ExportRuleDocumentationCommand.cs b/src/Sarif.Multitool.Library/ExportRuleDocumentationCommand.cs similarity index 100% rename from src/Sarif.Multitool/ExportRuleDocumentationCommand.cs rename to src/Sarif.Multitool.Library/ExportRuleDocumentationCommand.cs diff --git a/src/Sarif.Multitool/ExportRuleDocumentationOptions.cs b/src/Sarif.Multitool.Library/ExportRuleDocumentationOptions.cs similarity index 100% rename from src/Sarif.Multitool/ExportRuleDocumentationOptions.cs rename to src/Sarif.Multitool.Library/ExportRuleDocumentationOptions.cs diff --git a/src/Sarif.Multitool/ExportRulesMetadataCommand.cs b/src/Sarif.Multitool.Library/ExportRulesMetadataCommand.cs similarity index 100% rename from src/Sarif.Multitool/ExportRulesMetadataCommand.cs rename to src/Sarif.Multitool.Library/ExportRulesMetadataCommand.cs diff --git a/src/Sarif.Multitool/FileWorkItemsCommand.cs b/src/Sarif.Multitool.Library/FileWorkItemsCommand.cs similarity index 100% rename from src/Sarif.Multitool/FileWorkItemsCommand.cs rename to src/Sarif.Multitool.Library/FileWorkItemsCommand.cs diff --git a/src/Sarif.Multitool/FileWorkItemsOptions.cs b/src/Sarif.Multitool.Library/FileWorkItemsOptions.cs similarity index 100% rename from src/Sarif.Multitool/FileWorkItemsOptions.cs rename to src/Sarif.Multitool.Library/FileWorkItemsOptions.cs diff --git a/src/Sarif.Multitool/IntegerExtensions.cs b/src/Sarif.Multitool.Library/IntegerExtensions.cs similarity index 100% rename from src/Sarif.Multitool/IntegerExtensions.cs rename to src/Sarif.Multitool.Library/IntegerExtensions.cs diff --git a/src/Sarif.Multitool/JTokenExtensions.cs b/src/Sarif.Multitool.Library/JTokenExtensions.cs similarity index 100% rename from src/Sarif.Multitool/JTokenExtensions.cs rename to src/Sarif.Multitool.Library/JTokenExtensions.cs diff --git a/src/Sarif.Multitool/MergeCommand.cs b/src/Sarif.Multitool.Library/MergeCommand.cs similarity index 96% rename from src/Sarif.Multitool/MergeCommand.cs rename to src/Sarif.Multitool.Library/MergeCommand.cs index bb4986044..0ecf9f9cb 100644 --- a/src/Sarif.Multitool/MergeCommand.cs +++ b/src/Sarif.Multitool.Library/MergeCommand.cs @@ -4,16 +4,10 @@ using System; using System.Collections.Generic; using System.IO; -using System.Runtime.InteropServices.WindowsRuntime; using Microsoft.CodeAnalysis.Sarif.Driver; -using Microsoft.CodeAnalysis.Sarif.Driver.Sdk; using Microsoft.CodeAnalysis.Sarif.Processors; -using Microsoft.CodeAnalysis.Sarif.Visitors; using Microsoft.CodeAnalysis.Sarif.Writers; -using Microsoft.Extensions.Options; -using Microsoft.TeamFoundation.Work.WebApi; -using Microsoft.VisualStudio.Services.OAuth; using Newtonsoft.Json; diff --git a/src/Sarif.Multitool/MergeOptions.cs b/src/Sarif.Multitool.Library/MergeOptions.cs similarity index 100% rename from src/Sarif.Multitool/MergeOptions.cs rename to src/Sarif.Multitool.Library/MergeOptions.cs diff --git a/src/Sarif.Multitool/MultitoolResources.Designer.cs b/src/Sarif.Multitool.Library/MultitoolResources.Designer.cs similarity index 97% rename from src/Sarif.Multitool/MultitoolResources.Designer.cs rename to src/Sarif.Multitool.Library/MultitoolResources.Designer.cs index 3a4fb373b..e636b05d0 100644 --- a/src/Sarif.Multitool/MultitoolResources.Designer.cs +++ b/src/Sarif.Multitool.Library/MultitoolResources.Designer.cs @@ -160,7 +160,7 @@ internal static string WorkItemFiling_NoHostUriSpecified { } /// - /// Looks up a localized string similar to No security token was provided. Populate the 'SarifWorkItemFilingSecurityPat' environment variable with a valid personal access token or pass a token in a configuration file using the --configuration option. + /// Looks up a localized string similar to No security token was provided. Populate the 'SarifWorkItemFilingPat' environment variable with a valid personal access token or pass a token in a configuration file using the --configuration option. /// internal static string WorkItemFiling_NoPatFound { get { diff --git a/src/Sarif.Multitool/MultitoolResources.resx b/src/Sarif.Multitool.Library/MultitoolResources.resx similarity index 100% rename from src/Sarif.Multitool/MultitoolResources.resx rename to src/Sarif.Multitool.Library/MultitoolResources.resx diff --git a/src/Sarif.Multitool/PageCommand.cs b/src/Sarif.Multitool.Library/PageCommand.cs similarity index 100% rename from src/Sarif.Multitool/PageCommand.cs rename to src/Sarif.Multitool.Library/PageCommand.cs diff --git a/src/Sarif.Multitool/PageOptions.cs b/src/Sarif.Multitool.Library/PageOptions.cs similarity index 100% rename from src/Sarif.Multitool/PageOptions.cs rename to src/Sarif.Multitool.Library/PageOptions.cs diff --git a/src/Sarif.Multitool/QueryCommand.cs b/src/Sarif.Multitool.Library/QueryCommand.cs similarity index 100% rename from src/Sarif.Multitool/QueryCommand.cs rename to src/Sarif.Multitool.Library/QueryCommand.cs diff --git a/src/Sarif.Multitool/QueryOptions.cs b/src/Sarif.Multitool.Library/QueryOptions.cs similarity index 100% rename from src/Sarif.Multitool/QueryOptions.cs rename to src/Sarif.Multitool.Library/QueryOptions.cs diff --git a/src/Sarif.Multitool/RebaseUriCommand.cs b/src/Sarif.Multitool.Library/RebaseUriCommand.cs similarity index 100% rename from src/Sarif.Multitool/RebaseUriCommand.cs rename to src/Sarif.Multitool.Library/RebaseUriCommand.cs diff --git a/src/Sarif.Multitool/RebaseUriOptions.cs b/src/Sarif.Multitool.Library/RebaseUriOptions.cs similarity index 100% rename from src/Sarif.Multitool/RebaseUriOptions.cs rename to src/Sarif.Multitool.Library/RebaseUriOptions.cs diff --git a/src/Sarif.Multitool/ResultMatchSetCommand.cs b/src/Sarif.Multitool.Library/ResultMatchSetCommand.cs similarity index 100% rename from src/Sarif.Multitool/ResultMatchSetCommand.cs rename to src/Sarif.Multitool.Library/ResultMatchSetCommand.cs diff --git a/src/Sarif.Multitool/ResultMatchSetOptions.cs b/src/Sarif.Multitool.Library/ResultMatchSetOptions.cs similarity index 100% rename from src/Sarif.Multitool/ResultMatchSetOptions.cs rename to src/Sarif.Multitool.Library/ResultMatchSetOptions.cs diff --git a/src/Sarif.Multitool/ResultMatchingCommand.cs b/src/Sarif.Multitool.Library/ResultMatchingCommand.cs similarity index 100% rename from src/Sarif.Multitool/ResultMatchingCommand.cs rename to src/Sarif.Multitool.Library/ResultMatchingCommand.cs diff --git a/src/Sarif.Multitool/ResultMatchingOptions.cs b/src/Sarif.Multitool.Library/ResultMatchingOptions.cs similarity index 100% rename from src/Sarif.Multitool/ResultMatchingOptions.cs rename to src/Sarif.Multitool.Library/ResultMatchingOptions.cs diff --git a/src/Sarif.Multitool/RewriteCommand.cs b/src/Sarif.Multitool.Library/RewriteCommand.cs similarity index 100% rename from src/Sarif.Multitool/RewriteCommand.cs rename to src/Sarif.Multitool.Library/RewriteCommand.cs diff --git a/src/Sarif.Multitool/RewriteOptions.cs b/src/Sarif.Multitool.Library/RewriteOptions.cs similarity index 100% rename from src/Sarif.Multitool/RewriteOptions.cs rename to src/Sarif.Multitool.Library/RewriteOptions.cs diff --git a/src/Sarif.Multitool/Rules/DSP1001.ProvideRequiredLocationProperties.cs b/src/Sarif.Multitool.Library/Rules/DSP1001.ProvideRequiredLocationProperties.cs similarity index 100% rename from src/Sarif.Multitool/Rules/DSP1001.ProvideRequiredLocationProperties.cs rename to src/Sarif.Multitool.Library/Rules/DSP1001.ProvideRequiredLocationProperties.cs diff --git a/src/Sarif.Multitool/Rules/DSP1002.InlineThreadFlowLocations.cs b/src/Sarif.Multitool.Library/Rules/DSP1002.InlineThreadFlowLocations.cs similarity index 100% rename from src/Sarif.Multitool/Rules/DSP1002.InlineThreadFlowLocations.cs rename to src/Sarif.Multitool.Library/Rules/DSP1002.InlineThreadFlowLocations.cs diff --git a/src/Sarif.Multitool/Rules/DSP1003.ProvideRequiredRegionProperties.cs b/src/Sarif.Multitool.Library/Rules/DSP1003.ProvideRequiredRegionProperties.cs similarity index 100% rename from src/Sarif.Multitool/Rules/DSP1003.ProvideRequiredRegionProperties.cs rename to src/Sarif.Multitool.Library/Rules/DSP1003.ProvideRequiredRegionProperties.cs diff --git a/src/Sarif.Multitool/Rules/DSP1004.ReviewArraysThatExceedConfigurableDefaults.cs b/src/Sarif.Multitool.Library/Rules/DSP1004.ReviewArraysThatExceedConfigurableDefaults.cs similarity index 100% rename from src/Sarif.Multitool/Rules/DSP1004.ReviewArraysThatExceedConfigurableDefaults.cs rename to src/Sarif.Multitool.Library/Rules/DSP1004.ReviewArraysThatExceedConfigurableDefaults.cs diff --git a/src/Sarif.Multitool/Rules/DSP1005.LocationsMustBeRelativeUrisOrFilePaths.cs b/src/Sarif.Multitool.Library/Rules/DSP1005.LocationsMustBeRelativeUrisOrFilePaths.cs similarity index 100% rename from src/Sarif.Multitool/Rules/DSP1005.LocationsMustBeRelativeUrisOrFilePaths.cs rename to src/Sarif.Multitool.Library/Rules/DSP1005.LocationsMustBeRelativeUrisOrFilePaths.cs diff --git a/src/Sarif.Multitool/Rules/DSP1006.ProvideCheckoutPath.cs b/src/Sarif.Multitool.Library/Rules/DSP1006.ProvideCheckoutPath.cs similarity index 100% rename from src/Sarif.Multitool/Rules/DSP1006.ProvideCheckoutPath.cs rename to src/Sarif.Multitool.Library/Rules/DSP1006.ProvideCheckoutPath.cs diff --git a/src/Sarif.Multitool/Rules/DSP1007.ProvideRequiredRelatedLocationProperties.cs b/src/Sarif.Multitool.Library/Rules/DSP1007.ProvideRequiredRelatedLocationProperties.cs similarity index 100% rename from src/Sarif.Multitool/Rules/DSP1007.ProvideRequiredRelatedLocationProperties.cs rename to src/Sarif.Multitool.Library/Rules/DSP1007.ProvideRequiredRelatedLocationProperties.cs diff --git a/src/Sarif.Multitool/Rules/RuleId.cs b/src/Sarif.Multitool.Library/Rules/RuleId.cs similarity index 100% rename from src/Sarif.Multitool/Rules/RuleId.cs rename to src/Sarif.Multitool.Library/Rules/RuleId.cs diff --git a/src/Sarif.Multitool/Rules/RuleResources.Designer.cs b/src/Sarif.Multitool.Library/Rules/RuleResources.Designer.cs similarity index 99% rename from src/Sarif.Multitool/Rules/RuleResources.Designer.cs rename to src/Sarif.Multitool.Library/Rules/RuleResources.Designer.cs index c3ac7b1fe..7ba79977c 100644 --- a/src/Sarif.Multitool/Rules/RuleResources.Designer.cs +++ b/src/Sarif.Multitool.Library/Rules/RuleResources.Designer.cs @@ -832,7 +832,7 @@ internal static string SARIF2011_ProvideContextRegion_Note_Default_Text { /// ///Provide the 'name' property, which contains a "friendly name" that helps users see at a glance the purpose of the rule. For uniformity of experience across all tools that produce SARIF, the friendly name should be a single Pascal identifier, for example, 'ProvideRuleFriendlyName'. /// - ///Provide the 'helpUri' property, which contains a URI where users can find detailed information about the rule. This information shoul [rest of string was truncated]";. + ///Provide the 'helpUri' property, which contains a URI where users can find detailed information about the rule. This information s [rest of string was truncated]";. /// internal static string SARIF2012_ProvideRuleProperties_FullDescription_Text { get { diff --git a/src/Sarif.Multitool/Rules/RuleResources.resx b/src/Sarif.Multitool.Library/Rules/RuleResources.resx similarity index 100% rename from src/Sarif.Multitool/Rules/RuleResources.resx rename to src/Sarif.Multitool.Library/Rules/RuleResources.resx diff --git a/src/Sarif.Multitool/Rules/SARIF1001.RuleIdentifiersMustBeValid.cs b/src/Sarif.Multitool.Library/Rules/SARIF1001.RuleIdentifiersMustBeValid.cs similarity index 100% rename from src/Sarif.Multitool/Rules/SARIF1001.RuleIdentifiersMustBeValid.cs rename to src/Sarif.Multitool.Library/Rules/SARIF1001.RuleIdentifiersMustBeValid.cs diff --git a/src/Sarif.Multitool/Rules/SARIF1002.UrisMustBeValid.cs b/src/Sarif.Multitool.Library/Rules/SARIF1002.UrisMustBeValid.cs similarity index 100% rename from src/Sarif.Multitool/Rules/SARIF1002.UrisMustBeValid.cs rename to src/Sarif.Multitool.Library/Rules/SARIF1002.UrisMustBeValid.cs diff --git a/src/Sarif.Multitool/Rules/SARIF1004.ExpressUriBaseIdsCorrectly.cs b/src/Sarif.Multitool.Library/Rules/SARIF1004.ExpressUriBaseIdsCorrectly.cs similarity index 100% rename from src/Sarif.Multitool/Rules/SARIF1004.ExpressUriBaseIdsCorrectly.cs rename to src/Sarif.Multitool.Library/Rules/SARIF1004.ExpressUriBaseIdsCorrectly.cs diff --git a/src/Sarif.Multitool/Rules/SARIF1005.UriMustBeAbsolute.cs b/src/Sarif.Multitool.Library/Rules/SARIF1005.UriMustBeAbsolute.cs similarity index 100% rename from src/Sarif.Multitool/Rules/SARIF1005.UriMustBeAbsolute.cs rename to src/Sarif.Multitool.Library/Rules/SARIF1005.UriMustBeAbsolute.cs diff --git a/src/Sarif.Multitool/Rules/SARIF1006.InvocationPropertiesMustBeConsistent.cs b/src/Sarif.Multitool.Library/Rules/SARIF1006.InvocationPropertiesMustBeConsistent.cs similarity index 100% rename from src/Sarif.Multitool/Rules/SARIF1006.InvocationPropertiesMustBeConsistent.cs rename to src/Sarif.Multitool.Library/Rules/SARIF1006.InvocationPropertiesMustBeConsistent.cs diff --git a/src/Sarif.Multitool/Rules/SARIF1007.RegionPropertiesMustBeConsistent.cs b/src/Sarif.Multitool.Library/Rules/SARIF1007.RegionPropertiesMustBeConsistent.cs similarity index 100% rename from src/Sarif.Multitool/Rules/SARIF1007.RegionPropertiesMustBeConsistent.cs rename to src/Sarif.Multitool.Library/Rules/SARIF1007.RegionPropertiesMustBeConsistent.cs diff --git a/src/Sarif.Multitool/Rules/SARIF1008.PhysicalLocationPropertiesMustBeConsistent.cs b/src/Sarif.Multitool.Library/Rules/SARIF1008.PhysicalLocationPropertiesMustBeConsistent.cs similarity index 100% rename from src/Sarif.Multitool/Rules/SARIF1008.PhysicalLocationPropertiesMustBeConsistent.cs rename to src/Sarif.Multitool.Library/Rules/SARIF1008.PhysicalLocationPropertiesMustBeConsistent.cs diff --git a/src/Sarif.Multitool/Rules/SARIF1009.IndexPropertiesMustBeConsistentWithArrays.cs b/src/Sarif.Multitool.Library/Rules/SARIF1009.IndexPropertiesMustBeConsistentWithArrays.cs similarity index 100% rename from src/Sarif.Multitool/Rules/SARIF1009.IndexPropertiesMustBeConsistentWithArrays.cs rename to src/Sarif.Multitool.Library/Rules/SARIF1009.IndexPropertiesMustBeConsistentWithArrays.cs diff --git a/src/Sarif.Multitool/Rules/SARIF1010.RuleIdMustBeConsistent.cs b/src/Sarif.Multitool.Library/Rules/SARIF1010.RuleIdMustBeConsistent.cs similarity index 100% rename from src/Sarif.Multitool/Rules/SARIF1010.RuleIdMustBeConsistent.cs rename to src/Sarif.Multitool.Library/Rules/SARIF1010.RuleIdMustBeConsistent.cs diff --git a/src/Sarif.Multitool/Rules/SARIF1011.ReferenceFinalSchema.cs b/src/Sarif.Multitool.Library/Rules/SARIF1011.ReferenceFinalSchema.cs similarity index 100% rename from src/Sarif.Multitool/Rules/SARIF1011.ReferenceFinalSchema.cs rename to src/Sarif.Multitool.Library/Rules/SARIF1011.ReferenceFinalSchema.cs diff --git a/src/Sarif.Multitool/Rules/SARIF1012.MessageArgumentsMustBeConsistentWithRule.cs b/src/Sarif.Multitool.Library/Rules/SARIF1012.MessageArgumentsMustBeConsistentWithRule.cs similarity index 100% rename from src/Sarif.Multitool/Rules/SARIF1012.MessageArgumentsMustBeConsistentWithRule.cs rename to src/Sarif.Multitool.Library/Rules/SARIF1012.MessageArgumentsMustBeConsistentWithRule.cs diff --git a/src/Sarif.Multitool/Rules/SARIF2001.TerminateMessagesWithPeriod.cs b/src/Sarif.Multitool.Library/Rules/SARIF2001.TerminateMessagesWithPeriod.cs similarity index 100% rename from src/Sarif.Multitool/Rules/SARIF2001.TerminateMessagesWithPeriod.cs rename to src/Sarif.Multitool.Library/Rules/SARIF2001.TerminateMessagesWithPeriod.cs diff --git a/src/Sarif.Multitool/Rules/SARIF2002.ProvideMessageArguments.cs b/src/Sarif.Multitool.Library/Rules/SARIF2002.ProvideMessageArguments.cs similarity index 100% rename from src/Sarif.Multitool/Rules/SARIF2002.ProvideMessageArguments.cs rename to src/Sarif.Multitool.Library/Rules/SARIF2002.ProvideMessageArguments.cs diff --git a/src/Sarif.Multitool/Rules/SARIF2003.ProvideVersionControlProvenance.cs b/src/Sarif.Multitool.Library/Rules/SARIF2003.ProvideVersionControlProvenance.cs similarity index 100% rename from src/Sarif.Multitool/Rules/SARIF2003.ProvideVersionControlProvenance.cs rename to src/Sarif.Multitool.Library/Rules/SARIF2003.ProvideVersionControlProvenance.cs diff --git a/src/Sarif.Multitool/Rules/SARIF2004.OptimizeFileSize.cs b/src/Sarif.Multitool.Library/Rules/SARIF2004.OptimizeFileSize.cs similarity index 100% rename from src/Sarif.Multitool/Rules/SARIF2004.OptimizeFileSize.cs rename to src/Sarif.Multitool.Library/Rules/SARIF2004.OptimizeFileSize.cs diff --git a/src/Sarif.Multitool/Rules/SARIF2005.ProvideToolProperties.cs b/src/Sarif.Multitool.Library/Rules/SARIF2005.ProvideToolProperties.cs similarity index 100% rename from src/Sarif.Multitool/Rules/SARIF2005.ProvideToolProperties.cs rename to src/Sarif.Multitool.Library/Rules/SARIF2005.ProvideToolProperties.cs diff --git a/src/Sarif.Multitool/Rules/SARIF2006.UrisShouldBeReachable.cs b/src/Sarif.Multitool.Library/Rules/SARIF2006.UrisShouldBeReachable.cs similarity index 100% rename from src/Sarif.Multitool/Rules/SARIF2006.UrisShouldBeReachable.cs rename to src/Sarif.Multitool.Library/Rules/SARIF2006.UrisShouldBeReachable.cs diff --git a/src/Sarif.Multitool/Rules/SARIF2007.ExpressPathsRelativeToRepoRoot.cs b/src/Sarif.Multitool.Library/Rules/SARIF2007.ExpressPathsRelativeToRepoRoot.cs similarity index 100% rename from src/Sarif.Multitool/Rules/SARIF2007.ExpressPathsRelativeToRepoRoot.cs rename to src/Sarif.Multitool.Library/Rules/SARIF2007.ExpressPathsRelativeToRepoRoot.cs diff --git a/src/Sarif.Multitool/Rules/SARIF2008.ProvideSchema.cs b/src/Sarif.Multitool.Library/Rules/SARIF2008.ProvideSchema.cs similarity index 100% rename from src/Sarif.Multitool/Rules/SARIF2008.ProvideSchema.cs rename to src/Sarif.Multitool.Library/Rules/SARIF2008.ProvideSchema.cs diff --git a/src/Sarif.Multitool/Rules/SARIF2009.ConsiderConventionalIdentifierValues.cs b/src/Sarif.Multitool.Library/Rules/SARIF2009.ConsiderConventionalIdentifierValues.cs similarity index 100% rename from src/Sarif.Multitool/Rules/SARIF2009.ConsiderConventionalIdentifierValues.cs rename to src/Sarif.Multitool.Library/Rules/SARIF2009.ConsiderConventionalIdentifierValues.cs diff --git a/src/Sarif.Multitool/Rules/SARIF2010.ProvideCodeSnippets.cs b/src/Sarif.Multitool.Library/Rules/SARIF2010.ProvideCodeSnippets.cs similarity index 100% rename from src/Sarif.Multitool/Rules/SARIF2010.ProvideCodeSnippets.cs rename to src/Sarif.Multitool.Library/Rules/SARIF2010.ProvideCodeSnippets.cs diff --git a/src/Sarif.Multitool/Rules/SARIF2011.ProvideContextRegion.cs b/src/Sarif.Multitool.Library/Rules/SARIF2011.ProvideContextRegion.cs similarity index 100% rename from src/Sarif.Multitool/Rules/SARIF2011.ProvideContextRegion.cs rename to src/Sarif.Multitool.Library/Rules/SARIF2011.ProvideContextRegion.cs diff --git a/src/Sarif.Multitool/Rules/SARIF2012.ProvideRuleProperties.cs b/src/Sarif.Multitool.Library/Rules/SARIF2012.ProvideRuleProperties.cs similarity index 100% rename from src/Sarif.Multitool/Rules/SARIF2012.ProvideRuleProperties.cs rename to src/Sarif.Multitool.Library/Rules/SARIF2012.ProvideRuleProperties.cs diff --git a/src/Sarif.Multitool/Rules/SARIF2013.ProvideEmbeddedFileContent.cs b/src/Sarif.Multitool.Library/Rules/SARIF2013.ProvideEmbeddedFileContent.cs similarity index 100% rename from src/Sarif.Multitool/Rules/SARIF2013.ProvideEmbeddedFileContent.cs rename to src/Sarif.Multitool.Library/Rules/SARIF2013.ProvideEmbeddedFileContent.cs diff --git a/src/Sarif.Multitool/Rules/SARIF2014.ProvideDynamicMessageContent.cs b/src/Sarif.Multitool.Library/Rules/SARIF2014.ProvideDynamicMessageContent.cs similarity index 100% rename from src/Sarif.Multitool/Rules/SARIF2014.ProvideDynamicMessageContent.cs rename to src/Sarif.Multitool.Library/Rules/SARIF2014.ProvideDynamicMessageContent.cs diff --git a/src/Sarif.Multitool/Rules/SARIF2015.EnquoteDynamicMessageContent.cs b/src/Sarif.Multitool.Library/Rules/SARIF2015.EnquoteDynamicMessageContent.cs similarity index 100% rename from src/Sarif.Multitool/Rules/SARIF2015.EnquoteDynamicMessageContent.cs rename to src/Sarif.Multitool.Library/Rules/SARIF2015.EnquoteDynamicMessageContent.cs diff --git a/src/Sarif.Multitool/Rules/SARIF2016.FileUrisShouldBeRelative.cs b/src/Sarif.Multitool.Library/Rules/SARIF2016.FileUrisShouldBeRelative.cs similarity index 100% rename from src/Sarif.Multitool/Rules/SARIF2016.FileUrisShouldBeRelative.cs rename to src/Sarif.Multitool.Library/Rules/SARIF2016.FileUrisShouldBeRelative.cs diff --git a/src/Sarif.Multitool/Rules/SarifValidationSkimmerBase.cs b/src/Sarif.Multitool.Library/Rules/SarifValidationSkimmerBase.cs similarity index 100% rename from src/Sarif.Multitool/Rules/SarifValidationSkimmerBase.cs rename to src/Sarif.Multitool.Library/Rules/SarifValidationSkimmerBase.cs diff --git a/src/Sarif.Multitool.Library/Sarif.Multitool.Library.csproj b/src/Sarif.Multitool.Library/Sarif.Multitool.Library.csproj index bcfc2f20b..27b6ec50f 100644 --- a/src/Sarif.Multitool.Library/Sarif.Multitool.Library.csproj +++ b/src/Sarif.Multitool.Library/Sarif.Multitool.Library.csproj @@ -9,9 +9,45 @@ netstandard2.0;net461 + Microsoft.CodeAnalysis.Sarif.Multitool + + + + + + + + + + True + True + MultitoolResources.resx + + + True + True + RuleResources.resx + + + + + + ResXFileCodeGenerator + MultitoolResources.Designer.cs + + + ResXFileCodeGenerator + RuleResources.Designer.cs + + + + + + + diff --git a/src/Sarif.Multitool/SarifPropertyName.cs b/src/Sarif.Multitool.Library/SarifPropertyName.cs similarity index 100% rename from src/Sarif.Multitool/SarifPropertyName.cs rename to src/Sarif.Multitool.Library/SarifPropertyName.cs diff --git a/src/Sarif.Multitool/SarifValidationContext.cs b/src/Sarif.Multitool.Library/SarifValidationContext.cs similarity index 100% rename from src/Sarif.Multitool/SarifValidationContext.cs rename to src/Sarif.Multitool.Library/SarifValidationContext.cs diff --git a/src/Sarif.Multitool/StringExtensions.cs b/src/Sarif.Multitool.Library/StringExtensions.cs similarity index 100% rename from src/Sarif.Multitool/StringExtensions.cs rename to src/Sarif.Multitool.Library/StringExtensions.cs diff --git a/src/Sarif.Multitool/TransformCommand.cs b/src/Sarif.Multitool.Library/TransformCommand.cs similarity index 100% rename from src/Sarif.Multitool/TransformCommand.cs rename to src/Sarif.Multitool.Library/TransformCommand.cs diff --git a/src/Sarif.Multitool/TransformOptions.cs b/src/Sarif.Multitool.Library/TransformOptions.cs similarity index 100% rename from src/Sarif.Multitool/TransformOptions.cs rename to src/Sarif.Multitool.Library/TransformOptions.cs diff --git a/src/Sarif.Multitool/ValidateCommand.cs b/src/Sarif.Multitool.Library/ValidateCommand.cs similarity index 100% rename from src/Sarif.Multitool/ValidateCommand.cs rename to src/Sarif.Multitool.Library/ValidateCommand.cs diff --git a/src/Sarif.Multitool/ValidateOptions.cs b/src/Sarif.Multitool.Library/ValidateOptions.cs similarity index 100% rename from src/Sarif.Multitool/ValidateOptions.cs rename to src/Sarif.Multitool.Library/ValidateOptions.cs diff --git a/src/Sarif.Multitool/Sarif.Multitool.csproj b/src/Sarif.Multitool/Sarif.Multitool.csproj index a1a99f650..a730bfb87 100644 --- a/src/Sarif.Multitool/Sarif.Multitool.csproj +++ b/src/Sarif.Multitool/Sarif.Multitool.csproj @@ -28,7 +28,7 @@ SARIF Multitool - Command line tool to perform transformations of input files to SARIF. + Command line tool to manipulate SARIF files. @@ -39,9 +39,9 @@ - - - + + + @@ -52,33 +52,8 @@ - - - True - True - MultitoolResources.resx - - - True - True - RuleResources.resx - - - - - - ResXFileCodeGenerator - MultitoolResources.Designer.cs - - - ResXFileCodeGenerator - RuleResources.Designer.cs - - - - From c3bea8fb14596cffb0e2f99b8784d40371a4b33f Mon Sep 17 00:00:00 2001 From: Larry Golding Date: Tue, 1 Sep 2020 12:40:41 -0700 Subject: [PATCH 4/9] Remove unused resources file. --- .../ValidatorResources.Designer.cs | 721 ------------------ src/Sarif.Multitool/ValidatorResources.resx | 340 --------- 2 files changed, 1061 deletions(-) delete mode 100644 src/Sarif.Multitool/ValidatorResources.Designer.cs delete mode 100644 src/Sarif.Multitool/ValidatorResources.resx diff --git a/src/Sarif.Multitool/ValidatorResources.Designer.cs b/src/Sarif.Multitool/ValidatorResources.Designer.cs deleted file mode 100644 index 7491d1dc2..000000000 --- a/src/Sarif.Multitool/ValidatorResources.Designer.cs +++ /dev/null @@ -1,721 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace Microsoft.CodeAnalysis.Sarif.Multitool { - using System; - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class ValidatorResources { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal ValidatorResources() { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.CodeAnalysis.Sarif.Multitool.ValidatorResources", typeof(ValidatorResources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - /// - /// Looks up a localized string similar to {0} version {1}. - /// - internal static string Banner { - get { - return ResourceManager.GetString("Banner", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Validation time: {0}. - /// - internal static string ElapsedTime { - get { - return ResourceManager.GetString("ElapsedTime", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The schema does not define a property named "{1}", and the schema does not permit additional properties.. - /// - internal static string ErrorAdditionalPropertiesProhibited { - get { - return ResourceManager.GetString("ErrorAdditionalPropertiesProhibited", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to This schema does not contain the sub-schema definition referred to by the $ref value "{0}".. - /// - internal static string ErrorDefinitionDoesNotExist { - get { - return ResourceManager.GetString("ErrorDefinitionDoesNotExist", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The schema requires that when property "{1}" is present, properties [{2}] are also present, but properties [{3}] are missing.. - /// - internal static string ErrorDependentPropertyMissing { - get { - return ResourceManager.GetString("ErrorDependentPropertyMissing", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to JSON schema requires the value of "additionalItems" to be either a Boolean or a schema, but a token of type "{1}" was seen.. - /// - internal static string ErrorInvalidAdditionalItemsType { - get { - return ResourceManager.GetString("ErrorInvalidAdditionalItemsType", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to JSON schema requires the value of "additionalProperties" to be either a Boolean or a schema, but a token of type "{1}" was seen.. - /// - internal static string ErrorInvalidAdditionalPropertiesType { - get { - return ResourceManager.GetString("ErrorInvalidAdditionalPropertiesType", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to JSON schema requires the value of each property of the "dependencies" object, to be either an schema or an array of strings, but a token of type "{1}" was seen.. - /// - internal static string ErrorInvalidDependencyType { - get { - return ResourceManager.GetString("ErrorInvalidDependencyType", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The value "{1}" does not match any of the enum values [{2}].. - /// - internal static string ErrorInvalidEnumValue { - get { - return ResourceManager.GetString("ErrorInvalidEnumValue", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to JSON schema requires the value of "items" to be either a schema or an array of schemas, but a token of type "{1}" was seen.. - /// - internal static string ErrorInvalidItemsType { - get { - return ResourceManager.GetString("ErrorInvalidItemsType", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to JSON requires that if the value of a property of the "dependencies" object is an array, then every element of the array must be a string, but a token of type "{1}" was seen.. - /// - internal static string ErrorInvalidPropertyDependencyType { - get { - return ResourceManager.GetString("ErrorInvalidPropertyDependencyType", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to "{1}" is not a valid schema type.. - /// - internal static string ErrorInvalidTypeString { - get { - return ResourceManager.GetString("ErrorInvalidTypeString", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to JSON schema requires the value of "type" to be either a string or an array of strings, but a token of type "{1}" was seen.. - /// - internal static string ErrorInvalidTypeType { - get { - return ResourceManager.GetString("ErrorInvalidTypeType", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to at "{{0}}": {0}. - /// - internal static string ErrorMessageFormatWithPath { - get { - return ResourceManager.GetString("ErrorMessageFormatWithPath", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The instance does not validate successfully against all of the {1} schemas specified by "allOf".. - /// - internal static string ErrorNotAllOf { - get { - return ResourceManager.GetString("ErrorNotAllOf", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The value {1} is not a multiple of {2}.. - /// - internal static string ErrorNotAMultiple { - get { - return ResourceManager.GetString("ErrorNotAMultiple", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The instance does validate successfully against any of the {1} schemas specified by "anyOf".. - /// - internal static string ErrorNotAnyOf { - get { - return ResourceManager.GetString("ErrorNotAnyOf", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The property is required to be a string, but the token is of type "{1}".. - /// - internal static string ErrorNotAString { - get { - return ResourceManager.GetString("ErrorNotAString", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The instance validates successfully against {1} of the {2} schemas specified by "oneOf", instead of validating successfully against exactly one of them.. - /// - internal static string ErrorNotOneOf { - get { - return ResourceManager.GetString("ErrorNotOneOf", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The elements of the array are not unique.. - /// - internal static string ErrorNotUnique { - get { - return ResourceManager.GetString("ErrorNotUnique", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to This partial implementation of JSON Schema only accepts $ref values in the form of fragments that refer to sub-properties of the "definitions" property, for example "#/definitions/def1". The URI reference"{0}" is not supported.. - /// - internal static string ErrorOnlyDefinitionFragmentsSupported { - get { - return ResourceManager.GetString("ErrorOnlyDefinitionFragmentsSupported", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The required property "{1}" is missing.. - /// - internal static string ErrorRequiredPropertyMissing { - get { - return ResourceManager.GetString("ErrorRequiredPropertyMissing", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The string "{1}" does not match the regular expression "{2}".. - /// - internal static string ErrorStringDoesNotMatchPattern { - get { - return ResourceManager.GetString("ErrorStringDoesNotMatchPattern", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The string "{1}" has length {2}, which is greater than the maximum length {3}. - ///. - /// - internal static string ErrorStringTooLong { - get { - return ResourceManager.GetString("ErrorStringTooLong", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The string "{1}" has length {2}, which is less than the minimum length {3}.. - /// - internal static string ErrorStringTooShort { - get { - return ResourceManager.GetString("ErrorStringTooShort", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to JSON syntax error: {1}. - /// - internal static string ErrorSyntaxError { - get { - return ResourceManager.GetString("ErrorSyntaxError", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The schema requires at least {1} array items, but there are {2}.. - /// - internal static string ErrorTooFewArrayItems { - get { - return ResourceManager.GetString("ErrorTooFewArrayItems", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The array has {1} items, but the array of schemas specified by "items" has only {2} items, and "additionalItems" is not specified to allow additional array items.. - /// - internal static string ErrorTooFewItemSchemas { - get { - return ResourceManager.GetString("ErrorTooFewItemSchemas", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The schema requires at least {1} object properties, but there are {2}.. - /// - internal static string ErrorTooFewProperties { - get { - return ResourceManager.GetString("ErrorTooFewProperties", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The schema permits at most {1} array items, but there are {2}.. - /// - internal static string ErrorTooManyArrayItems { - get { - return ResourceManager.GetString("ErrorTooManyArrayItems", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The schema permits at most {1} object properties, but there are {2}.. - /// - internal static string ErrorTooManyProperties { - get { - return ResourceManager.GetString("ErrorTooManyProperties", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The instance validates successfully against the schema specified by "not".. - /// - internal static string ErrorValidatesAgainstNotSchema { - get { - return ResourceManager.GetString("ErrorValidatesAgainstNotSchema", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The value {1} is greater than the maximum value of {2}.. - /// - internal static string ErrorValueTooLarge { - get { - return ResourceManager.GetString("ErrorValueTooLarge", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The value {1} is greater than or equal to the exclusive maximum value of {2}.. - /// - internal static string ErrorValueTooLargeExclusive { - get { - return ResourceManager.GetString("ErrorValueTooLargeExclusive", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The value {1} is less than the minimum value of {2}.. - /// - internal static string ErrorValueTooSmall { - get { - return ResourceManager.GetString("ErrorValueTooSmall", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The value {1} is less than or equal to the exclusive minimum value of {2}.. - /// - internal static string ErrorValueTooSmallExclusive { - get { - return ResourceManager.GetString("ErrorValueTooSmallExclusive", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to ({0},{1}): error {2}: {3}. - /// - internal static string ErrorWithLineInfo { - get { - return ResourceManager.GetString("ErrorWithLineInfo", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to ({0},{1}): error {2}: at {3}: {4}. - /// - internal static string ErrorWithLineInfoAndPath { - get { - return ResourceManager.GetString("ErrorWithLineInfoAndPath", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The schema requires one of the types [{1}], but a token of type "{2}" was found.. - /// - internal static string ErrorWrongType { - get { - return ResourceManager.GetString("ErrorWrongType", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The schema does not specify a single schema for all array items. Access the per-item schemas through the Schemas property.. - /// - internal static string ExceptionNotASingleSchema { - get { - return ResourceManager.GetString("ExceptionNotASingleSchema", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to An object contains a property not defined by the schema is present, and the schema does not permit additional properties.. - /// - internal static string RuleDescriptionAdditionalPropertiesProhibited { - get { - return ResourceManager.GetString("RuleDescriptionAdditionalPropertiesProhibited", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to An instance does not have all the properties specified in the schema by a property dependency.. - /// - internal static string RuleDescriptionDependentPropertyMissing { - get { - return ResourceManager.GetString("RuleDescriptionDependentPropertyMissing", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The value of the "additionalItems" schema property is neither a Boolean nor a schema.. - /// - internal static string RuleDescriptionInvalidAdditionalItemsType { - get { - return ResourceManager.GetString("RuleDescriptionInvalidAdditionalItemsType", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The value of the "additionalProperties" schema property is neither a boolean nor an object.. - /// - internal static string RuleDescriptionInvalidAdditionalPropertiesType { - get { - return ResourceManager.GetString("RuleDescriptionInvalidAdditionalPropertiesType", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The value of one of the properties of the "dependencies" schema property is either a schema nor an array of strings.. - /// - internal static string RuleDescriptionInvalidDependencyType { - get { - return ResourceManager.GetString("RuleDescriptionInvalidDependencyType", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to A string does not match any of the values specified by the schema's "enum" property.. - /// - internal static string RuleDescriptionInvalidEnumValue { - get { - return ResourceManager.GetString("RuleDescriptionInvalidEnumValue", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The value of the "items" property is neither a schema nor an array of schemas.. - /// - internal static string RuleDescriptionInvalidItemsType { - get { - return ResourceManager.GetString("RuleDescriptionInvalidItemsType", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The value of one of the properties of the "dependencies" schema property is an array which contains an element which is not a string.. - /// - internal static string RuleDescriptionInvalidPropertyDependencyType { - get { - return ResourceManager.GetString("RuleDescriptionInvalidPropertyDependencyType", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The string value of the "type" schema property is not one of the valid values.. - /// - internal static string RuleDescriptionInvalidTypeString { - get { - return ResourceManager.GetString("RuleDescriptionInvalidTypeString", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The value of the "type" schema property is neither a string nor an array of strings.. - /// - internal static string RuleDescriptionInvalidTypeType { - get { - return ResourceManager.GetString("RuleDescriptionInvalidTypeType", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to n instance does not successfully validate against all of the schemas by the schema's "allOf" property.. - /// - internal static string RuleDescriptionNotAllOf { - get { - return ResourceManager.GetString("RuleDescriptionNotAllOf", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to A numeric value is not a multiple of the value specified by the schema's "multipleOf" property.. - /// - internal static string RuleDescriptionNotAMultiple { - get { - return ResourceManager.GetString("RuleDescriptionNotAMultiple", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to An instance does not successfully validate against any of the schemas by the schema's "anyOf" property.. - /// - internal static string RuleDescriptionNotAnyOf { - get { - return ResourceManager.GetString("RuleDescriptionNotAnyOf", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to A schema property that is required to be a string is not a string.. - /// - internal static string RuleDescriptionNotAString { - get { - return ResourceManager.GetString("RuleDescriptionNotAString", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to An instance does not successfully validate against exactly one of the schemas by the schema's "oneOf" property.. - /// - internal static string RuleDescriptionNotOneOf { - get { - return ResourceManager.GetString("RuleDescriptionNotOneOf", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to An array's elements are not unique, as required by the schema's "uniqueItems" property.. - /// - internal static string RuleDescriptionNotUnique { - get { - return ResourceManager.GetString("RuleDescriptionNotUnique", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to A property required by the schema's "required" property is missing.. - /// - internal static string RuleDescriptionRequiredPropertyMissing { - get { - return ResourceManager.GetString("RuleDescriptionRequiredPropertyMissing", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to A string does not match the regular expression pattern specified by the schema's "pattern" property.. - /// - internal static string RuleDescriptionStringDoesNotMatchPattern { - get { - return ResourceManager.GetString("RuleDescriptionStringDoesNotMatchPattern", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to A string is longer than permitted by the schema's "maxLength" property.. - /// - internal static string RuleDescriptionStringTooLong { - get { - return ResourceManager.GetString("RuleDescriptionStringTooLong", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to A string is shorter than permitted by the schema's "minLength" property.. - /// - internal static string RuleDescriptionStringTooShort { - get { - return ResourceManager.GetString("RuleDescriptionStringTooShort", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The schema is not a valid JSON document.. - /// - internal static string RuleDescriptionSyntaxError { - get { - return ResourceManager.GetString("RuleDescriptionSyntaxError", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to An array has fewer elements than permitted by the schema's "minItems" property.. - /// - internal static string RuleDescriptionTooFewArrayItems { - get { - return ResourceManager.GetString("RuleDescriptionTooFewArrayItems", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to An array has more elements than the number of elements in the array specified by the schema's "items" property, and the schema does not permit additional array items.. - /// - internal static string RuleDescriptionTooFewItemSchemas { - get { - return ResourceManager.GetString("RuleDescriptionTooFewItemSchemas", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to An object has fewer properties than permitted by the schema's "minProperties" property.. - /// - internal static string RuleDescriptionTooFewProperties { - get { - return ResourceManager.GetString("RuleDescriptionTooFewProperties", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to An array has more elements than permitted by the schema's "maxItems" property.. - /// - internal static string RuleDescriptionTooManyArrayItems { - get { - return ResourceManager.GetString("RuleDescriptionTooManyArrayItems", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to An object has more properties than permitted by the schema's "maxProperties" property.. - /// - internal static string RuleDescriptionTooManyProperties { - get { - return ResourceManager.GetString("RuleDescriptionTooManyProperties", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to An instance successfully validates against the schema specified by the schema's "not" property.. - /// - internal static string RuleDescriptionValidatesAgainstNotSchema { - get { - return ResourceManager.GetString("RuleDescriptionValidatesAgainstNotSchema", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to A numeric value is greater than the maximum value permitted by the schema's "maximum" property.. - /// - internal static string RuleDescriptionValueTooLarge { - get { - return ResourceManager.GetString("RuleDescriptionValueTooLarge", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to A numeric value is greater than or equal to the exclusive maximum value permitted by the schema's "maximum" and "exclusiveMaximum" properties.. - /// - internal static string RuleDescriptionValueTooLargeExclusive { - get { - return ResourceManager.GetString("RuleDescriptionValueTooLargeExclusive", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to A numeric value is less than the minimum value permitted by the schema's "minimum" property.. - /// - internal static string RuleDescriptionValueTooSmall { - get { - return ResourceManager.GetString("RuleDescriptionValueTooSmall", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to A numeric value is less than or equal to the exclusive minimum value permitted by the schema's "minimum" and "exclusiveMinimum" properties.. - /// - internal static string RuleDescriptionValueTooSmallExclusive { - get { - return ResourceManager.GetString("RuleDescriptionValueTooSmallExclusive", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to An instance has a type that is not permitted by the schema's "type" property.. - /// - internal static string RuleDescriptionWrongType { - get { - return ResourceManager.GetString("RuleDescriptionWrongType", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Success: The file is valid according to the schema.. - /// - internal static string Success { - get { - return ResourceManager.GetString("Success", resourceCulture); - } - } - } -} diff --git a/src/Sarif.Multitool/ValidatorResources.resx b/src/Sarif.Multitool/ValidatorResources.resx deleted file mode 100644 index abaae57a9..000000000 --- a/src/Sarif.Multitool/ValidatorResources.resx +++ /dev/null @@ -1,340 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - {0} version {1} - - - Validation time: {0} - - - The schema does not define a property named "{1}", and the schema does not permit additional properties. - - - This schema does not contain the sub-schema definition referred to by the $ref value "{0}". - - - The schema requires that when property "{1}" is present, properties [{2}] are also present, but properties [{3}] are missing. - - - JSON schema requires the value of "additionalItems" to be either a Boolean or a schema, but a token of type "{1}" was seen. - - - JSON schema requires the value of "additionalProperties" to be either a Boolean or a schema, but a token of type "{1}" was seen. - - - JSON schema requires the value of each property of the "dependencies" object, to be either an schema or an array of strings, but a token of type "{1}" was seen. - - - The value "{1}" does not match any of the enum values [{2}]. - - - JSON schema requires the value of "items" to be either a schema or an array of schemas, but a token of type "{1}" was seen. - - - JSON requires that if the value of a property of the "dependencies" object is an array, then every element of the array must be a string, but a token of type "{1}" was seen. - - - "{1}" is not a valid schema type. - - - JSON schema requires the value of "type" to be either a string or an array of strings, but a token of type "{1}" was seen. - - - at "{{0}}": {0} - - - The instance does not validate successfully against all of the {1} schemas specified by "allOf". - - - The value {1} is not a multiple of {2}. - - - The instance does validate successfully against any of the {1} schemas specified by "anyOf". - - - The property is required to be a string, but the token is of type "{1}". - - - The instance validates successfully against {1} of the {2} schemas specified by "oneOf", instead of validating successfully against exactly one of them. - - - The elements of the array are not unique. - - - This partial implementation of JSON Schema only accepts $ref values in the form of fragments that refer to sub-properties of the "definitions" property, for example "#/definitions/def1". The URI reference"{0}" is not supported. - - - The required property "{1}" is missing. - - - The string "{1}" does not match the regular expression "{2}". - - - The string "{1}" has length {2}, which is greater than the maximum length {3}. - - - - The string "{1}" has length {2}, which is less than the minimum length {3}. - - - JSON syntax error: {1} - - - The schema requires at least {1} array items, but there are {2}. - - - The array has {1} items, but the array of schemas specified by "items" has only {2} items, and "additionalItems" is not specified to allow additional array items. - - - The schema requires at least {1} object properties, but there are {2}. - - - The schema permits at most {1} array items, but there are {2}. - - - The schema permits at most {1} object properties, but there are {2}. - - - The instance validates successfully against the schema specified by "not". - - - The value {1} is greater than the maximum value of {2}. - - - The value {1} is greater than or equal to the exclusive maximum value of {2}. - - - The value {1} is less than the minimum value of {2}. - - - The value {1} is less than or equal to the exclusive minimum value of {2}. - - - ({0},{1}): error {2}: {3} - - - ({0},{1}): error {2}: at {3}: {4} - - - The schema requires one of the types [{1}], but a token of type "{2}" was found. - - - The schema does not specify a single schema for all array items. Access the per-item schemas through the Schemas property. - - - An object contains a property not defined by the schema is present, and the schema does not permit additional properties. - - - An instance does not have all the properties specified in the schema by a property dependency. - - - The value of the "additionalItems" schema property is neither a Boolean nor a schema. - - - The value of the "additionalProperties" schema property is neither a boolean nor an object. - - - The value of one of the properties of the "dependencies" schema property is either a schema nor an array of strings. - - - A string does not match any of the values specified by the schema's "enum" property. - - - The value of the "items" property is neither a schema nor an array of schemas. - - - The value of one of the properties of the "dependencies" schema property is an array which contains an element which is not a string. - - - The string value of the "type" schema property is not one of the valid values. - - - The value of the "type" schema property is neither a string nor an array of strings. - - - n instance does not successfully validate against all of the schemas by the schema's "allOf" property. - - - A numeric value is not a multiple of the value specified by the schema's "multipleOf" property. - - - An instance does not successfully validate against any of the schemas by the schema's "anyOf" property. - - - A schema property that is required to be a string is not a string. - - - An instance does not successfully validate against exactly one of the schemas by the schema's "oneOf" property. - - - An array's elements are not unique, as required by the schema's "uniqueItems" property. - - - A property required by the schema's "required" property is missing. - - - A string does not match the regular expression pattern specified by the schema's "pattern" property. - - - A string is longer than permitted by the schema's "maxLength" property. - - - A string is shorter than permitted by the schema's "minLength" property. - - - The schema is not a valid JSON document. - - - An array has fewer elements than permitted by the schema's "minItems" property. - - - An array has more elements than the number of elements in the array specified by the schema's "items" property, and the schema does not permit additional array items. - - - An object has fewer properties than permitted by the schema's "minProperties" property. - - - An array has more elements than permitted by the schema's "maxItems" property. - - - An object has more properties than permitted by the schema's "maxProperties" property. - - - An instance successfully validates against the schema specified by the schema's "not" property. - - - A numeric value is greater than the maximum value permitted by the schema's "maximum" property. - - - A numeric value is greater than or equal to the exclusive maximum value permitted by the schema's "maximum" and "exclusiveMaximum" properties. - - - A numeric value is less than the minimum value permitted by the schema's "minimum" property. - - - A numeric value is less than or equal to the exclusive minimum value permitted by the schema's "minimum" and "exclusiveMinimum" properties. - - - An instance has a type that is not permitted by the schema's "type" property. - - - Success: The file is valid according to the schema. - - \ No newline at end of file From 4ae6aeb0a3689a6b9799b640aedb7446c456f7a1 Mon Sep 17 00:00:00 2001 From: Larry Golding Date: Tue, 1 Sep 2020 12:43:11 -0700 Subject: [PATCH 5/9] Remove unused NuGet references from Sarif.Multitool. --- src/Sarif.Multitool/Sarif.Multitool.csproj | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/Sarif.Multitool/Sarif.Multitool.csproj b/src/Sarif.Multitool/Sarif.Multitool.csproj index a730bfb87..205dd3320 100644 --- a/src/Sarif.Multitool/Sarif.Multitool.csproj +++ b/src/Sarif.Multitool/Sarif.Multitool.csproj @@ -39,9 +39,6 @@ - - - From a91284f9d8325adc071da8569efaf7ed87a41cb5 Mon Sep 17 00:00:00 2001 From: Larry Golding Date: Tue, 1 Sep 2020 16:32:53 -0700 Subject: [PATCH 6/9] Create WorkItems package; update version number and release history. --- scripts/Projects.psm1 | 3 ++- src/ReleaseHistory.md | 8 ++++++++ src/build.props | 4 ++-- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/scripts/Projects.psm1 b/scripts/Projects.psm1 index 63f8edfde..e36289164 100644 --- a/scripts/Projects.psm1 +++ b/scripts/Projects.psm1 @@ -27,7 +27,8 @@ $Projects.Libraries = @( "Sarif.Converters", "Sarif.Driver", "Sarif.Multitool.Library" - "Sarif.WorkItems" + "Sarif.WorkItems", + "WorkItems" ) $Projects.Applications = @( diff --git a/src/ReleaseHistory.md b/src/ReleaseHistory.md index f8eb91773..828408773 100644 --- a/src/ReleaseHistory.md +++ b/src/ReleaseHistory.md @@ -1,4 +1,12 @@ # SARIF Package Release History (SDK, Driver, Converters, and Multitool) + +## **v2.3.5** [Sdk](https://www.nuget.org/packages/Sarif.Sdk/2.3.5) | [Driver](https://www.nuget.org/packages/Sarif.Driver/2.3.5) | [Converters](https://www.nuget.org/packages/Sarif.Converters/2.3.5) | [Multitool](https://www.nuget.org/packages/Sarif.Multitool/2.3.5) | [Multitool Library](https://www.nuget.org/packages/Sarif.Multitool.Library/2.3.5) +* FEATURE: COMMAND-LINE BREAKING: Validation rule `SARIF2005.ProvideToolProperties` now requires `informationUri`, it allows `dottedQuadFileVersion` to satisfy the requirement that version information be present, and it is configurable. +* FEATURE: COMMAND-LINE BREAKING: The analysis rules that validate a SARIF file's compatibility with the GitHub Developer Security Portal now have rule ids that begin with `DSP` rather than `SARIF`. +* FEATURE: Extract the public APIs from Sarif.Multitool into a new dependency package Sarif.Multitool.Library. Sarif.Multitool remains as a dotnet tool package. +* FEATURE: Validation rule `SARIF2012` now checks for the presence of a friendly name in PascalCase in the `name` property, and is renamed from `ProvideHelpUris` to `ProvideRuleProperties`. +* FEATURE: The Multitool `rewrite` command now accepts `VersionControlInformation` as an argument to the `--insert` option. This argument populates `run.versionControlProvenance`, and it re-expresses all absolute URIs as relative references with respect to the nearest enclosing repository root, if any. + ## **v2.3.4** [Sdk](https://www.nuget.org/packages/Sarif.Sdk/2.3.4) | [Driver](https://www.nuget.org/packages/Sarif.Driver/2.3.4) | [Converters](https://www.nuget.org/packages/Sarif.Converters/2.3.4) | [Multitool](https://www.nuget.org/packages/Sarif.Multitool/2.3.4) * COMMAND-LINE BREAKING: Change `merge` command output directory argument name to `output-directory`. * FEATURE: Add analysis rules appropriate for SARIF files that are to be uploaded to the GitHub Developer Security Portal. diff --git a/src/build.props b/src/build.props index c8cc3263c..86386c2c5 100644 --- a/src/build.props +++ b/src/build.props @@ -20,8 +20,8 @@ having all the relevant values in one place. This property is actually used by the PowerShell script that hides ("delists") the previous package versions on nuget.org. --> - 2.3.4 - 2.3.3 + 2.3.5 + 2.3.4 2.1.0-rtm.5 From 80c9996b2fefeb1a78579a6ec9194c15983b38d4 Mon Sep 17 00:00:00 2001 From: Larry Golding Date: Tue, 1 Sep 2020 16:35:27 -0700 Subject: [PATCH 7/9] Remove unused project references from Multitool project. --- src/Sarif.Multitool/Sarif.Multitool.csproj | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/Sarif.Multitool/Sarif.Multitool.csproj b/src/Sarif.Multitool/Sarif.Multitool.csproj index 205dd3320..e4aee4177 100644 --- a/src/Sarif.Multitool/Sarif.Multitool.csproj +++ b/src/Sarif.Multitool/Sarif.Multitool.csproj @@ -43,10 +43,6 @@ - - - - From 8f631e607576da9ede325c007b62a5da966e61da Mon Sep 17 00:00:00 2001 From: Larry Golding Date: Tue, 1 Sep 2020 17:05:48 -0700 Subject: [PATCH 8/9] Restore NuGet refs because LGTM started failing when I removed them. --- src/Sarif.Multitool/Sarif.Multitool.csproj | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Sarif.Multitool/Sarif.Multitool.csproj b/src/Sarif.Multitool/Sarif.Multitool.csproj index e4aee4177..0e71e2125 100644 --- a/src/Sarif.Multitool/Sarif.Multitool.csproj +++ b/src/Sarif.Multitool/Sarif.Multitool.csproj @@ -39,6 +39,9 @@ + + + From 9413276fa69695087abfac4e3e7fda0d4bbf9ce5 Mon Sep 17 00:00:00 2001 From: Larry Golding Date: Fri, 4 Sep 2020 14:18:32 -0700 Subject: [PATCH 9/9] Address PR feedback. --- src/Nuget/Sarif.Multitool.nuspec | 2 -- .../Sarif.Multitool.Library.csproj | 18 +++++++++++++++++- .../default.configuration.xml | 0 src/Sarif.Multitool/Sarif.Multitool.csproj | 3 --- 4 files changed, 17 insertions(+), 6 deletions(-) rename src/{Sarif.Multitool => Sarif.Multitool.Library}/default.configuration.xml (100%) diff --git a/src/Nuget/Sarif.Multitool.nuspec b/src/Nuget/Sarif.Multitool.nuspec index dee0a3302..06022c974 100644 --- a/src/Nuget/Sarif.Multitool.nuspec +++ b/src/Nuget/Sarif.Multitool.nuspec @@ -56,8 +56,6 @@ /> - - \ No newline at end of file diff --git a/src/Sarif.Multitool.Library/Sarif.Multitool.Library.csproj b/src/Sarif.Multitool.Library/Sarif.Multitool.Library.csproj index 27b6ec50f..4ffa8f56d 100644 --- a/src/Sarif.Multitool.Library/Sarif.Multitool.Library.csproj +++ b/src/Sarif.Multitool.Library/Sarif.Multitool.Library.csproj @@ -1,4 +1,4 @@ - + SARIF Multitool Library @@ -44,6 +44,22 @@ + + + + + + + diff --git a/src/Sarif.Multitool/default.configuration.xml b/src/Sarif.Multitool.Library/default.configuration.xml similarity index 100% rename from src/Sarif.Multitool/default.configuration.xml rename to src/Sarif.Multitool.Library/default.configuration.xml diff --git a/src/Sarif.Multitool/Sarif.Multitool.csproj b/src/Sarif.Multitool/Sarif.Multitool.csproj index 0e71e2125..257480f38 100644 --- a/src/Sarif.Multitool/Sarif.Multitool.csproj +++ b/src/Sarif.Multitool/Sarif.Multitool.csproj @@ -59,9 +59,6 @@ PreserveNewest - - PreserveNewest -