From dd91502f014bf96a185e09cbe0a6f1857ed98268 Mon Sep 17 00:00:00 2001 From: Eddy Nakamura Date: Thu, 15 Oct 2020 17:39:25 -0300 Subject: [PATCH 1/7] Enforcing file normalization --- src/.editorconfig | 6 +++--- src/Samples/Sarif.Sdk.Sample/Program.cs | 3 +++ src/Samples/Sarif.WorkItems.Sample/Program.cs | 2 ++ src/Samples/SarifDeferredSample/Program.cs | 14 ++++++++------ src/Samples/SarifToCsv/CsvWriter.cs | 2 +- src/Samples/SarifToCsv/Program.cs | 2 +- src/Samples/SarifToCsv/SarifCsvColumnWriters.cs | 3 ++- src/Samples/SarifToCsv/SdkExtensions.cs | 2 +- src/Sarif.Converters/AndroidStudioConverter.cs | 2 +- src/Sarif.Converters/ClangAnalyzerConverter.cs | 2 +- .../ContrastSecurityConverter.cs | 4 +++- src/Sarif.Converters/FlawFinderCsvConverter.cs | 5 +++-- src/Sarif.Converters/FortifyFprConverter.cs | 16 ++++++++-------- src/Sarif.Converters/FortifyIssue.cs | 1 - src/Sarif.Converters/FortifyUtilities.cs | 4 ++-- src/Sarif.Converters/FxCopConverter.cs | 2 +- src/Sarif.Converters/GlobalSuppressions.cs | 2 +- src/Sarif.Converters/LogReader.cs | 2 +- src/Sarif.Converters/MSBuildConverter.cs | 2 +- src/Sarif.Converters/Properties/AssemblyInfo.cs | 2 +- src/Sarif.Converters/PylintConverter.cs | 1 + .../PylintObjectModel/PylintLog.cs | 2 +- .../PylintObjectModel/PylintLogReader.cs | 3 ++- src/Sarif.Converters/SparseReader.cs | 2 +- src/Sarif.Converters/TSLintConverter.cs | 1 + src/Sarif.Converters/TSLintLogReader.cs | 2 ++ src/Sarif.Converters/TextFormats/CsvReader.cs | 2 +- src/Sarif.Converters/ToolFileConverterBase.cs | 1 + src/Sarif.Converters/ToolFormatConverter.cs | 2 ++ src/Sarif.Driver/DriverExtensionMethods.cs | 1 + src/Sarif.Driver/DriverUtilities.cs | 3 ++- src/Sarif.Driver/PathExtensions.cs | 2 +- src/Sarif.Driver/Properties/AssemblyInfo.cs | 2 +- src/Sarif.Driver/Sdk/AnalysisApplicability.cs | 2 +- src/Sarif.Driver/Sdk/AnalysisContext.cs | 2 +- src/Sarif.Driver/Sdk/AnalyzeCommandBase.cs | 3 ++- src/Sarif.Driver/Sdk/AnalyzeOptionsBase.cs | 2 +- src/Sarif.Driver/Sdk/CommonOptionsBase.cs | 3 ++- .../Sdk/ExportRulesDocumentationCommandBase.cs | 6 +++--- src/Sarif.Driver/Sdk/MultifileOptionsBase.cs | 1 + src/Sarif.Driver/SemanticVersion.cs | 2 +- .../AbsoluteUriCommand.cs | 2 ++ .../AbsoluteUriOptions.cs | 1 + src/Sarif.Multitool.Library/CommandBase.cs | 2 ++ src/Sarif.Multitool.Library/CommandUtilities.cs | 1 + src/Sarif.Multitool.Library/ConvertCommand.cs | 2 +- src/Sarif.Multitool.Library/ConvertOptions.cs | 3 ++- .../ExportValidationConfigurationCommand.cs | 1 + .../ExportValidationConfigurationOptions.cs | 3 ++- .../ExportValidationDocumentationOptions.cs | 1 + .../ExportValidationRulesMetadataOptions.cs | 1 + .../FileWorkItemsCommand.cs | 4 +++- .../FileWorkItemsOptions.cs | 3 ++- src/Sarif.Multitool.Library/JTokenExtensions.cs | 3 ++- src/Sarif.Multitool.Library/MergeCommand.cs | 2 +- src/Sarif.Multitool.Library/MergeOptions.cs | 7 ++++--- src/Sarif.Multitool.Library/PageCommand.cs | 2 ++ src/Sarif.Multitool.Library/QueryCommand.cs | 1 + src/Sarif.Multitool.Library/RebaseUriCommand.cs | 1 + src/Sarif.Multitool.Library/RebaseUriOptions.cs | 1 + .../ResultMatchSetCommand.cs | 2 ++ .../ResultMatchSetOptions.cs | 1 + .../ResultMatchingCommand.cs | 1 + .../ResultMatchingOptions.cs | 2 ++ src/Sarif.Multitool.Library/RewriteCommand.cs | 2 ++ src/Sarif.Multitool.Library/RewriteOptions.cs | 3 ++- src/Sarif.Multitool.Library/Rules/RuleId.cs | 2 +- .../Rules/SARIF1005.UriMustBeAbsolute.cs | 4 ++-- .../Rules/SARIF1010.RuleIdMustBeConsistent.cs | 10 +++++----- .../Rules/SARIF1011.ReferenceFinalSchema.cs | 2 +- .../Rules/SARIF2004.OptimizeFileSize.cs | 2 +- .../Rules/SARIF2006.UrisShouldBeReachable.cs | 4 ++-- .../Rules/SARIF2008.ProvideSchema.cs | 2 +- .../Rules/SARIF2010.ProvideCodeSnippets.cs | 1 + .../Rules/SarifValidationSkimmerBase.cs | 2 ++ .../SarifValidationContext.cs | 1 + src/Sarif.Multitool.Library/StringExtensions.cs | 1 + src/Sarif.Multitool.Library/TransformCommand.cs | 4 +++- src/Sarif.Multitool.Library/TransformOptions.cs | 3 ++- src/Sarif.Multitool.Library/ValidateCommand.cs | 1 + src/Sarif.Multitool.Library/ValidateOptions.cs | 1 + src/Sarif.Multitool/Properties/AssemblyInfo.cs | 2 +- src/Sarif.WorkItems/SarifWorkItemContext.cs | 8 +++++--- src/Sarif.WorkItems/SarifWorkItemFiler.cs | 6 ++++-- src/Sarif.WorkItems/SarifWorkItemModel.cs | 8 +++++--- src/Sarif.WorkItems/SarifWorkItemsExtensions.cs | 6 +++--- src/Sarif/Autogenerated/Address.cs | 4 +++- .../Autogenerated/AddressEqualityComparer.cs | 3 ++- src/Sarif/Autogenerated/Artifact.cs | 4 +++- src/Sarif/Autogenerated/ArtifactChange.cs | 3 ++- .../ArtifactChangeEqualityComparer.cs | 3 ++- src/Sarif/Autogenerated/ArtifactContent.cs | 3 ++- .../ArtifactContentEqualityComparer.cs | 3 ++- .../Autogenerated/ArtifactEqualityComparer.cs | 3 ++- src/Sarif/Autogenerated/ArtifactLocation.cs | 4 +++- .../ArtifactLocationEqualityComparer.cs | 3 ++- src/Sarif/Autogenerated/ArtifactRoles.cs | 2 +- src/Sarif/Autogenerated/Attachment.cs | 4 +++- .../Autogenerated/AttachmentEqualityComparer.cs | 3 ++- src/Sarif/Autogenerated/BaselineState.cs | 2 +- src/Sarif/Autogenerated/CodeFlow.cs | 3 ++- .../Autogenerated/CodeFlowEqualityComparer.cs | 3 ++- src/Sarif/Autogenerated/ColumnKind.cs | 2 +- .../Autogenerated/ConfigurationOverride.cs | 3 ++- .../ConfigurationOverrideEqualityComparer.cs | 3 ++- src/Sarif/Autogenerated/Conversion.cs | 4 +++- .../Autogenerated/ConversionEqualityComparer.cs | 3 ++- src/Sarif/Autogenerated/Edge.cs | 3 ++- src/Sarif/Autogenerated/EdgeEqualityComparer.cs | 3 ++- src/Sarif/Autogenerated/EdgeTraversal.cs | 3 ++- .../EdgeTraversalEqualityComparer.cs | 3 ++- src/Sarif/Autogenerated/ExceptionData.cs | 4 +++- .../ExceptionDataEqualityComparer.cs | 3 ++- src/Sarif/Autogenerated/ExternalProperties.cs | 4 +++- .../ExternalPropertiesEqualityComparer.cs | 3 ++- .../ExternalPropertyFileReference.cs | 4 +++- ...rnalPropertyFileReferenceEqualityComparer.cs | 3 ++- .../ExternalPropertyFileReferences.cs | 4 +++- ...nalPropertyFileReferencesEqualityComparer.cs | 3 ++- src/Sarif/Autogenerated/FailureLevel.cs | 2 +- src/Sarif/Autogenerated/Fix.cs | 3 ++- src/Sarif/Autogenerated/FixEqualityComparer.cs | 3 ++- src/Sarif/Autogenerated/Graph.cs | 4 +++- .../Autogenerated/GraphEqualityComparer.cs | 3 ++- src/Sarif/Autogenerated/GraphTraversal.cs | 4 +++- .../GraphTraversalEqualityComparer.cs | 3 ++- src/Sarif/Autogenerated/ISarifNode.cs | 2 +- src/Sarif/Autogenerated/Invocation.cs | 4 +++- .../Autogenerated/InvocationEqualityComparer.cs | 3 ++- src/Sarif/Autogenerated/Location.cs | 4 +++- .../Autogenerated/LocationEqualityComparer.cs | 3 ++- src/Sarif/Autogenerated/LocationRelationship.cs | 4 +++- .../LocationRelationshipEqualityComparer.cs | 3 ++- src/Sarif/Autogenerated/LogicalLocation.cs | 4 +++- .../LogicalLocationEqualityComparer.cs | 3 ++- src/Sarif/Autogenerated/Message.cs | 4 +++- .../Autogenerated/MessageEqualityComparer.cs | 3 ++- .../Autogenerated/MultiformatMessageString.cs | 3 ++- .../MultiformatMessageStringEqualityComparer.cs | 3 ++- src/Sarif/Autogenerated/Node.cs | 4 +++- src/Sarif/Autogenerated/NodeEqualityComparer.cs | 3 ++- src/Sarif/Autogenerated/Notification.cs | 4 +++- .../NotificationEqualityComparer.cs | 3 ++- src/Sarif/Autogenerated/PhysicalLocation.cs | 3 ++- .../PhysicalLocationEqualityComparer.cs | 3 ++- src/Sarif/Autogenerated/PropertyBag.cs | 3 ++- .../PropertyBagEqualityComparer.cs | 2 +- src/Sarif/Autogenerated/Rectangle.cs | 3 ++- .../Autogenerated/RectangleEqualityComparer.cs | 3 ++- src/Sarif/Autogenerated/Region.cs | 4 +++- .../Autogenerated/RegionEqualityComparer.cs | 3 ++- src/Sarif/Autogenerated/Replacement.cs | 3 ++- .../ReplacementEqualityComparer.cs | 3 ++- .../Autogenerated/ReportingConfiguration.cs | 4 +++- .../ReportingConfigurationEqualityComparer.cs | 3 ++- src/Sarif/Autogenerated/ReportingDescriptor.cs | 4 +++- .../ReportingDescriptorEqualityComparer.cs | 3 ++- .../ReportingDescriptorReference.cs | 4 +++- ...ortingDescriptorReferenceEqualityComparer.cs | 3 ++- .../ReportingDescriptorRelationship.cs | 4 +++- ...ingDescriptorRelationshipEqualityComparer.cs | 3 ++- src/Sarif/Autogenerated/Result.cs | 4 +++- .../Autogenerated/ResultEqualityComparer.cs | 3 ++- src/Sarif/Autogenerated/ResultKind.cs | 2 +- src/Sarif/Autogenerated/ResultProvenance.cs | 4 +++- .../ResultProvenanceEqualityComparer.cs | 3 ++- src/Sarif/Autogenerated/Run.cs | 4 +++- src/Sarif/Autogenerated/RunAutomationDetails.cs | 3 ++- .../RunAutomationDetailsEqualityComparer.cs | 3 ++- src/Sarif/Autogenerated/RunEqualityComparer.cs | 3 ++- src/Sarif/Autogenerated/SarifLog.cs | 4 +++- .../Autogenerated/SarifLogEqualityComparer.cs | 3 ++- src/Sarif/Autogenerated/SarifNodeKind.cs | 2 +- .../Autogenerated/SarifRewritingVisitor.cs | 2 +- src/Sarif/Autogenerated/SarifVersion.cs | 2 +- src/Sarif/Autogenerated/SpecialLocations.cs | 3 ++- .../SpecialLocationsEqualityComparer.cs | 3 ++- src/Sarif/Autogenerated/Stack.cs | 3 ++- .../Autogenerated/StackEqualityComparer.cs | 3 ++- src/Sarif/Autogenerated/StackFrame.cs | 4 +++- .../Autogenerated/StackFrameEqualityComparer.cs | 3 ++- src/Sarif/Autogenerated/Suppression.cs | 4 +++- .../SuppressionEqualityComparer.cs | 3 ++- src/Sarif/Autogenerated/SuppressionKind.cs | 2 +- src/Sarif/Autogenerated/SuppressionStatus.cs | 2 +- src/Sarif/Autogenerated/ThreadFlow.cs | 3 ++- .../Autogenerated/ThreadFlowEqualityComparer.cs | 3 ++- src/Sarif/Autogenerated/ThreadFlowLocation.cs | 4 +++- .../ThreadFlowLocationEqualityComparer.cs | 3 ++- .../ThreadFlowLocationImportance.cs | 2 +- src/Sarif/Autogenerated/Tool.cs | 4 +++- src/Sarif/Autogenerated/ToolComponent.cs | 4 +++- .../Autogenerated/ToolComponentContents.cs | 2 +- .../ToolComponentEqualityComparer.cs | 3 ++- .../Autogenerated/ToolComponentReference.cs | 4 +++- .../ToolComponentReferenceEqualityComparer.cs | 3 ++- src/Sarif/Autogenerated/ToolEqualityComparer.cs | 3 ++- src/Sarif/Autogenerated/TranslationMetadata.cs | 3 ++- .../TranslationMetadataEqualityComparer.cs | 3 ++- .../Autogenerated/VersionControlDetails.cs | 4 +++- .../VersionControlDetailsEqualityComparer.cs | 3 ++- src/Sarif/Autogenerated/WebRequest.cs | 4 +++- .../Autogenerated/WebRequestEqualityComparer.cs | 3 ++- src/Sarif/Autogenerated/WebResponse.cs | 4 +++- .../WebResponseEqualityComparer.cs | 3 ++- .../DefaultBaseline/CodeFlowBaselineEquals.cs | 2 +- .../DefaultBaseline/ThreadFlowBaselineEquals.cs | 2 +- .../ThreadFlowLocationBaselineEquals.cs | 2 +- .../DataStructures/MatchedResults.cs | 2 +- .../Baseline/ResultMatching/IResultMatcher.cs | 1 + .../IRemappingCalculator.cs | 2 +- .../RemappingCalculators/SarifLogRemapping.cs | 2 +- .../ResultMatchingBaselinerFactory.cs | 1 + src/Sarif/Baseline/V2/WhatComponent.cs | 2 +- src/Sarif/Baseline/V2/WhatMap.cs | 4 ++-- src/Sarif/Baseline/V2/WhereComparer.cs | 2 +- src/Sarif/ConsoleLogger.cs | 2 +- src/Sarif/Core/Artifact.cs | 1 + src/Sarif/Core/CodeFlow.cs | 4 ++-- src/Sarif/Core/IPropertyBagHolder.cs | 2 +- src/Sarif/Core/PropertyBagHolder.cs | 2 ++ src/Sarif/Core/SarifLog.cs | 2 ++ src/Sarif/Core/SerializedPropertyInfo.cs | 1 + src/Sarif/ExtensionMethods.cs | 6 +++--- src/Sarif/ExternalProcess.cs | 2 +- src/Sarif/FileRegionsCache.cs | 2 +- src/Sarif/GlobalSuppressions.cs | 2 +- src/Sarif/IConsoleCapture.cs | 2 +- src/Sarif/IOption.cs | 1 - src/Sarif/IOptionsProvider.cs | 2 +- src/Sarif/IntegerSet.cs | 1 + src/Sarif/NotYetAutoGenerated/Address.cs | 4 +++- src/Sarif/NotYetAutoGenerated/Invocation.cs | 4 +++- .../ReportingConfiguration.cs | 4 +++- .../NotYetAutoGenerated/ReportingDescriptor.cs | 4 +++- src/Sarif/NotYetAutoGenerated/Result.cs | 4 +++- src/Sarif/NotYetAutoGenerated/Run.cs | 4 +++- src/Sarif/NotYetAutoGenerated/SarifLog.cs | 4 +++- src/Sarif/Notes.cs | 2 +- src/Sarif/PerLanguageOption.cs | 2 +- .../Processors/Log/SarifLogExtensionMethods.cs | 4 ++-- src/Sarif/Processors/Log/SarifLogPipeline.cs | 1 + src/Sarif/Properties/AssemblyInfo.cs | 2 +- src/Sarif/PropertiesDictionary.cs | 1 + src/Sarif/Readers/DateTimeConverter.cs | 1 + .../Readers/DeferredDictionaryConverter.cs | 1 + src/Sarif/Readers/DeferredListConverter.cs | 1 + src/Sarif/Readers/EnumConverter.cs | 1 + src/Sarif/Readers/JsonPositionedTextReader.cs | 1 + src/Sarif/Readers/LineMappingStreamReader.cs | 6 +++--- src/Sarif/Readers/PropertyBagConverter.cs | 2 +- src/Sarif/Readers/SarifContractResolver.cs | 1 + .../Readers/SarifDeferredContractResolver.cs | 1 + src/Sarif/Readers/SarifVersionConverter.cs | 1 + src/Sarif/Readers/UriConverter.cs | 3 ++- src/Sarif/RuleUtilities.cs | 2 +- src/Sarif/SplittingStrategy.cs | 2 +- src/Sarif/StringSet.cs | 1 + src/Sarif/TypedPropertiesDictionary.cs | 1 + src/Sarif/TypedPropertiesDictionaryConverter.cs | 1 + src/Sarif/VersionConstants.cs | 2 +- .../Autogenerated/AlgorithmKindVersionOne.cs | 2 +- ...AnnotatedCodeLocationImportanceVersionOne.cs | 2 +- .../AnnotatedCodeLocationKindVersionOne.cs | 2 +- .../AnnotatedCodeLocationVersionOne.cs | 3 ++- ...tedCodeLocationVersionOneEqualityComparer.cs | 2 +- .../Autogenerated/AnnotationVersionOne.cs | 2 +- .../AnnotationVersionOneEqualityComparer.cs | 2 +- .../Autogenerated/BaselineStateVersionOne.cs | 2 +- .../Autogenerated/CodeFlowVersionOne.cs | 2 +- .../CodeFlowVersionOneEqualityComparer.cs | 2 +- .../Autogenerated/ExceptionDataVersionOne.cs | 2 +- .../ExceptionDataVersionOneEqualityComparer.cs | 2 +- .../Autogenerated/FileChangeVersionOne.cs | 2 +- .../FileChangeVersionOneEqualityComparer.cs | 2 +- .../Autogenerated/FileDataVersionOne.cs | 2 +- .../FileDataVersionOneEqualityComparer.cs | 2 +- .../VersionOne/Autogenerated/FixVersionOne.cs | 2 +- .../FixVersionOneEqualityComparer.cs | 2 +- .../FormattedRuleMessageVersionOne.cs | 2 +- ...ttedRuleMessageVersionOneEqualityComparer.cs | 2 +- .../VersionOne/Autogenerated/HashVersionOne.cs | 2 +- .../HashVersionOneEqualityComparer.cs | 2 +- .../Autogenerated/IRuleVersionOneVersionOne.cs | 2 +- .../ISarifNodeVersionOneVersionOne.cs | 2 +- .../Autogenerated/InvocationVersionOne.cs | 2 +- .../InvocationVersionOneEqualityComparer.cs | 2 +- .../Autogenerated/LocationVersionOne.cs | 2 +- .../LocationVersionOneEqualityComparer.cs | 2 +- .../Autogenerated/LogicalLocationVersionOne.cs | 2 +- ...LogicalLocationVersionOneEqualityComparer.cs | 2 +- .../NotificationLevelVersionOne.cs | 2 +- .../Autogenerated/NotificationVersionOne.cs | 2 +- .../NotificationVersionOneEqualityComparer.cs | 2 +- .../Autogenerated/PhysicalLocationVersionOne.cs | 2 +- ...hysicalLocationVersionOneEqualityComparer.cs | 2 +- .../Autogenerated/RegionVersionOne.cs | 2 +- .../RegionVersionOneEqualityComparer.cs | 2 +- .../Autogenerated/ReplacementVersionOne.cs | 2 +- .../ReplacementVersionOneEqualityComparer.cs | 2 +- .../Autogenerated/ResultLevelVersionOne.cs | 2 +- .../Autogenerated/ResultVersionOne.cs | 2 +- .../ResultVersionOneEqualityComparer.cs | 2 +- .../RuleConfigurationVersionOne.cs | 2 +- .../VersionOne/Autogenerated/RuleVersionOne.cs | 2 +- .../RuleVersionOneEqualityComparer.cs | 2 +- .../VersionOne/Autogenerated/RunVersionOne.cs | 2 +- .../RunVersionOneEqualityComparer.cs | 2 +- .../Autogenerated/SarifLogVersionOne.cs | 2 +- .../SarifLogVersionOneEqualityComparer.cs | 2 +- .../SarifNodeKindVersionOneVersionOne.cs | 2 +- .../SarifRewritingVisitorVersionOne.cs | 2 +- .../Autogenerated/SarifVersionVersionOne.cs | 2 +- .../Autogenerated/StackFrameVersionOne.cs | 2 +- .../StackFrameVersionOneEqualityComparer.cs | 2 +- .../VersionOne/Autogenerated/StackVersionOne.cs | 2 +- .../StackVersionOneEqualityComparer.cs | 2 +- .../SuppressionStatesVersionOne.cs | 2 +- .../Autogenerated/TaintKindVersionOne.cs | 2 +- .../VersionOne/Autogenerated/ToolVersionOne.cs | 2 +- .../ToolVersionOneEqualityComparer.cs | 2 +- .../Core/IPropertyBagHolderVersionOne.cs | 2 +- .../Core/PropertyBagHolderVersionOne.cs | 2 ++ .../Readers/AnnotatedCodeLocationIdConverter.cs | 1 + .../Readers/SarifContractResolverVersionOne.cs | 2 ++ .../VersionOne/SarifUtilitiesVersionOne.cs | 1 + src/Sarif/Visitors/FilteringVisitor.cs | 1 - src/Sarif/Visitors/PartitioningVisitor.cs | 2 +- .../Visitors/SarifCurrentToVersionOneVisitor.cs | 2 ++ src/Sarif/Visitors/SarifTransformerUtilities.cs | 4 +++- .../Visitors/SarifVersionOneToCurrentVisitor.cs | 2 ++ src/Sarif/Visitors/UnknownEncodingException.cs | 2 +- .../UpdateIndicesFromLegacyDataVisitor.cs | 2 +- ...alLocationKeyToLogicalLocationDataVisitor.cs | 1 + src/Sarif/Warnings.cs | 2 +- .../PrereleaseCompatibilityTransformer.cs | 4 +++- src/Sarif/Writers/ResultLogJsonWriter.cs | 3 ++- src/Sarif/Writers/SarifLogger.cs | 3 ++- src/Sarif/Writers/SarifOneZeroZeroLogger.cs | 2 ++ src/Sarif/Writers/SarifPartitioner.cs | 1 + src/Shared/CommonAssemblyInfo.cs | 1 - .../BaseliningDetailLogger.cs | 2 +- .../Extensions/ResultTextFormatter.cs | 2 +- src/Test.EndToEnd.Baselining/Program.cs | 4 ++-- .../DefaultObjectPopulatingVisitor.cs | 3 ++- .../Multitool/ValidateCommandTests.cs | 4 ++-- .../MultitoolCommandLineTests.cs | 2 ++ .../PropertyBagConverterTests.cs | 3 +++ .../SarifConverterTests.cs | 3 +++ .../SarifLogEqualityComparerTests.cs | 4 ++++ .../SarifValidatorTests.cs | 4 ++++ .../Writers/FilterByPredicateTests.cs | 3 +++ .../Writers/PartitionTests.cs | 4 ++++ .../FortifyFpr/src/ContentFileViewModel.cs | 2 +- .../ContentFileHandlingController.cs | 2 +- .../FortifyFpr/src/DocumentValidator.cs | 2 +- .../TestWorkItemModelTransformer.cs | 1 + .../AndroidStudioConverterTests.cs | 2 ++ .../AndroidStudioProblemTests.cs | 3 +++ .../AndroidStudioStringsTests.cs | 1 + .../BuiltinConverterFactoryTests.cs | 2 ++ .../ClangAnalyzerConverterTests.cs | 8 ++------ .../ConverterTestsBase.cs | 2 ++ .../CppCheckConverterTests.cs | 3 +++ .../CppCheckErrorTests.cs | 2 ++ .../CppCheckLocationTests.cs | 2 ++ .../CppCheckStringsTests.cs | 1 + .../FlawFinderCsvConverterTests.cs | 4 ++++ .../FortifyConverterTests.cs | 2 ++ .../FortifyFprConverterTests.cs | 2 ++ .../FortifyFprStringsTests.cs | 1 + .../FortifyIssueTests.cs | 2 ++ .../FortifyPathElementTests.cs | 1 + .../FortifyStringsTests.cs | 1 + .../FxCopConverterTests.cs | 2 ++ .../PylintConverterTests.cs | 4 ++++ .../TSLintConverterTests.cs | 4 ++++ .../TSLintLogReaderTests.cs | 4 ++++ .../ToolFileConverterBaseTests.cs | 2 ++ .../ToolFormatConverterTests.cs | 3 +++ .../DriverExtensionMethodsTests.cs | 3 +++ .../DriverUtilitiesTests.cs | 3 +++ .../FileSpecifierTests.cs | 2 ++ .../FunctionlessTestRule.cs | 1 + .../Sdk/AnalyzeCommandBaseTests.cs | 7 ++++++- .../Sdk/DriverSdkExtensionsTests.cs | 3 +++ .../Sdk/EntryPointUtilitiesTests.cs | 1 + .../Sdk/ExportConfigurationCommandBaseTests.cs | 1 + .../Sdk/FormatForVisualStudioTests.cs | 3 +++ .../Sdk/RuleUtilitiesTests.cs | 2 ++ .../Sdk/SarifLoggerTests.cs | 3 +++ .../Sdk/SkimmerBaseTests.cs | 3 +++ .../Sdk/TestSkimmerBase.cs | 1 + .../SkimmerIdComparerTests.cs | 2 ++ src/Test.UnitTests.Sarif.Driver/TestRule.cs | 2 ++ .../TestRuleBehaviors.cs | 2 +- .../ConvertCommandTests.cs | 6 +++++- ...tValidationRulesDocumentationCommandTests.cs | 5 ++++- .../GenericCommandTests.cs | 1 + .../MergeCommandTests.cs | 3 +++ .../PageCommandTests.cs | 4 ++++ .../QueryCommandTests.cs | 2 ++ .../RebaseUriCommandTests.cs | 11 ++++++----- .../Rules/SarifValidationSkimmerBaseTests.cs | 3 +++ .../TransformCommandTests.cs | 5 +++++ .../ValidateCommandTests.cs | 4 ++++ .../FileWorkItemsCommandTests.cs | 2 ++ .../SarifWorkItemExtensionsTests.cs | 11 +++++++---- .../SarifWorkItemFilerTests.cs | 16 +++++++++++----- .../SarifWorkItemFilingContextTests.cs | 3 +++ .../SarifWorkItemModelTests.cs | 2 ++ .../Baseline/DefaultBaselineUnitTests.cs | 2 ++ .../FullFingerprintMatcherTests.cs | 2 ++ .../IdenticalResultMatcherTests.cs | 2 ++ .../ContextRegionResultMatcherTests.cs | 2 ++ .../PartialFingerprintResultMatcherTests.cs | 2 ++ .../ResultMatchingBaselinerTests.cs | 2 ++ .../SarifLogResultMatcherTests.cs | 2 ++ .../Baseline/StrictBaselineUnitTests.cs | 2 ++ .../Baseline2/ExtractedResultTests.cs | 3 +++ .../Baseline2/OverallBaseliningTests.cs | 1 + .../Baseline2/TrustMapTests.cs | 2 ++ .../Baseline2/WhatComparerTests.cs | 3 +++ .../Baseline2/WhereComparerTests.cs | 3 +++ src/Test.UnitTests.Sarif/CacheTests.cs | 1 + src/Test.UnitTests.Sarif/ConsoleLoggerTests.cs | 3 +++ .../Core/ArtifactLocationTests.cs | 3 +++ src/Test.UnitTests.Sarif/Core/ArtifactTests.cs | 7 ++++++- .../Core/FileLocationTests.cs | 2 ++ .../Core/InvocationTests.cs | 2 ++ src/Test.UnitTests.Sarif/Core/LocationTests.cs | 2 ++ .../Core/PropertyBagHolderTests.cs | 4 ++++ src/Test.UnitTests.Sarif/Core/RegionTests.cs | 4 +++- src/Test.UnitTests.Sarif/Core/ResultTests.cs | 2 ++ src/Test.UnitTests.Sarif/Core/RunTests.cs | 4 ++++ src/Test.UnitTests.Sarif/Core/SarifLogTests.cs | 2 ++ src/Test.UnitTests.Sarif/Core/StackTests.cs | 3 +++ src/Test.UnitTests.Sarif/Core/TagsTests.cs | 2 ++ src/Test.UnitTests.Sarif/Core/ToolTests.cs | 2 ++ .../Core/WebMessageUtilitiesTests.cs | 3 +++ .../Core/WebRequestTests.cs | 5 ++++- .../Core/WebResponseTests.cs | 3 +++ src/Test.UnitTests.Sarif/ExtensionsTests.cs | 3 +++ .../FileRegionsCacheTests.cs | 2 ++ src/Test.UnitTests.Sarif/GitHelperTests.cs | 3 +++ src/Test.UnitTests.Sarif/JsonTests.cs | 4 +++- .../Map/JsonMapBuilderTests.cs | 1 + .../Map/LongArrayDeltaConverterTests.cs | 2 ++ src/Test.UnitTests.Sarif/MockFactory.cs | 1 + .../OrderSensitiveValueComparisonListTests.cs | 4 +++- .../GenericTests/GenericProcessorTests.cs | 2 ++ .../Log/LogPipelineSerializationTests.cs | 3 +++ .../Processors/Log/MergeStageTests.cs | 2 ++ .../Processors/Log/RebaseUriStageTests.cs | 2 ++ .../Processors/Log/SarifLogExtensionTests.cs | 3 +++ .../PropertiesDictionaryTests.cs | 2 ++ .../Query/EvaluatorTests.cs | 2 ++ .../Query/StringSliceTests.cs | 2 ++ .../RandomSarifLogGenerator.cs | 1 + .../Readers/DeferredCollectionsTests.cs | 3 +++ .../Readers/EnumConverterTests.cs | 2 +- .../IsSuppressedInSourceConverterTests.cs | 3 +++ .../Readers/LineMappingStreamReaderTests.cs | 3 +++ .../Readers/PropertyBagConverterTests.cs | 3 +++ .../Readers/ResultDiffingVisitorTests.cs | 1 + .../Readers/SampleModel/LogModel.cs | 1 + src/Test.UnitTests.Sarif/RoundTrippingTests.cs | 3 +++ .../SarifExtensionsTests.cs | 3 ++- src/Test.UnitTests.Sarif/SarifUtilitiesTests.cs | 8 ++++---- src/Test.UnitTests.Sarif/ToolFormatTests.cs | 1 + src/Test.UnitTests.Sarif/UriConverterTests.cs | 4 ++++ ...xtractAllArtifactionLocationsVisitorTests.cs | 3 +++ .../Visitors/GitHubIngestionVisitorTests.cs | 1 + .../Visitors/InsertOptionalDataVisitorTests.cs | 5 ++++- .../Visitors/MakeUriAbsoluteVisitorTest.cs | 2 ++ .../PerRunPerRuleSplittingVisitorTests.cs | 3 +++ .../Visitors/RebaseUriVisitorTests.cs | 4 ++++ .../Visitors/RemapIndicesVisitorTests.cs | 12 ++++++------ .../Visitors/RemoveOptionalDataVisitorTests.cs | 6 ++++-- .../SarifCurrentToVersionOneVisitorTests.cs | 4 +++- .../SarifVersionOneToCurrentVisitorTests.cs | 2 ++ .../UpdateIndicesFromLegacyDataVisitorTests.cs | 2 ++ src/Test.UnitTests.Sarif/WarningsTests.cs | 1 + .../Writers/MimeTypeTests.cs | 1 + .../PrereleaseCompatibilityTransformerTests.cs | 2 ++ .../Writers/ResultLogJsonWriterTests.cs | 3 +++ .../Writers/SarifConsolidatorTests.cs | 2 ++ .../Writers/SarifLoggerTests.cs | 4 ++++ .../FilingClientFactoryTests.cs | 2 ++ ...licationInsightsTelemetryInitializerTests.cs | 3 +++ .../Logging/MetricsLogValuesTests.cs | 3 +++ .../ServiceProviderFactoryTests.cs | 2 ++ src/Test.Utilities.Sarif/AssertionExtensions.cs | 2 ++ .../FileDiffingFunctionalTests.cs | 1 + .../FileDiffingUnitTests.cs | 4 ++++ src/Test.Utilities.Sarif/TestData.cs | 3 ++- src/Test.Utilities.Sarif/TestMessageLogger.cs | 2 +- src/Test.Utilities.Sarif/Utilities.cs | 2 ++ src/WorkItems/AzureDevOpsFilingClient.cs | 2 ++ src/WorkItems/FilingClient.cs | 3 ++- src/WorkItems/GitHubClientWrapper.cs | 3 ++- src/WorkItems/GitHubConnectionFacade.cs | 4 +++- src/WorkItems/GitHubFilingClient.cs | 3 ++- src/WorkItems/IGitHubClientWrapper.cs | 5 +++-- src/WorkItems/IGitHubConnection.cs | 5 +++-- src/WorkItems/IVssConnection.cs | 4 ++-- src/WorkItems/IWorkItemModelTransformer.cs | 2 +- src/WorkItems/IWorkItemTrackingHttpClient.cs | 17 +++++++++-------- .../ApplicationInsightsTelemetryInitializer.cs | 1 + src/WorkItems/Logging/AssemblyExtensions.cs | 1 + src/WorkItems/Logging/LoggerExtensions.cs | 13 +++++++------ src/WorkItems/Logging/LoggingContext.cs | 1 + src/WorkItems/Logging/MetricsLogValues.cs | 1 + src/WorkItems/Properties/AssemblyInfo.cs | 2 +- src/WorkItems/ServiceProviderFactory.cs | 1 + src/WorkItems/VssConnectionFacade.cs | 3 ++- .../WorkItemTrackingHttpClientWrapper.cs | 11 ++++++----- 517 files changed, 1036 insertions(+), 410 deletions(-) diff --git a/src/.editorconfig b/src/.editorconfig index 1ebd304f9..5f8e22132 100644 --- a/src/.editorconfig +++ b/src/.editorconfig @@ -13,13 +13,13 @@ tab_width = 4 # New line preferences end_of_line = crlf -insert_final_newline = false +insert_final_newline = true #### .NET Coding Conventions #### # Organize usings -dotnet_separate_import_directive_groups = true:error -dotnet_sort_system_directives_first = true:error +dotnet_separate_import_directive_groups = true +dotnet_sort_system_directives_first = true # this. and Me. preferences dotnet_style_qualification_for_field = true:silent diff --git a/src/Samples/Sarif.Sdk.Sample/Program.cs b/src/Samples/Sarif.Sdk.Sample/Program.cs index 6059af015..815297063 100644 --- a/src/Samples/Sarif.Sdk.Sample/Program.cs +++ b/src/Samples/Sarif.Sdk.Sample/Program.cs @@ -5,9 +5,12 @@ using System.Collections.Generic; using System.IO; using System.Text; + using CommandLine; + using Microsoft.CodeAnalysis.Sarif; using Microsoft.CodeAnalysis.Sarif.Writers; + using Newtonsoft.Json; namespace Sarif.Sdk.Sample diff --git a/src/Samples/Sarif.WorkItems.Sample/Program.cs b/src/Samples/Sarif.WorkItems.Sample/Program.cs index 1f156969f..57f98f194 100644 --- a/src/Samples/Sarif.WorkItems.Sample/Program.cs +++ b/src/Samples/Sarif.WorkItems.Sample/Program.cs @@ -5,9 +5,11 @@ using System.Collections.Generic; using System.Diagnostics; using System.IO; + using Microsoft.CodeAnalysis.Sarif; using Microsoft.CodeAnalysis.Sarif.Baseline; using Microsoft.CodeAnalysis.Sarif.WorkItemFiling; + using Newtonsoft.Json; namespace Sarif.WorkItems.Sample diff --git a/src/Samples/SarifDeferredSample/Program.cs b/src/Samples/SarifDeferredSample/Program.cs index 549265427..3b2fd3022 100644 --- a/src/Samples/SarifDeferredSample/Program.cs +++ b/src/Samples/SarifDeferredSample/Program.cs @@ -1,10 +1,12 @@ -using Microsoft.CodeAnalysis.Sarif; -using Microsoft.CodeAnalysis.Sarif.Readers; -using Newtonsoft.Json; -using System; +using System; using System.Diagnostics; using System.IO; +using Microsoft.CodeAnalysis.Sarif; +using Microsoft.CodeAnalysis.Sarif.Readers; + +using Newtonsoft.Json; + namespace SarifDeferredSample { /// @@ -18,7 +20,7 @@ private static void Main(string[] args) { bool deferred = bool.Parse(args[0]); string filePath = args[1]; - + SarifLog log = null; Console.WriteLine($"Loading {filePath}{(deferred ? " (deferred)" : "")}..."); @@ -85,7 +87,7 @@ private static void Main(string[] args) // uriLengthTotal += file?.ArtifactLocation?.Uri?.OriginalString?.Length ?? 0; // fileCount++; //} - } + } return $"Enumerated {fileCount:n0} Files, URI total {uriLengthTotal / BytesPerMB:n0}MB."; }); diff --git a/src/Samples/SarifToCsv/CsvWriter.cs b/src/Samples/SarifToCsv/CsvWriter.cs index 1bb51450a..d705910cc 100644 --- a/src/Samples/SarifToCsv/CsvWriter.cs +++ b/src/Samples/SarifToCsv/CsvWriter.cs @@ -193,4 +193,4 @@ public void Dispose() } } } -} \ No newline at end of file +} diff --git a/src/Samples/SarifToCsv/Program.cs b/src/Samples/SarifToCsv/Program.cs index 57dfe4948..40b26b444 100644 --- a/src/Samples/SarifToCsv/Program.cs +++ b/src/Samples/SarifToCsv/Program.cs @@ -150,4 +150,4 @@ private static string ValueOrDefault(string value, string defaultValue) return String.IsNullOrEmpty(value) ? defaultValue : value; } } -} \ No newline at end of file +} diff --git a/src/Samples/SarifToCsv/SarifCsvColumnWriters.cs b/src/Samples/SarifToCsv/SarifCsvColumnWriters.cs index bbd43c48e..9344a33d2 100644 --- a/src/Samples/SarifToCsv/SarifCsvColumnWriters.cs +++ b/src/Samples/SarifToCsv/SarifCsvColumnWriters.cs @@ -7,6 +7,7 @@ using System.Text; using Microsoft.CodeAnalysis.Sarif; + using Newtonsoft.Json; namespace SarifToCsv @@ -67,7 +68,7 @@ public static Action GetWriter(string columnName) { value = ""; } - + c.Writer.Write(value); }; } diff --git a/src/Samples/SarifToCsv/SdkExtensions.cs b/src/Samples/SarifToCsv/SdkExtensions.cs index ba85d7bea..285c54145 100644 --- a/src/Samples/SarifToCsv/SdkExtensions.cs +++ b/src/Samples/SarifToCsv/SdkExtensions.cs @@ -43,4 +43,4 @@ public static string FileUri(this ArtifactLocation artifactLocation, Run run) } } } -} \ No newline at end of file +} diff --git a/src/Sarif.Converters/AndroidStudioConverter.cs b/src/Sarif.Converters/AndroidStudioConverter.cs index 1661f0574..cbba397a4 100644 --- a/src/Sarif.Converters/AndroidStudioConverter.cs +++ b/src/Sarif.Converters/AndroidStudioConverter.cs @@ -278,4 +278,4 @@ private static bool RemoveBadRoot(string path, out Uri uri) return removedBadRoot; } } -} \ No newline at end of file +} diff --git a/src/Sarif.Converters/ClangAnalyzerConverter.cs b/src/Sarif.Converters/ClangAnalyzerConverter.cs index ddf8581b8..e28ef8e53 100644 --- a/src/Sarif.Converters/ClangAnalyzerConverter.cs +++ b/src/Sarif.Converters/ClangAnalyzerConverter.cs @@ -443,4 +443,4 @@ private static class ClangSchemaStrings public const string VersionName = "version"; } } -} \ No newline at end of file +} diff --git a/src/Sarif.Converters/ContrastSecurityConverter.cs b/src/Sarif.Converters/ContrastSecurityConverter.cs index 05c66b870..d9868d219 100644 --- a/src/Sarif.Converters/ContrastSecurityConverter.cs +++ b/src/Sarif.Converters/ContrastSecurityConverter.cs @@ -11,7 +11,9 @@ using System.Text; using System.Text.RegularExpressions; using System.Xml; + using Microsoft.CodeAnalysis.Sarif.Writers; + using Newtonsoft.Json; using Newtonsoft.Json.Linq; @@ -1684,4 +1686,4 @@ private void ReadProps(SparseReader reader, object parent) _readingProps = false; } } -} \ No newline at end of file +} diff --git a/src/Sarif.Converters/FlawFinderCsvConverter.cs b/src/Sarif.Converters/FlawFinderCsvConverter.cs index 168d652c3..901664f0a 100644 --- a/src/Sarif.Converters/FlawFinderCsvConverter.cs +++ b/src/Sarif.Converters/FlawFinderCsvConverter.cs @@ -6,6 +6,7 @@ using System.Globalization; using System.IO; using System.Linq; + using CsvHelper; namespace Microsoft.CodeAnalysis.Sarif.Converters @@ -26,7 +27,7 @@ public override void Convert(Stream input, IResultLogWriter output, OptionallyEm IList flawFinderCsvResults = csvReader.GetRecords().ToList(); - IList rules = ExtractRules(flawFinderCsvResults); + IList rules = ExtractRules(flawFinderCsvResults); IList results = ExtractResults(flawFinderCsvResults); var run = new Run @@ -134,6 +135,6 @@ private static Region RegionFromFlawFinderCsvResult(FlawFinderCsvResult flawFind }; private static FailureLevel SarifLevelFromFlawFinderLevel(int flawFinderLevel) => - flawFinderLevel< 4 ? FailureLevel.Warning : FailureLevel.Error; + flawFinderLevel < 4 ? FailureLevel.Warning : FailureLevel.Error; } } diff --git a/src/Sarif.Converters/FortifyFprConverter.cs b/src/Sarif.Converters/FortifyFprConverter.cs index ad190d57d..ab9b7baa5 100644 --- a/src/Sarif.Converters/FortifyFprConverter.cs +++ b/src/Sarif.Converters/FortifyFprConverter.cs @@ -32,7 +32,7 @@ internal class FortifyFprConverter : ToolFileConverterBase "LastTraceLocation.file", "LastTraceLocation.line", "PrimaryCall.name", - "PrimaryLocation.file", + "PrimaryLocation.file", "PrimaryLocation.line", "PrimaryTransitionFunction.name", "SinkFunction", @@ -600,7 +600,7 @@ private string NormalizeGuid(string guid) private static string RemoveSpaces(string ruleComponent) { - Tuple[] lowercasedTokens = new [] + Tuple[] lowercasedTokens = new[] { new Tuple(" in ", " In "), new Tuple(" true ", " True "), @@ -608,10 +608,10 @@ private static string RemoveSpaces(string ruleComponent) new Tuple(" against ", " Against "), }; - foreach(Tuple lowercasedToken in lowercasedTokens) + foreach (Tuple lowercasedToken in lowercasedTokens) { ruleComponent = ruleComponent.Replace(lowercasedToken.Item1, lowercasedToken.Item2); - } + } return ruleComponent.Replace(" ", ""); } @@ -1009,7 +1009,7 @@ private void ParseRuleDescriptions() private void ParseEngineVersion() { - _engineVersion = _reader.ReadElementContentAsString(); + _engineVersion = _reader.ReadElementContentAsString(); } private void ParseNodes() @@ -1195,7 +1195,7 @@ private void ParseCommandLine() _invocation.CommandLine = sb.ToString(); } - + private void ParseErrors() { // Despite being expressed as XML elements named , these messages @@ -1326,7 +1326,7 @@ private void AddMessagesToResult(Result result) else { // Replace the token with plain text. - messageText = messageText.Replace(string.Format(ReplacementTokenFormat, key), "'"+ value + "'"); + messageText = messageText.Replace(string.Format(ReplacementTokenFormat, key), "'" + value + "'"); } } } @@ -1417,4 +1417,4 @@ public Node(ThreadFlowLocation tfl, string snippetId) } } } -} \ No newline at end of file +} diff --git a/src/Sarif.Converters/FortifyIssue.cs b/src/Sarif.Converters/FortifyIssue.cs index 3068f8520..fbc8479b5 100644 --- a/src/Sarif.Converters/FortifyIssue.cs +++ b/src/Sarif.Converters/FortifyIssue.cs @@ -228,4 +228,3 @@ public static ImmutableArray ParseCweIds(string cweIdSource) } } } - diff --git a/src/Sarif.Converters/FortifyUtilities.cs b/src/Sarif.Converters/FortifyUtilities.cs index 08e155960..eb0fece86 100644 --- a/src/Sarif.Converters/FortifyUtilities.cs +++ b/src/Sarif.Converters/FortifyUtilities.cs @@ -47,10 +47,10 @@ internal static string ParseFormattedContentText(string content) content = Regex.Replace(content, pattern, FormattedTextReplacements[pattern], RegexOptions.Compiled); } - foreach(Match match in s_replaceKeyRegex.Matches(content)) + foreach (Match match in s_replaceKeyRegex.Matches(content)) { string key = match.Groups[1].Value; - content = content.Replace(string.Format(ReplacementTokenFormat, key), "{"+ key + "}"); + content = content.Replace(string.Format(ReplacementTokenFormat, key), "{" + key + "}"); } return content.Trim(new[] { '\r', '\n', ' ' }); diff --git a/src/Sarif.Converters/FxCopConverter.cs b/src/Sarif.Converters/FxCopConverter.cs index 01864effa..877b38f20 100644 --- a/src/Sarif.Converters/FxCopConverter.cs +++ b/src/Sarif.Converters/FxCopConverter.cs @@ -1083,4 +1083,4 @@ internal static string MakeExceptionMessage(string kind, string checkId, string } } } -} \ No newline at end of file +} diff --git a/src/Sarif.Converters/GlobalSuppressions.cs b/src/Sarif.Converters/GlobalSuppressions.cs index 78e9fef10..8d9d96d49 100644 --- a/src/Sarif.Converters/GlobalSuppressions.cs +++ b/src/Sarif.Converters/GlobalSuppressions.cs @@ -7,4 +7,4 @@ [module: SuppressMessage("Microsoft.Security.Xml", "CA3053:UseXmlSecureResolver", Scope = "member", Target = "Microsoft.CodeAnalysis.Sarif.Converters.FortifyFprConverter.#ParseAuditStream(System.IO.Stream)")] [module: SuppressMessage("Microsoft.Security.Xml", "CA3053:UseXmlSecureResolver", Scope = "member", Target = "Microsoft.CodeAnalysis.Sarif.Converters.FxCopLogReader.#Read(Microsoft.CodeAnalysis.Sarif.Converters.FxCopLogReader+Context,System.IO.Stream)")] [module: SuppressMessage("Microsoft.Security.Xml", "CA3053:UseXmlSecureResolver", Scope = "member", Target = "Microsoft.CodeAnalysis.Sarif.Converters.PREfastConverter.#Convert(System.IO.Stream,Microsoft.CodeAnalysis.Sarif.IResultLogWriter,Microsoft.CodeAnalysis.Sarif.Writers.LoggingOptions)")] -[module: SuppressMessage("Microsoft.Security.Xml", "CA3053:UseXmlSecureResolver", Scope = "member", Target = "Microsoft.CodeAnalysis.Sarif.Converters.SparseReader.#CreateFromStream(Microsoft.CodeAnalysis.Sarif.Converters.SparseReaderDispatchTable,System.IO.Stream,System.Xml.Schema.XmlSchemaSet)")] \ No newline at end of file +[module: SuppressMessage("Microsoft.Security.Xml", "CA3053:UseXmlSecureResolver", Scope = "member", Target = "Microsoft.CodeAnalysis.Sarif.Converters.SparseReader.#CreateFromStream(Microsoft.CodeAnalysis.Sarif.Converters.SparseReaderDispatchTable,System.IO.Stream,System.Xml.Schema.XmlSchemaSet)")] diff --git a/src/Sarif.Converters/LogReader.cs b/src/Sarif.Converters/LogReader.cs index 377cdc5ff..cff8d054a 100644 --- a/src/Sarif.Converters/LogReader.cs +++ b/src/Sarif.Converters/LogReader.cs @@ -20,4 +20,4 @@ public TLog ReadLog(string input, Encoding encoding) public abstract TLog ReadLog(Stream input); } -} \ No newline at end of file +} diff --git a/src/Sarif.Converters/MSBuildConverter.cs b/src/Sarif.Converters/MSBuildConverter.cs index e27b546e7..63f4b5396 100644 --- a/src/Sarif.Converters/MSBuildConverter.cs +++ b/src/Sarif.Converters/MSBuildConverter.cs @@ -287,4 +287,4 @@ private static Region GetRegionFrom(string regionString) return region; } } -} \ No newline at end of file +} diff --git a/src/Sarif.Converters/Properties/AssemblyInfo.cs b/src/Sarif.Converters/Properties/AssemblyInfo.cs index f14fe0b91..3fd1bec8e 100644 --- a/src/Sarif.Converters/Properties/AssemblyInfo.cs +++ b/src/Sarif.Converters/Properties/AssemblyInfo.cs @@ -1,2 +1,2 @@ // Copyright (c) Microsoft. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. \ No newline at end of file +// Licensed under the MIT license. See LICENSE file in the project root for full license information. diff --git a/src/Sarif.Converters/PylintConverter.cs b/src/Sarif.Converters/PylintConverter.cs index 9d65b4aa0..fcca17e42 100644 --- a/src/Sarif.Converters/PylintConverter.cs +++ b/src/Sarif.Converters/PylintConverter.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.IO; + using Microsoft.CodeAnalysis.Sarif.Converters.PylintObjectModel; namespace Microsoft.CodeAnalysis.Sarif.Converters diff --git a/src/Sarif.Converters/PylintObjectModel/PylintLog.cs b/src/Sarif.Converters/PylintObjectModel/PylintLog.cs index 48a50b5e8..9761a5b9d 100644 --- a/src/Sarif.Converters/PylintObjectModel/PylintLog.cs +++ b/src/Sarif.Converters/PylintObjectModel/PylintLog.cs @@ -8,4 +8,4 @@ namespace Microsoft.CodeAnalysis.Sarif.Converters.PylintObjectModel public class PylintLog : List { } -} \ No newline at end of file +} diff --git a/src/Sarif.Converters/PylintObjectModel/PylintLogReader.cs b/src/Sarif.Converters/PylintObjectModel/PylintLogReader.cs index c6f36b08a..f1c6cd677 100644 --- a/src/Sarif.Converters/PylintObjectModel/PylintLogReader.cs +++ b/src/Sarif.Converters/PylintObjectModel/PylintLogReader.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.IO; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.Converters.PylintObjectModel @@ -20,4 +21,4 @@ public override PylintLog ReadLog(Stream input) return JsonConvert.DeserializeObject(pylintText); } } -} \ No newline at end of file +} diff --git a/src/Sarif.Converters/SparseReader.cs b/src/Sarif.Converters/SparseReader.cs index c3a964eb6..a9515d5d7 100644 --- a/src/Sarif.Converters/SparseReader.cs +++ b/src/Sarif.Converters/SparseReader.cs @@ -342,4 +342,4 @@ private void ReadEndElement(string expectedTagName) _xmlReader.MoveToContent(); } } -} \ No newline at end of file +} diff --git a/src/Sarif.Converters/TSLintConverter.cs b/src/Sarif.Converters/TSLintConverter.cs index de2ba26f0..9d7edfebb 100644 --- a/src/Sarif.Converters/TSLintConverter.cs +++ b/src/Sarif.Converters/TSLintConverter.cs @@ -5,6 +5,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; + using Microsoft.CodeAnalysis.Sarif.Converters.TSLintObjectModel; namespace Microsoft.CodeAnalysis.Sarif.Converters diff --git a/src/Sarif.Converters/TSLintLogReader.cs b/src/Sarif.Converters/TSLintLogReader.cs index f2ae7b471..8a5d4cd51 100644 --- a/src/Sarif.Converters/TSLintLogReader.cs +++ b/src/Sarif.Converters/TSLintLogReader.cs @@ -8,7 +8,9 @@ using System.Runtime.Serialization; using System.Runtime.Serialization.Json; using System.Text; + using Microsoft.CodeAnalysis.Sarif.Converters.TSLintObjectModel; + using Newtonsoft.Json; using Newtonsoft.Json.Linq; diff --git a/src/Sarif.Converters/TextFormats/CsvReader.cs b/src/Sarif.Converters/TextFormats/CsvReader.cs index 72e1087fc..f615e954c 100644 --- a/src/Sarif.Converters/TextFormats/CsvReader.cs +++ b/src/Sarif.Converters/TextFormats/CsvReader.cs @@ -145,4 +145,4 @@ private int NextCellEnd(bool quoted, out bool escapedQuotes) return i; } } -} \ No newline at end of file +} diff --git a/src/Sarif.Converters/ToolFileConverterBase.cs b/src/Sarif.Converters/ToolFileConverterBase.cs index 4a5e98930..e83cabfb4 100644 --- a/src/Sarif.Converters/ToolFileConverterBase.cs +++ b/src/Sarif.Converters/ToolFileConverterBase.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.IO; + using Microsoft.CodeAnalysis.Sarif.Visitors; namespace Microsoft.CodeAnalysis.Sarif.Converters diff --git a/src/Sarif.Converters/ToolFormatConverter.cs b/src/Sarif.Converters/ToolFormatConverter.cs index 2fe7f42f0..2f4897f7d 100644 --- a/src/Sarif.Converters/ToolFormatConverter.cs +++ b/src/Sarif.Converters/ToolFormatConverter.cs @@ -3,7 +3,9 @@ using System; using System.IO; + using Microsoft.CodeAnalysis.Sarif.Writers; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.Converters diff --git a/src/Sarif.Driver/DriverExtensionMethods.cs b/src/Sarif.Driver/DriverExtensionMethods.cs index c478ba1c5..b394a122b 100644 --- a/src/Sarif.Driver/DriverExtensionMethods.cs +++ b/src/Sarif.Driver/DriverExtensionMethods.cs @@ -3,6 +3,7 @@ using System; using System.Globalization; + using Microsoft.CodeAnalysis.Sarif.Writers; namespace Microsoft.CodeAnalysis.Sarif.Driver diff --git a/src/Sarif.Driver/DriverUtilities.cs b/src/Sarif.Driver/DriverUtilities.cs index 5062ff78a..454e58422 100644 --- a/src/Sarif.Driver/DriverUtilities.cs +++ b/src/Sarif.Driver/DriverUtilities.cs @@ -6,6 +6,7 @@ using System.Globalization; using System.Reflection; using System.Text; + using CommandLine; namespace Microsoft.CodeAnalysis.Sarif.Driver @@ -133,4 +134,4 @@ public static string GetOptionDescription(Type optionsType, string optionPropert return builder.ToString(); } } -} \ No newline at end of file +} diff --git a/src/Sarif.Driver/PathExtensions.cs b/src/Sarif.Driver/PathExtensions.cs index 030619419..000c9e0e1 100644 --- a/src/Sarif.Driver/PathExtensions.cs +++ b/src/Sarif.Driver/PathExtensions.cs @@ -166,4 +166,4 @@ private static void AddSlashes(char[] resultTemp, ref int resultIdx, int slashes } } } -} \ No newline at end of file +} diff --git a/src/Sarif.Driver/Properties/AssemblyInfo.cs b/src/Sarif.Driver/Properties/AssemblyInfo.cs index f14fe0b91..3fd1bec8e 100644 --- a/src/Sarif.Driver/Properties/AssemblyInfo.cs +++ b/src/Sarif.Driver/Properties/AssemblyInfo.cs @@ -1,2 +1,2 @@ // Copyright (c) Microsoft. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. \ No newline at end of file +// Licensed under the MIT license. See LICENSE file in the project root for full license information. diff --git a/src/Sarif.Driver/Sdk/AnalysisApplicability.cs b/src/Sarif.Driver/Sdk/AnalysisApplicability.cs index ed9d08419..f939bef02 100644 --- a/src/Sarif.Driver/Sdk/AnalysisApplicability.cs +++ b/src/Sarif.Driver/Sdk/AnalysisApplicability.cs @@ -9,4 +9,4 @@ public enum AnalysisApplicability NotApplicableToSpecifiedTarget, ApplicableToSpecifiedTarget } -} \ No newline at end of file +} diff --git a/src/Sarif.Driver/Sdk/AnalysisContext.cs b/src/Sarif.Driver/Sdk/AnalysisContext.cs index f6d20eb1f..302992530 100644 --- a/src/Sarif.Driver/Sdk/AnalysisContext.cs +++ b/src/Sarif.Driver/Sdk/AnalysisContext.cs @@ -28,4 +28,4 @@ public class AnalysisContext : IAnalysisContext public void Dispose() { } } -} \ No newline at end of file +} diff --git a/src/Sarif.Driver/Sdk/AnalyzeCommandBase.cs b/src/Sarif.Driver/Sdk/AnalyzeCommandBase.cs index 1b45d97b0..2b4ed0d48 100644 --- a/src/Sarif.Driver/Sdk/AnalyzeCommandBase.cs +++ b/src/Sarif.Driver/Sdk/AnalyzeCommandBase.cs @@ -8,6 +8,7 @@ using System.Reflection; using System.Runtime.InteropServices; using System.Security; + using Microsoft.CodeAnalysis.Sarif.Writers; namespace Microsoft.CodeAnalysis.Sarif.Driver @@ -846,4 +847,4 @@ protected static void LogToolNotification( }); } } -} \ No newline at end of file +} diff --git a/src/Sarif.Driver/Sdk/AnalyzeOptionsBase.cs b/src/Sarif.Driver/Sdk/AnalyzeOptionsBase.cs index 2f9e1855f..7df714a51 100644 --- a/src/Sarif.Driver/Sdk/AnalyzeOptionsBase.cs +++ b/src/Sarif.Driver/Sdk/AnalyzeOptionsBase.cs @@ -85,4 +85,4 @@ public abstract class AnalyzeOptionsBase : CommonOptionsBase HelpText = "Omit redundant properties, producing a smaller but non-human-readable log.")] public bool Optimize { get; set; } } -} \ No newline at end of file +} diff --git a/src/Sarif.Driver/Sdk/CommonOptionsBase.cs b/src/Sarif.Driver/Sdk/CommonOptionsBase.cs index b26bbd135..033350b21 100644 --- a/src/Sarif.Driver/Sdk/CommonOptionsBase.cs +++ b/src/Sarif.Driver/Sdk/CommonOptionsBase.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; + using CommandLine; namespace Microsoft.CodeAnalysis.Sarif.Driver @@ -56,4 +57,4 @@ public class CommonOptionsBase Default = SarifVersion.Current)] public SarifVersion SarifOutputVersion { get; set; } } -} \ No newline at end of file +} diff --git a/src/Sarif.Driver/Sdk/ExportRulesDocumentationCommandBase.cs b/src/Sarif.Driver/Sdk/ExportRulesDocumentationCommandBase.cs index f15c2739b..0ce935b94 100644 --- a/src/Sarif.Driver/Sdk/ExportRulesDocumentationCommandBase.cs +++ b/src/Sarif.Driver/Sdk/ExportRulesDocumentationCommandBase.cs @@ -49,10 +49,10 @@ internal void BuildRule(Skimmer rule, StringBuilder sb) { sb.AppendLine($"## Rule `{rule.Moniker}`{Environment.NewLine}"); sb.AppendLine($"### Description{Environment.NewLine}"); - sb.AppendLine(@$"{rule.FullDescription?.Markdown - ?? rule.FullDescription?.Text + sb.AppendLine(@$"{rule.FullDescription?.Markdown + ?? rule.FullDescription?.Text ?? rule.ShortDescription?.Markdown - ?? rule.ShortDescription?.Text + ?? rule.ShortDescription?.Text ?? DriverResources.NoRuleDescription}{Environment.NewLine}"); sb.AppendLine($"### Messages{Environment.NewLine}"); diff --git a/src/Sarif.Driver/Sdk/MultifileOptionsBase.cs b/src/Sarif.Driver/Sdk/MultifileOptionsBase.cs index 37fe0f839..fb0535317 100644 --- a/src/Sarif.Driver/Sdk/MultifileOptionsBase.cs +++ b/src/Sarif.Driver/Sdk/MultifileOptionsBase.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information.using System; using System.Collections.Generic; + using CommandLine; namespace Microsoft.CodeAnalysis.Sarif.Driver diff --git a/src/Sarif.Driver/SemanticVersion.cs b/src/Sarif.Driver/SemanticVersion.cs index 2aacfec41..89c44547d 100644 --- a/src/Sarif.Driver/SemanticVersion.cs +++ b/src/Sarif.Driver/SemanticVersion.cs @@ -371,4 +371,4 @@ public static bool TryParse(string version, out SemanticVersion result) return result != null; } } -} \ No newline at end of file +} diff --git a/src/Sarif.Multitool.Library/AbsoluteUriCommand.cs b/src/Sarif.Multitool.Library/AbsoluteUriCommand.cs index b4bf56043..7abe91fe2 100644 --- a/src/Sarif.Multitool.Library/AbsoluteUriCommand.cs +++ b/src/Sarif.Multitool.Library/AbsoluteUriCommand.cs @@ -5,8 +5,10 @@ using System.Collections.Generic; using System.IO; using System.Linq; + using Microsoft.CodeAnalysis.Sarif.Driver; using Microsoft.CodeAnalysis.Sarif.Processors; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Sarif.Multitool.Library/AbsoluteUriOptions.cs b/src/Sarif.Multitool.Library/AbsoluteUriOptions.cs index ad0a63379..b0736007f 100644 --- a/src/Sarif.Multitool.Library/AbsoluteUriOptions.cs +++ b/src/Sarif.Multitool.Library/AbsoluteUriOptions.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using CommandLine; + using Microsoft.CodeAnalysis.Sarif.Driver; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Sarif.Multitool.Library/CommandBase.cs b/src/Sarif.Multitool.Library/CommandBase.cs index 0673311a0..3aad1ef67 100644 --- a/src/Sarif.Multitool.Library/CommandBase.cs +++ b/src/Sarif.Multitool.Library/CommandBase.cs @@ -5,7 +5,9 @@ using System.Collections.Generic; using System.Globalization; using System.IO; + using Microsoft.CodeAnalysis.Sarif.Driver; + using Newtonsoft.Json; using Newtonsoft.Json.Serialization; diff --git a/src/Sarif.Multitool.Library/CommandUtilities.cs b/src/Sarif.Multitool.Library/CommandUtilities.cs index c5268a121..fc819f1cf 100644 --- a/src/Sarif.Multitool.Library/CommandUtilities.cs +++ b/src/Sarif.Multitool.Library/CommandUtilities.cs @@ -3,6 +3,7 @@ using System; using System.IO; + using Microsoft.CodeAnalysis.Sarif.Driver; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Sarif.Multitool.Library/ConvertCommand.cs b/src/Sarif.Multitool.Library/ConvertCommand.cs index 92ec58d70..736a8421c 100644 --- a/src/Sarif.Multitool.Library/ConvertCommand.cs +++ b/src/Sarif.Multitool.Library/ConvertCommand.cs @@ -72,7 +72,7 @@ public int Run(ConvertOptions convertOptions, IFileSystem fileSystem = null) }; using (JsonTextReader reader = new JsonTextReader(new StreamReader(convertOptions.OutputFilePath))) - { + { sarifLog = serializer.Deserialize(reader); } diff --git a/src/Sarif.Multitool.Library/ConvertOptions.cs b/src/Sarif.Multitool.Library/ConvertOptions.cs index d41acc104..304b6db1a 100644 --- a/src/Sarif.Multitool.Library/ConvertOptions.cs +++ b/src/Sarif.Multitool.Library/ConvertOptions.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using CommandLine; + using Microsoft.CodeAnalysis.Sarif.Driver; namespace Microsoft.CodeAnalysis.Sarif.Multitool @@ -28,4 +29,4 @@ public class ConvertOptions : SingleFileOptionsBase public bool NormalizeForGitHub { get; internal set; } } -} \ No newline at end of file +} diff --git a/src/Sarif.Multitool.Library/ExportValidationConfigurationCommand.cs b/src/Sarif.Multitool.Library/ExportValidationConfigurationCommand.cs index 174d1dfd7..87ec6a61a 100644 --- a/src/Sarif.Multitool.Library/ExportValidationConfigurationCommand.cs +++ b/src/Sarif.Multitool.Library/ExportValidationConfigurationCommand.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using CommandLine; + using Microsoft.CodeAnalysis.Sarif.Driver; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Sarif.Multitool.Library/ExportValidationConfigurationOptions.cs b/src/Sarif.Multitool.Library/ExportValidationConfigurationOptions.cs index 4b087a442..0cb78299b 100644 --- a/src/Sarif.Multitool.Library/ExportValidationConfigurationOptions.cs +++ b/src/Sarif.Multitool.Library/ExportValidationConfigurationOptions.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using CommandLine; + using Microsoft.CodeAnalysis.Sarif.Driver; namespace Microsoft.CodeAnalysis.Sarif.Multitool @@ -10,4 +11,4 @@ namespace Microsoft.CodeAnalysis.Sarif.Multitool public class ExportValidationConfigurationOptions : ExportConfigurationOptions { } -} \ No newline at end of file +} diff --git a/src/Sarif.Multitool.Library/ExportValidationDocumentationOptions.cs b/src/Sarif.Multitool.Library/ExportValidationDocumentationOptions.cs index b8e2013e9..d51d74037 100644 --- a/src/Sarif.Multitool.Library/ExportValidationDocumentationOptions.cs +++ b/src/Sarif.Multitool.Library/ExportValidationDocumentationOptions.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using CommandLine; + using Microsoft.CodeAnalysis.Sarif.Driver; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Sarif.Multitool.Library/ExportValidationRulesMetadataOptions.cs b/src/Sarif.Multitool.Library/ExportValidationRulesMetadataOptions.cs index e5c4fb5f0..3f7851923 100644 --- a/src/Sarif.Multitool.Library/ExportValidationRulesMetadataOptions.cs +++ b/src/Sarif.Multitool.Library/ExportValidationRulesMetadataOptions.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using CommandLine; + using Microsoft.CodeAnalysis.Sarif.Driver; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Sarif.Multitool.Library/FileWorkItemsCommand.cs b/src/Sarif.Multitool.Library/FileWorkItemsCommand.cs index 8b65349a4..c2853fc1c 100644 --- a/src/Sarif.Multitool.Library/FileWorkItemsCommand.cs +++ b/src/Sarif.Multitool.Library/FileWorkItemsCommand.cs @@ -7,10 +7,12 @@ using System.IO; using System.Reflection; using System.Text; + using Microsoft.CodeAnalysis.Sarif.Driver; using Microsoft.CodeAnalysis.Sarif.WorkItems; using Microsoft.Json.Schema; using Microsoft.Json.Schema.Validation; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.Multitool @@ -257,4 +259,4 @@ private string FormatSchemaErrors(string path, IEnumerable errors) return sb.ToString(); } } -} \ No newline at end of file +} diff --git a/src/Sarif.Multitool.Library/FileWorkItemsOptions.cs b/src/Sarif.Multitool.Library/FileWorkItemsOptions.cs index e7c32e3e3..be042129c 100644 --- a/src/Sarif.Multitool.Library/FileWorkItemsOptions.cs +++ b/src/Sarif.Multitool.Library/FileWorkItemsOptions.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using CommandLine; + using Microsoft.CodeAnalysis.Sarif.Driver; namespace Microsoft.CodeAnalysis.Sarif.Multitool @@ -30,7 +31,7 @@ public class FileWorkItemsOptions : SingleFileOptionsBase [Option( "file-unchanged", - HelpText = "File work items for both new and unchanged baseline state results. " + + HelpText = "File work items for both new and unchanged baseline state results. " + "If an unchanged result already has an associated work item, a new work item will not be created.", Default = null)] public bool? ShouldFileUnchanged { get; internal set; } diff --git a/src/Sarif.Multitool.Library/JTokenExtensions.cs b/src/Sarif.Multitool.Library/JTokenExtensions.cs index 6eb578513..af8e7152d 100644 --- a/src/Sarif.Multitool.Library/JTokenExtensions.cs +++ b/src/Sarif.Multitool.Library/JTokenExtensions.cs @@ -3,6 +3,7 @@ using System; using System.Linq; + using Newtonsoft.Json.Linq; namespace Microsoft.CodeAnalysis.Sarif.Multitool @@ -15,4 +16,4 @@ public static bool HasProperty(this JToken token, string propertyName) .Any(jp => jp.Name.Equals(propertyName, StringComparison.Ordinal)); } } -} \ No newline at end of file +} diff --git a/src/Sarif.Multitool.Library/MergeCommand.cs b/src/Sarif.Multitool.Library/MergeCommand.cs index 3c647b80b..a310dc476 100644 --- a/src/Sarif.Multitool.Library/MergeCommand.cs +++ b/src/Sarif.Multitool.Library/MergeCommand.cs @@ -106,7 +106,7 @@ public int Run(MergeOptions mergeOptions) } } } - + foreach (string ruleId in ruleToRunsMap.Keys) { HashSet runs = ruleToRunsMap[ruleId]; diff --git a/src/Sarif.Multitool.Library/MergeOptions.cs b/src/Sarif.Multitool.Library/MergeOptions.cs index cedef28df..f4551c761 100644 --- a/src/Sarif.Multitool.Library/MergeOptions.cs +++ b/src/Sarif.Multitool.Library/MergeOptions.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using CommandLine; + using Microsoft.CodeAnalysis.Sarif.Driver; namespace Microsoft.CodeAnalysis.Sarif.Multitool @@ -23,15 +24,15 @@ public class MergeOptions : MultipleFilesOptionsBase [Option( "split", HelpText = "Apply a splitting strategy to the merged file. " + - "Must be one of None or PerRule. By default ('None'), " + - "no splitting strategy is applied (i.e. all input " + + "Must be one of None or PerRule. By default ('None'), " + + "no splitting strategy is applied (i.e. all input " + "files will be merged into a single log).", Default = SplittingStrategy.None)] public SplittingStrategy SplittingStrategy { get; internal set; } [Option( "merge-runs", - HelpText = "Merge runs of the same tool + verion combination (requires " + + HelpText = "Merge runs of the same tool + verion combination (requires " + "eliding run-specific details such as invocations data.")] public bool MergeRuns { get; internal set; } } diff --git a/src/Sarif.Multitool.Library/PageCommand.cs b/src/Sarif.Multitool.Library/PageCommand.cs index 6ae791576..3184d4554 100644 --- a/src/Sarif.Multitool.Library/PageCommand.cs +++ b/src/Sarif.Multitool.Library/PageCommand.cs @@ -7,8 +7,10 @@ using System.Globalization; using System.IO; using System.Linq; + using Microsoft.CodeAnalysis.Sarif.Driver; using Microsoft.CodeAnalysis.Sarif.Map; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Sarif.Multitool.Library/QueryCommand.cs b/src/Sarif.Multitool.Library/QueryCommand.cs index 0a40c94eb..63df7cf81 100644 --- a/src/Sarif.Multitool.Library/QueryCommand.cs +++ b/src/Sarif.Multitool.Library/QueryCommand.cs @@ -5,6 +5,7 @@ using System.Collections; using System.Diagnostics; using System.Linq; + using Microsoft.CodeAnalysis.Sarif.Driver; using Microsoft.CodeAnalysis.Sarif.Query; using Microsoft.CodeAnalysis.Sarif.Query.Evaluators; diff --git a/src/Sarif.Multitool.Library/RebaseUriCommand.cs b/src/Sarif.Multitool.Library/RebaseUriCommand.cs index 6a6cb8d30..cda6a1dda 100644 --- a/src/Sarif.Multitool.Library/RebaseUriCommand.cs +++ b/src/Sarif.Multitool.Library/RebaseUriCommand.cs @@ -5,6 +5,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; + using Microsoft.CodeAnalysis.Sarif.Driver; using Microsoft.CodeAnalysis.Sarif.Processors; using Microsoft.CodeAnalysis.Sarif.Visitors; diff --git a/src/Sarif.Multitool.Library/RebaseUriOptions.cs b/src/Sarif.Multitool.Library/RebaseUriOptions.cs index 4e82da62a..e03b6209d 100644 --- a/src/Sarif.Multitool.Library/RebaseUriOptions.cs +++ b/src/Sarif.Multitool.Library/RebaseUriOptions.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using CommandLine; + using Microsoft.CodeAnalysis.Sarif.Driver; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Sarif.Multitool.Library/ResultMatchSetCommand.cs b/src/Sarif.Multitool.Library/ResultMatchSetCommand.cs index 7338ebfaf..a585c9b7d 100644 --- a/src/Sarif.Multitool.Library/ResultMatchSetCommand.cs +++ b/src/Sarif.Multitool.Library/ResultMatchSetCommand.cs @@ -7,8 +7,10 @@ using System.Globalization; using System.IO; using System.Linq; + using Microsoft.CodeAnalysis.Sarif.Baseline.ResultMatching; using Microsoft.CodeAnalysis.Sarif.Driver; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Sarif.Multitool.Library/ResultMatchSetOptions.cs b/src/Sarif.Multitool.Library/ResultMatchSetOptions.cs index 5b6f24738..e224ba8c0 100644 --- a/src/Sarif.Multitool.Library/ResultMatchSetOptions.cs +++ b/src/Sarif.Multitool.Library/ResultMatchSetOptions.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using CommandLine; + using Microsoft.CodeAnalysis.Sarif.Driver; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Sarif.Multitool.Library/ResultMatchingCommand.cs b/src/Sarif.Multitool.Library/ResultMatchingCommand.cs index 5ba4fc729..a73e9bc91 100644 --- a/src/Sarif.Multitool.Library/ResultMatchingCommand.cs +++ b/src/Sarif.Multitool.Library/ResultMatchingCommand.cs @@ -5,6 +5,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; + using Microsoft.CodeAnalysis.Sarif.Baseline.ResultMatching; using Microsoft.CodeAnalysis.Sarif.Driver; diff --git a/src/Sarif.Multitool.Library/ResultMatchingOptions.cs b/src/Sarif.Multitool.Library/ResultMatchingOptions.cs index 885f5bebe..5ea30c19b 100644 --- a/src/Sarif.Multitool.Library/ResultMatchingOptions.cs +++ b/src/Sarif.Multitool.Library/ResultMatchingOptions.cs @@ -2,7 +2,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; + using CommandLine; + using Microsoft.CodeAnalysis.Sarif.Driver; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Sarif.Multitool.Library/RewriteCommand.cs b/src/Sarif.Multitool.Library/RewriteCommand.cs index b27872f91..2afa0d9c0 100644 --- a/src/Sarif.Multitool.Library/RewriteCommand.cs +++ b/src/Sarif.Multitool.Library/RewriteCommand.cs @@ -4,9 +4,11 @@ using System; using System.Collections.Generic; using System.Diagnostics; + using Microsoft.CodeAnalysis.Sarif.Driver; using Microsoft.CodeAnalysis.Sarif.Driver.Sdk; using Microsoft.CodeAnalysis.Sarif.Visitors; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Sarif.Multitool.Library/RewriteOptions.cs b/src/Sarif.Multitool.Library/RewriteOptions.cs index cc0af9741..f701295e5 100644 --- a/src/Sarif.Multitool.Library/RewriteOptions.cs +++ b/src/Sarif.Multitool.Library/RewriteOptions.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using CommandLine; + using Microsoft.CodeAnalysis.Sarif.Driver; namespace Microsoft.CodeAnalysis.Sarif.Multitool @@ -11,4 +12,4 @@ public class RewriteOptions : SingleFileOptionsBase { } -} \ No newline at end of file +} diff --git a/src/Sarif.Multitool.Library/Rules/RuleId.cs b/src/Sarif.Multitool.Library/Rules/RuleId.cs index 4a4001ccc..3ce3efc7a 100644 --- a/src/Sarif.Multitool.Library/Rules/RuleId.cs +++ b/src/Sarif.Multitool.Library/Rules/RuleId.cs @@ -25,7 +25,7 @@ public static class RuleId public const string OptimizeFileSize = "SARIF2004"; public const string ProvideToolProperties = "SARIF2005"; - public const string UrisShouldBeReachable = "SARIF2006"; + public const string UrisShouldBeReachable = "SARIF2006"; public const string ExpressPathsRelativeToRepoRoot = "SARIF2007"; public const string ProvideSchema = "SARIF2008"; public const string ConsiderConventionalIdentifierValues = "SARIF2009"; diff --git a/src/Sarif.Multitool.Library/Rules/SARIF1005.UriMustBeAbsolute.cs b/src/Sarif.Multitool.Library/Rules/SARIF1005.UriMustBeAbsolute.cs index 7c31c90db..173b839a3 100644 --- a/src/Sarif.Multitool.Library/Rules/SARIF1005.UriMustBeAbsolute.cs +++ b/src/Sarif.Multitool.Library/Rules/SARIF1005.UriMustBeAbsolute.cs @@ -83,8 +83,8 @@ private void AnalyzeUri(string uriString, string pointer) { // {0}: The value of this property is required to be an absolute URI, but '{1}' is a relative URI reference. LogResult( - pointer, - nameof(RuleResources.SARIF1005_UriMustBeAbsolute_Error_Default_Text), + pointer, + nameof(RuleResources.SARIF1005_UriMustBeAbsolute_Error_Default_Text), uriString); } } diff --git a/src/Sarif.Multitool.Library/Rules/SARIF1010.RuleIdMustBeConsistent.cs b/src/Sarif.Multitool.Library/Rules/SARIF1010.RuleIdMustBeConsistent.cs index 2bc02af28..fe761e723 100644 --- a/src/Sarif.Multitool.Library/Rules/SARIF1010.RuleIdMustBeConsistent.cs +++ b/src/Sarif.Multitool.Library/Rules/SARIF1010.RuleIdMustBeConsistent.cs @@ -25,7 +25,7 @@ public class RuleIdMustBeConsistent : SarifValidationSkimmerBase nameof(RuleResources.SARIF1010_RuleIdMustBeConsistent_Error_ResultMustSpecifyRuleId_Text) }; public override FailureLevel DefaultLevel => FailureLevel.Error; - + protected override void Analyze(Result result, string resultPointer) { AnalyzeRuleId(result, resultPointer); @@ -40,7 +40,7 @@ private void AnalyzeRuleId(Result result, string pointer) // ([§3.27.5](https://docs.oasis-open.org/sarif/sarif/v2.1.0/os/sarif-v2.1.0-os.html#_Toc34317643)) // requires at least one of these properties to be present. LogResult( - pointer, + pointer, nameof(RuleResources.SARIF1010_RuleIdMustBeConsistent_Error_ResultMustSpecifyRuleId_Text)); } // if both are present, they must be equal. @@ -53,9 +53,9 @@ private void AnalyzeRuleId(Result result, string pointer) // (https://docs.oasis-open.org/sarif/sarif/v2.1.0/os/sarif-v2.1.0-os.html#_Toc34317643)) // requires that if both of these properties are present, they must be equal. LogResult( - pointer, - nameof(RuleResources.SARIF1010_RuleIdMustBeConsistent_Error_ResultRuleIdMustBeConsistent_Text), - result.RuleId, + pointer, + nameof(RuleResources.SARIF1010_RuleIdMustBeConsistent_Error_ResultRuleIdMustBeConsistent_Text), + result.RuleId, result.Rule?.Id); } } diff --git a/src/Sarif.Multitool.Library/Rules/SARIF1011.ReferenceFinalSchema.cs b/src/Sarif.Multitool.Library/Rules/SARIF1011.ReferenceFinalSchema.cs index c01a44bb4..efb689c6c 100644 --- a/src/Sarif.Multitool.Library/Rules/SARIF1011.ReferenceFinalSchema.cs +++ b/src/Sarif.Multitool.Library/Rules/SARIF1011.ReferenceFinalSchema.cs @@ -56,7 +56,7 @@ private void AnalyzeSchema(Uri schemaUri, string schema) // final version of the schema, upgrade the tool to populate the '$schema' property with a URL // that refers to the final version of the schema. LogResult( - schema, + schema, nameof(RuleResources.SARIF1011_ReferenceFinalSchema_Error_Default_Text), schemaUri.OriginalString); } diff --git a/src/Sarif.Multitool.Library/Rules/SARIF2004.OptimizeFileSize.cs b/src/Sarif.Multitool.Library/Rules/SARIF2004.OptimizeFileSize.cs index b1a5c5dfb..f2e13da9b 100644 --- a/src/Sarif.Multitool.Library/Rules/SARIF2004.OptimizeFileSize.cs +++ b/src/Sarif.Multitool.Library/Rules/SARIF2004.OptimizeFileSize.cs @@ -111,7 +111,7 @@ private void ReportRuleDuplication(Result result, string resultPointer) resultPointer, nameof(RuleResources.SARIF2004_OptimizeFileSize_Warning_AvoidDuplicativeResultRuleInformation_Text)); } - } + } } else { diff --git a/src/Sarif.Multitool.Library/Rules/SARIF2006.UrisShouldBeReachable.cs b/src/Sarif.Multitool.Library/Rules/SARIF2006.UrisShouldBeReachable.cs index d8a074649..0e19763bb 100644 --- a/src/Sarif.Multitool.Library/Rules/SARIF2006.UrisShouldBeReachable.cs +++ b/src/Sarif.Multitool.Library/Rules/SARIF2006.UrisShouldBeReachable.cs @@ -88,8 +88,8 @@ private void AnalyzeUri(string uriString, string pointer) { // {0}: The URI '{1}' was not reachable via an HTTP GET request. LogResult( - pointer, - nameof(RuleResources.SARIF2006_UrisShouldBeReachable_Note_Default_Text), + pointer, + nameof(RuleResources.SARIF2006_UrisShouldBeReachable_Note_Default_Text), uriString); } } diff --git a/src/Sarif.Multitool.Library/Rules/SARIF2008.ProvideSchema.cs b/src/Sarif.Multitool.Library/Rules/SARIF2008.ProvideSchema.cs index d5bebe5f9..ad6703016 100644 --- a/src/Sarif.Multitool.Library/Rules/SARIF2008.ProvideSchema.cs +++ b/src/Sarif.Multitool.Library/Rules/SARIF2008.ProvideSchema.cs @@ -33,7 +33,7 @@ protected override void Analyze(SarifLog log, string logPointer) // property that refers to the final, OASIS standard version of the SARIF 2.1.0 // schema. This enables IDEs to provide Intellisense for SARIF log files. LogResult( - logPointer, + logPointer, nameof(RuleResources.SARIF2008_ProvideSchema_Warning_Default_Text)); } } diff --git a/src/Sarif.Multitool.Library/Rules/SARIF2010.ProvideCodeSnippets.cs b/src/Sarif.Multitool.Library/Rules/SARIF2010.ProvideCodeSnippets.cs index 1352564ac..2e64648d4 100644 --- a/src/Sarif.Multitool.Library/Rules/SARIF2010.ProvideCodeSnippets.cs +++ b/src/Sarif.Multitool.Library/Rules/SARIF2010.ProvideCodeSnippets.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.Linq; + using Microsoft.CodeAnalysis.Sarif.Writers; using Microsoft.Json.Pointer; diff --git a/src/Sarif.Multitool.Library/Rules/SarifValidationSkimmerBase.cs b/src/Sarif.Multitool.Library/Rules/SarifValidationSkimmerBase.cs index fd920c010..ef421ebbe 100644 --- a/src/Sarif.Multitool.Library/Rules/SarifValidationSkimmerBase.cs +++ b/src/Sarif.Multitool.Library/Rules/SarifValidationSkimmerBase.cs @@ -6,8 +6,10 @@ using System.Resources; using System.Text; using System.Text.RegularExpressions; + using Microsoft.CodeAnalysis.Sarif.Driver; using Microsoft.Json.Pointer; + using Newtonsoft.Json; using Newtonsoft.Json.Linq; diff --git a/src/Sarif.Multitool.Library/SarifValidationContext.cs b/src/Sarif.Multitool.Library/SarifValidationContext.cs index d2b9c4da3..0234315f6 100644 --- a/src/Sarif.Multitool.Library/SarifValidationContext.cs +++ b/src/Sarif.Multitool.Library/SarifValidationContext.cs @@ -3,6 +3,7 @@ using System; using System.IO; + using Newtonsoft.Json.Linq; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Sarif.Multitool.Library/StringExtensions.cs b/src/Sarif.Multitool.Library/StringExtensions.cs index f0bbf145f..c9fc115d0 100644 --- a/src/Sarif.Multitool.Library/StringExtensions.cs +++ b/src/Sarif.Multitool.Library/StringExtensions.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using Microsoft.Json.Pointer; + using Newtonsoft.Json.Linq; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Sarif.Multitool.Library/TransformCommand.cs b/src/Sarif.Multitool.Library/TransformCommand.cs index c4879f866..21ea9dcac 100644 --- a/src/Sarif.Multitool.Library/TransformCommand.cs +++ b/src/Sarif.Multitool.Library/TransformCommand.cs @@ -3,11 +3,13 @@ using System; using System.IO; + using Microsoft.CodeAnalysis.Sarif.Driver; using Microsoft.CodeAnalysis.Sarif.Readers; using Microsoft.CodeAnalysis.Sarif.VersionOne; using Microsoft.CodeAnalysis.Sarif.Visitors; using Microsoft.CodeAnalysis.Sarif.Writers; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.Multitool @@ -151,4 +153,4 @@ private string SniffVersion(string sarifPath) return null; } } -} \ No newline at end of file +} diff --git a/src/Sarif.Multitool.Library/TransformOptions.cs b/src/Sarif.Multitool.Library/TransformOptions.cs index 83d93e8ff..fc9dd6a11 100644 --- a/src/Sarif.Multitool.Library/TransformOptions.cs +++ b/src/Sarif.Multitool.Library/TransformOptions.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using CommandLine; + using Microsoft.CodeAnalysis.Sarif.Driver; namespace Microsoft.CodeAnalysis.Sarif.Multitool @@ -10,4 +11,4 @@ namespace Microsoft.CodeAnalysis.Sarif.Multitool public class TransformOptions : SingleFileOptionsBase { } -} \ No newline at end of file +} diff --git a/src/Sarif.Multitool.Library/ValidateCommand.cs b/src/Sarif.Multitool.Library/ValidateCommand.cs index b8339504e..a2f5a8c86 100644 --- a/src/Sarif.Multitool.Library/ValidateCommand.cs +++ b/src/Sarif.Multitool.Library/ValidateCommand.cs @@ -9,6 +9,7 @@ using Microsoft.CodeAnalysis.Sarif.Writers; using Microsoft.Json.Schema; using Microsoft.Json.Schema.Validation; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Sarif.Multitool.Library/ValidateOptions.cs b/src/Sarif.Multitool.Library/ValidateOptions.cs index 02c6f7bfa..1f7622333 100644 --- a/src/Sarif.Multitool.Library/ValidateOptions.cs +++ b/src/Sarif.Multitool.Library/ValidateOptions.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using CommandLine; + using Microsoft.CodeAnalysis.Sarif.Driver; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Sarif.Multitool/Properties/AssemblyInfo.cs b/src/Sarif.Multitool/Properties/AssemblyInfo.cs index 585d288e2..511783788 100644 --- a/src/Sarif.Multitool/Properties/AssemblyInfo.cs +++ b/src/Sarif.Multitool/Properties/AssemblyInfo.cs @@ -1,2 +1,2 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. \ No newline at end of file +// Licensed under the MIT license. See LICENSE file in the project root for full license information. diff --git a/src/Sarif.WorkItems/SarifWorkItemContext.cs b/src/Sarif.WorkItems/SarifWorkItemContext.cs index 9bfc87293..df495a283 100644 --- a/src/Sarif.WorkItems/SarifWorkItemContext.cs +++ b/src/Sarif.WorkItems/SarifWorkItemContext.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using System.IO; using System.Reflection; + using Microsoft.WorkItems; namespace Microsoft.CodeAnalysis.Sarif.WorkItems @@ -30,8 +31,9 @@ public Uri HostUri public string DescriptionFooter { - get { - return + get + { + return CurrentProvider == FilingClient.SourceControlProvider.AzureDevOps ? AzureDevOpsDescriptionFooter : GitHubDescriptionFooter; @@ -268,4 +270,4 @@ public void Dispose() "Extensibility", nameof(AdditionalTags), defaultValue: () => { return new StringSet(); }); } -} \ No newline at end of file +} diff --git a/src/Sarif.WorkItems/SarifWorkItemFiler.cs b/src/Sarif.WorkItems/SarifWorkItemFiler.cs index 784b95ef8..e7022d6fc 100644 --- a/src/Sarif.WorkItems/SarifWorkItemFiler.cs +++ b/src/Sarif.WorkItems/SarifWorkItemFiler.cs @@ -8,6 +8,7 @@ using System.Linq; using System.Reflection; using System.Threading.Tasks; + using Microsoft.ApplicationInsights.Channel; using Microsoft.CodeAnalysis.Sarif.Visitors; using Microsoft.CodeAnalysis.WorkItems; @@ -15,6 +16,7 @@ using Microsoft.Extensions.Logging; using Microsoft.WorkItems; using Microsoft.WorkItems.Logging; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.WorkItems @@ -54,7 +56,7 @@ public SarifWorkItemFiler(Uri filingUri = null, SarifWorkItemContext filingConte this.FiledWorkItems = new List(); } - public FilingClient FilingClient + public FilingClient FilingClient { get { @@ -532,4 +534,4 @@ public void Dispose() internal const string PROGRAMMABLE_URIS_PROPERTY_NAME = "programmableWorkItemUris"; internal const string LOGID_PROPERTY_NAME = "logId"; } -} \ No newline at end of file +} diff --git a/src/Sarif.WorkItems/SarifWorkItemModel.cs b/src/Sarif.WorkItems/SarifWorkItemModel.cs index d9915c231..1c1d20e7a 100644 --- a/src/Sarif.WorkItems/SarifWorkItemModel.cs +++ b/src/Sarif.WorkItems/SarifWorkItemModel.cs @@ -4,8 +4,10 @@ using System; using System.Collections.Generic; using System.Linq; + using Microsoft.CodeAnalysis.Sarif.Visitors; using Microsoft.WorkItems; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.WorkItems @@ -75,10 +77,10 @@ public class SarifWorkItemModel : WorkItemModel // this.CommentOrDiscussion = $"Default {nameof(this.CommentOrDiscussion)}"; - string descriptionFooter = this.Context.DescriptionFooter; + string descriptionFooter = this.Context.DescriptionFooter; - this.BodyOrDescription = - Environment.NewLine + + this.BodyOrDescription = + Environment.NewLine + sarifLog.CreateWorkItemDescription(this.Context, LocationUris) + descriptionFooter; diff --git a/src/Sarif.WorkItems/SarifWorkItemsExtensions.cs b/src/Sarif.WorkItems/SarifWorkItemsExtensions.cs index 6316e5666..807033ce0 100644 --- a/src/Sarif.WorkItems/SarifWorkItemsExtensions.cs +++ b/src/Sarif.WorkItems/SarifWorkItemsExtensions.cs @@ -17,7 +17,7 @@ public static bool ShouldBeFiled(this Result result) { return false; } - + if (result.Suppressions?.Count > 0) { return false; } // Fail: an explicit failure occurred. @@ -91,7 +91,7 @@ public static string CreateWorkItemTitle(this Run run) string locationName = "'" + firstResult.Locations?[0].LogicalLocation?.FullyQualifiedName + "'"; if (locationName.Length > remainingChars) - { + { locationName = "'" + Path.GetFileName(firstResult.Locations?[0].LogicalLocation?.FullyQualifiedName) + "'"; if (locationName.Length > remainingChars) @@ -139,7 +139,7 @@ public static int GetAggregateFilableResultsCount(this SarifLog log) .Select(result => result.ShouldBeFiled() ? 1 : 0).Sum()) .Sum() ?? 0; } - + public static string CreateWorkItemDescription(this SarifLog log, SarifWorkItemContext context, IList locationUris) { int totalResults = log.GetAggregateFilableResultsCount(); diff --git a/src/Sarif/Autogenerated/Address.cs b/src/Sarif/Autogenerated/Address.cs index ddaef8100..0538ddc2f 100644 --- a/src/Sarif/Autogenerated/Address.cs +++ b/src/Sarif/Autogenerated/Address.cs @@ -6,7 +6,9 @@ using System.Collections.Generic; using System.ComponentModel; using System.Runtime.Serialization; + using Microsoft.CodeAnalysis.Sarif.Readers; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif @@ -204,4 +206,4 @@ private void Init(int absoluteAddress, int? relativeAddress, int? length, string } } } -} \ No newline at end of file +} diff --git a/src/Sarif/Autogenerated/AddressEqualityComparer.cs b/src/Sarif/Autogenerated/AddressEqualityComparer.cs index 63673aeea..699252a2c 100644 --- a/src/Sarif/Autogenerated/AddressEqualityComparer.cs +++ b/src/Sarif/Autogenerated/AddressEqualityComparer.cs @@ -4,6 +4,7 @@ using System; using System.CodeDom.Compiler; using System.Collections.Generic; + using Microsoft.CodeAnalysis.Sarif.Readers; namespace Microsoft.CodeAnalysis.Sarif @@ -149,4 +150,4 @@ public int GetHashCode(Address obj) return result; } } -} \ No newline at end of file +} diff --git a/src/Sarif/Autogenerated/Artifact.cs b/src/Sarif/Autogenerated/Artifact.cs index 260daa14b..9019657ae 100644 --- a/src/Sarif/Autogenerated/Artifact.cs +++ b/src/Sarif/Autogenerated/Artifact.cs @@ -6,7 +6,9 @@ using System.Collections.Generic; using System.ComponentModel; using System.Runtime.Serialization; + using Microsoft.CodeAnalysis.Sarif.Readers; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif @@ -248,4 +250,4 @@ protected virtual void Init(Message description, ArtifactLocation location, int } } } -} \ No newline at end of file +} diff --git a/src/Sarif/Autogenerated/ArtifactChange.cs b/src/Sarif/Autogenerated/ArtifactChange.cs index 0e92d58ee..bcd8b8f4f 100644 --- a/src/Sarif/Autogenerated/ArtifactChange.cs +++ b/src/Sarif/Autogenerated/ArtifactChange.cs @@ -5,6 +5,7 @@ using System.CodeDom.Compiler; using System.Collections.Generic; using System.Runtime.Serialization; + using Microsoft.CodeAnalysis.Sarif.Readers; namespace Microsoft.CodeAnalysis.Sarif @@ -142,4 +143,4 @@ protected virtual void Init(ArtifactLocation artifactLocation, IEnumerable threadFlows } } } -} \ No newline at end of file +} diff --git a/src/Sarif/Autogenerated/CodeFlowEqualityComparer.cs b/src/Sarif/Autogenerated/CodeFlowEqualityComparer.cs index 48b98cff3..c5c06f2b1 100644 --- a/src/Sarif/Autogenerated/CodeFlowEqualityComparer.cs +++ b/src/Sarif/Autogenerated/CodeFlowEqualityComparer.cs @@ -4,6 +4,7 @@ using System; using System.CodeDom.Compiler; using System.Collections.Generic; + using Microsoft.CodeAnalysis.Sarif.Readers; namespace Microsoft.CodeAnalysis.Sarif @@ -126,4 +127,4 @@ public int GetHashCode(CodeFlow obj) return result; } } -} \ No newline at end of file +} diff --git a/src/Sarif/Autogenerated/ColumnKind.cs b/src/Sarif/Autogenerated/ColumnKind.cs index ff3e832d9..6b35770db 100644 --- a/src/Sarif/Autogenerated/ColumnKind.cs +++ b/src/Sarif/Autogenerated/ColumnKind.cs @@ -15,4 +15,4 @@ public enum ColumnKind Utf16CodeUnits, UnicodeCodePoints } -} \ No newline at end of file +} diff --git a/src/Sarif/Autogenerated/ConfigurationOverride.cs b/src/Sarif/Autogenerated/ConfigurationOverride.cs index 5994ad58a..90ac8bab8 100644 --- a/src/Sarif/Autogenerated/ConfigurationOverride.cs +++ b/src/Sarif/Autogenerated/ConfigurationOverride.cs @@ -5,6 +5,7 @@ using System.CodeDom.Compiler; using System.Collections.Generic; using System.Runtime.Serialization; + using Microsoft.CodeAnalysis.Sarif.Readers; namespace Microsoft.CodeAnalysis.Sarif @@ -129,4 +130,4 @@ protected virtual void Init(ReportingConfiguration configuration, ReportingDescr } } } -} \ No newline at end of file +} diff --git a/src/Sarif/Autogenerated/ConfigurationOverrideEqualityComparer.cs b/src/Sarif/Autogenerated/ConfigurationOverrideEqualityComparer.cs index d15454df5..0e1b929fc 100644 --- a/src/Sarif/Autogenerated/ConfigurationOverrideEqualityComparer.cs +++ b/src/Sarif/Autogenerated/ConfigurationOverrideEqualityComparer.cs @@ -4,6 +4,7 @@ using System; using System.CodeDom.Compiler; using System.Collections.Generic; + using Microsoft.CodeAnalysis.Sarif.Readers; namespace Microsoft.CodeAnalysis.Sarif @@ -103,4 +104,4 @@ public int GetHashCode(ConfigurationOverride obj) return result; } } -} \ No newline at end of file +} diff --git a/src/Sarif/Autogenerated/Conversion.cs b/src/Sarif/Autogenerated/Conversion.cs index a27ca6f2f..f388bed48 100644 --- a/src/Sarif/Autogenerated/Conversion.cs +++ b/src/Sarif/Autogenerated/Conversion.cs @@ -5,7 +5,9 @@ using System.CodeDom.Compiler; using System.Collections.Generic; using System.Runtime.Serialization; + using Microsoft.CodeAnalysis.Sarif.Readers; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif @@ -158,4 +160,4 @@ protected virtual void Init(Tool tool, Invocation invocation, IEnumerable art } } } -} \ No newline at end of file +} diff --git a/src/Sarif/Autogenerated/FixEqualityComparer.cs b/src/Sarif/Autogenerated/FixEqualityComparer.cs index 8efcf20d2..9fbdf6320 100644 --- a/src/Sarif/Autogenerated/FixEqualityComparer.cs +++ b/src/Sarif/Autogenerated/FixEqualityComparer.cs @@ -4,6 +4,7 @@ using System; using System.CodeDom.Compiler; using System.Collections.Generic; + using Microsoft.CodeAnalysis.Sarif.Readers; namespace Microsoft.CodeAnalysis.Sarif @@ -126,4 +127,4 @@ public int GetHashCode(Fix obj) return result; } } -} \ No newline at end of file +} diff --git a/src/Sarif/Autogenerated/Graph.cs b/src/Sarif/Autogenerated/Graph.cs index af355ba71..18b8c97a8 100644 --- a/src/Sarif/Autogenerated/Graph.cs +++ b/src/Sarif/Autogenerated/Graph.cs @@ -5,7 +5,9 @@ using System.CodeDom.Compiler; using System.Collections.Generic; using System.Runtime.Serialization; + using Microsoft.CodeAnalysis.Sarif.Readers; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif @@ -172,4 +174,4 @@ protected virtual void Init(Message description, IEnumerable nodes, IEnume } } } -} \ No newline at end of file +} diff --git a/src/Sarif/Autogenerated/GraphEqualityComparer.cs b/src/Sarif/Autogenerated/GraphEqualityComparer.cs index 84f83d920..df9175b9a 100644 --- a/src/Sarif/Autogenerated/GraphEqualityComparer.cs +++ b/src/Sarif/Autogenerated/GraphEqualityComparer.cs @@ -4,6 +4,7 @@ using System; using System.CodeDom.Compiler; using System.Collections.Generic; + using Microsoft.CodeAnalysis.Sarif.Readers; namespace Microsoft.CodeAnalysis.Sarif @@ -159,4 +160,4 @@ public int GetHashCode(Graph obj) return result; } } -} \ No newline at end of file +} diff --git a/src/Sarif/Autogenerated/GraphTraversal.cs b/src/Sarif/Autogenerated/GraphTraversal.cs index 55c547229..d34457c35 100644 --- a/src/Sarif/Autogenerated/GraphTraversal.cs +++ b/src/Sarif/Autogenerated/GraphTraversal.cs @@ -6,7 +6,9 @@ using System.Collections.Generic; using System.ComponentModel; using System.Runtime.Serialization; + using Microsoft.CodeAnalysis.Sarif.Readers; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif @@ -199,4 +201,4 @@ protected virtual void Init(int runGraphIndex, int resultGraphIndex, Message des } } } -} \ No newline at end of file +} diff --git a/src/Sarif/Autogenerated/GraphTraversalEqualityComparer.cs b/src/Sarif/Autogenerated/GraphTraversalEqualityComparer.cs index e009a9c24..e819633c0 100644 --- a/src/Sarif/Autogenerated/GraphTraversalEqualityComparer.cs +++ b/src/Sarif/Autogenerated/GraphTraversalEqualityComparer.cs @@ -4,6 +4,7 @@ using System; using System.CodeDom.Compiler; using System.Collections.Generic; + using Microsoft.CodeAnalysis.Sarif.Readers; namespace Microsoft.CodeAnalysis.Sarif @@ -186,4 +187,4 @@ public int GetHashCode(GraphTraversal obj) return result; } } -} \ No newline at end of file +} diff --git a/src/Sarif/Autogenerated/ISarifNode.cs b/src/Sarif/Autogenerated/ISarifNode.cs index d657455dc..4f9ea2f41 100644 --- a/src/Sarif/Autogenerated/ISarifNode.cs +++ b/src/Sarif/Autogenerated/ISarifNode.cs @@ -21,4 +21,4 @@ public interface ISarifNode /// ISarifNode DeepClone(); } -} \ No newline at end of file +} diff --git a/src/Sarif/Autogenerated/Invocation.cs b/src/Sarif/Autogenerated/Invocation.cs index b40d01327..f877a5e98 100644 --- a/src/Sarif/Autogenerated/Invocation.cs +++ b/src/Sarif/Autogenerated/Invocation.cs @@ -5,7 +5,9 @@ using System.CodeDom.Compiler; using System.Collections.Generic; using System.Runtime.Serialization; + using Microsoft.CodeAnalysis.Sarif.Readers; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif @@ -487,4 +489,4 @@ protected virtual void Init(string commandLine, IEnumerable arguments, I } } } -} \ No newline at end of file +} diff --git a/src/Sarif/Autogenerated/InvocationEqualityComparer.cs b/src/Sarif/Autogenerated/InvocationEqualityComparer.cs index d9024c5a8..a9a96635a 100644 --- a/src/Sarif/Autogenerated/InvocationEqualityComparer.cs +++ b/src/Sarif/Autogenerated/InvocationEqualityComparer.cs @@ -4,6 +4,7 @@ using System; using System.CodeDom.Compiler; using System.Collections.Generic; + using Microsoft.CodeAnalysis.Sarif.Readers; namespace Microsoft.CodeAnalysis.Sarif @@ -475,4 +476,4 @@ public int GetHashCode(Invocation obj) return result; } } -} \ No newline at end of file +} diff --git a/src/Sarif/Autogenerated/Location.cs b/src/Sarif/Autogenerated/Location.cs index adac3d66f..2c30eee16 100644 --- a/src/Sarif/Autogenerated/Location.cs +++ b/src/Sarif/Autogenerated/Location.cs @@ -6,7 +6,9 @@ using System.Collections.Generic; using System.ComponentModel; using System.Runtime.Serialization; + using Microsoft.CodeAnalysis.Sarif.Readers; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif @@ -228,4 +230,4 @@ protected virtual void Init(int id, PhysicalLocation physicalLocation, IEnumerab } } } -} \ No newline at end of file +} diff --git a/src/Sarif/Autogenerated/LocationEqualityComparer.cs b/src/Sarif/Autogenerated/LocationEqualityComparer.cs index 18409ea60..2bf8be2e1 100644 --- a/src/Sarif/Autogenerated/LocationEqualityComparer.cs +++ b/src/Sarif/Autogenerated/LocationEqualityComparer.cs @@ -4,6 +4,7 @@ using System; using System.CodeDom.Compiler; using System.Collections.Generic; + using Microsoft.CodeAnalysis.Sarif.Readers; namespace Microsoft.CodeAnalysis.Sarif @@ -208,4 +209,4 @@ public int GetHashCode(Location obj) return result; } } -} \ No newline at end of file +} diff --git a/src/Sarif/Autogenerated/LocationRelationship.cs b/src/Sarif/Autogenerated/LocationRelationship.cs index bb100be10..acc509c56 100644 --- a/src/Sarif/Autogenerated/LocationRelationship.cs +++ b/src/Sarif/Autogenerated/LocationRelationship.cs @@ -5,7 +5,9 @@ using System.CodeDom.Compiler; using System.Collections.Generic; using System.Runtime.Serialization; + using Microsoft.CodeAnalysis.Sarif.Readers; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif @@ -147,4 +149,4 @@ protected virtual void Init(int target, IEnumerable kinds, Message descr } } } -} \ No newline at end of file +} diff --git a/src/Sarif/Autogenerated/LocationRelationshipEqualityComparer.cs b/src/Sarif/Autogenerated/LocationRelationshipEqualityComparer.cs index e13838adf..82de60bef 100644 --- a/src/Sarif/Autogenerated/LocationRelationshipEqualityComparer.cs +++ b/src/Sarif/Autogenerated/LocationRelationshipEqualityComparer.cs @@ -4,6 +4,7 @@ using System; using System.CodeDom.Compiler; using System.Collections.Generic; + using Microsoft.CodeAnalysis.Sarif.Readers; namespace Microsoft.CodeAnalysis.Sarif @@ -132,4 +133,4 @@ public int GetHashCode(LocationRelationship obj) return result; } } -} \ No newline at end of file +} diff --git a/src/Sarif/Autogenerated/LogicalLocation.cs b/src/Sarif/Autogenerated/LogicalLocation.cs index 99465c33f..62bc71a20 100644 --- a/src/Sarif/Autogenerated/LogicalLocation.cs +++ b/src/Sarif/Autogenerated/LogicalLocation.cs @@ -6,7 +6,9 @@ using System.Collections.Generic; using System.ComponentModel; using System.Runtime.Serialization; + using Microsoft.CodeAnalysis.Sarif.Readers; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif @@ -169,4 +171,4 @@ protected virtual void Init(string name, int index, string fullyQualifiedName, s } } } -} \ No newline at end of file +} diff --git a/src/Sarif/Autogenerated/LogicalLocationEqualityComparer.cs b/src/Sarif/Autogenerated/LogicalLocationEqualityComparer.cs index 9db728c66..c95822681 100644 --- a/src/Sarif/Autogenerated/LogicalLocationEqualityComparer.cs +++ b/src/Sarif/Autogenerated/LogicalLocationEqualityComparer.cs @@ -4,6 +4,7 @@ using System; using System.CodeDom.Compiler; using System.Collections.Generic; + using Microsoft.CodeAnalysis.Sarif.Readers; namespace Microsoft.CodeAnalysis.Sarif @@ -135,4 +136,4 @@ public int GetHashCode(LogicalLocation obj) return result; } } -} \ No newline at end of file +} diff --git a/src/Sarif/Autogenerated/Message.cs b/src/Sarif/Autogenerated/Message.cs index e83232466..74fe3ead1 100644 --- a/src/Sarif/Autogenerated/Message.cs +++ b/src/Sarif/Autogenerated/Message.cs @@ -5,7 +5,9 @@ using System.CodeDom.Compiler; using System.Collections.Generic; using System.Runtime.Serialization; + using Microsoft.CodeAnalysis.Sarif.Readers; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif @@ -153,4 +155,4 @@ protected virtual void Init(string text, string markdown, string id, IEnumerable } } } -} \ No newline at end of file +} diff --git a/src/Sarif/Autogenerated/MessageEqualityComparer.cs b/src/Sarif/Autogenerated/MessageEqualityComparer.cs index 40142780a..4e9eed930 100644 --- a/src/Sarif/Autogenerated/MessageEqualityComparer.cs +++ b/src/Sarif/Autogenerated/MessageEqualityComparer.cs @@ -4,6 +4,7 @@ using System; using System.CodeDom.Compiler; using System.Collections.Generic; + using Microsoft.CodeAnalysis.Sarif.Readers; namespace Microsoft.CodeAnalysis.Sarif @@ -146,4 +147,4 @@ public int GetHashCode(Message obj) return result; } } -} \ No newline at end of file +} diff --git a/src/Sarif/Autogenerated/MultiformatMessageString.cs b/src/Sarif/Autogenerated/MultiformatMessageString.cs index a80121d84..b5aa3d8de 100644 --- a/src/Sarif/Autogenerated/MultiformatMessageString.cs +++ b/src/Sarif/Autogenerated/MultiformatMessageString.cs @@ -5,6 +5,7 @@ using System.CodeDom.Compiler; using System.Collections.Generic; using System.Runtime.Serialization; + using Microsoft.CodeAnalysis.Sarif.Readers; namespace Microsoft.CodeAnalysis.Sarif @@ -121,4 +122,4 @@ protected virtual void Init(string text, string markdown, IDictionary locations, Message message, Fa } } } -} \ No newline at end of file +} diff --git a/src/Sarif/Autogenerated/NotificationEqualityComparer.cs b/src/Sarif/Autogenerated/NotificationEqualityComparer.cs index f1de1de91..746a5e6e3 100644 --- a/src/Sarif/Autogenerated/NotificationEqualityComparer.cs +++ b/src/Sarif/Autogenerated/NotificationEqualityComparer.cs @@ -4,6 +4,7 @@ using System; using System.CodeDom.Compiler; using System.Collections.Generic; + using Microsoft.CodeAnalysis.Sarif.Readers; namespace Microsoft.CodeAnalysis.Sarif @@ -174,4 +175,4 @@ public int GetHashCode(Notification obj) return result; } } -} \ No newline at end of file +} diff --git a/src/Sarif/Autogenerated/PhysicalLocation.cs b/src/Sarif/Autogenerated/PhysicalLocation.cs index 8e6a63f2c..a56e4f2f7 100644 --- a/src/Sarif/Autogenerated/PhysicalLocation.cs +++ b/src/Sarif/Autogenerated/PhysicalLocation.cs @@ -5,6 +5,7 @@ using System.CodeDom.Compiler; using System.Collections.Generic; using System.Runtime.Serialization; + using Microsoft.CodeAnalysis.Sarif.Readers; namespace Microsoft.CodeAnalysis.Sarif @@ -157,4 +158,4 @@ protected virtual void Init(Address address, ArtifactLocation artifactLocation, } } } -} \ No newline at end of file +} diff --git a/src/Sarif/Autogenerated/PhysicalLocationEqualityComparer.cs b/src/Sarif/Autogenerated/PhysicalLocationEqualityComparer.cs index 46e94bf02..f27de1451 100644 --- a/src/Sarif/Autogenerated/PhysicalLocationEqualityComparer.cs +++ b/src/Sarif/Autogenerated/PhysicalLocationEqualityComparer.cs @@ -4,6 +4,7 @@ using System; using System.CodeDom.Compiler; using System.Collections.Generic; + using Microsoft.CodeAnalysis.Sarif.Readers; namespace Microsoft.CodeAnalysis.Sarif @@ -123,4 +124,4 @@ public int GetHashCode(PhysicalLocation obj) return result; } } -} \ No newline at end of file +} diff --git a/src/Sarif/Autogenerated/PropertyBag.cs b/src/Sarif/Autogenerated/PropertyBag.cs index 7497e9f76..cf2067b6a 100644 --- a/src/Sarif/Autogenerated/PropertyBag.cs +++ b/src/Sarif/Autogenerated/PropertyBag.cs @@ -5,6 +5,7 @@ using System.CodeDom.Compiler; using System.Collections.Generic; using System.Runtime.Serialization; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif @@ -108,4 +109,4 @@ protected virtual void Init(IEnumerable tags) } } } -} \ No newline at end of file +} diff --git a/src/Sarif/Autogenerated/PropertyBagEqualityComparer.cs b/src/Sarif/Autogenerated/PropertyBagEqualityComparer.cs index 7b15c55ac..3fb2770a8 100644 --- a/src/Sarif/Autogenerated/PropertyBagEqualityComparer.cs +++ b/src/Sarif/Autogenerated/PropertyBagEqualityComparer.cs @@ -77,4 +77,4 @@ public int GetHashCode(PropertyBag obj) return result; } } -} \ No newline at end of file +} diff --git a/src/Sarif/Autogenerated/Rectangle.cs b/src/Sarif/Autogenerated/Rectangle.cs index 6a53f2764..146303071 100644 --- a/src/Sarif/Autogenerated/Rectangle.cs +++ b/src/Sarif/Autogenerated/Rectangle.cs @@ -5,6 +5,7 @@ using System.CodeDom.Compiler; using System.Collections.Generic; using System.Runtime.Serialization; + using Microsoft.CodeAnalysis.Sarif.Readers; namespace Microsoft.CodeAnalysis.Sarif @@ -155,4 +156,4 @@ protected virtual void Init(double top, double left, double bottom, double right } } } -} \ No newline at end of file +} diff --git a/src/Sarif/Autogenerated/RectangleEqualityComparer.cs b/src/Sarif/Autogenerated/RectangleEqualityComparer.cs index 99edb3356..088b3c706 100644 --- a/src/Sarif/Autogenerated/RectangleEqualityComparer.cs +++ b/src/Sarif/Autogenerated/RectangleEqualityComparer.cs @@ -4,6 +4,7 @@ using System; using System.CodeDom.Compiler; using System.Collections.Generic; + using Microsoft.CodeAnalysis.Sarif.Readers; namespace Microsoft.CodeAnalysis.Sarif @@ -117,4 +118,4 @@ public int GetHashCode(Rectangle obj) return result; } } -} \ No newline at end of file +} diff --git a/src/Sarif/Autogenerated/Region.cs b/src/Sarif/Autogenerated/Region.cs index 5d8a694ec..a5cb00f87 100644 --- a/src/Sarif/Autogenerated/Region.cs +++ b/src/Sarif/Autogenerated/Region.cs @@ -6,7 +6,9 @@ using System.Collections.Generic; using System.ComponentModel; using System.Runtime.Serialization; + using Microsoft.CodeAnalysis.Sarif.Readers; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif @@ -227,4 +229,4 @@ protected virtual void Init(int startLine, int startColumn, int endLine, int end } } } -} \ No newline at end of file +} diff --git a/src/Sarif/Autogenerated/RegionEqualityComparer.cs b/src/Sarif/Autogenerated/RegionEqualityComparer.cs index 04cd93c74..6fa4b871e 100644 --- a/src/Sarif/Autogenerated/RegionEqualityComparer.cs +++ b/src/Sarif/Autogenerated/RegionEqualityComparer.cs @@ -4,6 +4,7 @@ using System; using System.CodeDom.Compiler; using System.Collections.Generic; + using Microsoft.CodeAnalysis.Sarif.Readers; namespace Microsoft.CodeAnalysis.Sarif @@ -161,4 +162,4 @@ public int GetHashCode(Region obj) return result; } } -} \ No newline at end of file +} diff --git a/src/Sarif/Autogenerated/Replacement.cs b/src/Sarif/Autogenerated/Replacement.cs index a402966c1..318d47bbc 100644 --- a/src/Sarif/Autogenerated/Replacement.cs +++ b/src/Sarif/Autogenerated/Replacement.cs @@ -5,6 +5,7 @@ using System.CodeDom.Compiler; using System.Collections.Generic; using System.Runtime.Serialization; + using Microsoft.CodeAnalysis.Sarif.Readers; namespace Microsoft.CodeAnalysis.Sarif @@ -129,4 +130,4 @@ protected virtual void Init(Region deletedRegion, ArtifactContent insertedConten } } } -} \ No newline at end of file +} diff --git a/src/Sarif/Autogenerated/ReplacementEqualityComparer.cs b/src/Sarif/Autogenerated/ReplacementEqualityComparer.cs index 1e8ae8fa2..ae552f94f 100644 --- a/src/Sarif/Autogenerated/ReplacementEqualityComparer.cs +++ b/src/Sarif/Autogenerated/ReplacementEqualityComparer.cs @@ -4,6 +4,7 @@ using System; using System.CodeDom.Compiler; using System.Collections.Generic; + using Microsoft.CodeAnalysis.Sarif.Readers; namespace Microsoft.CodeAnalysis.Sarif @@ -103,4 +104,4 @@ public int GetHashCode(Replacement obj) return result; } } -} \ No newline at end of file +} diff --git a/src/Sarif/Autogenerated/ReportingConfiguration.cs b/src/Sarif/Autogenerated/ReportingConfiguration.cs index a560cbffa..320ca9201 100644 --- a/src/Sarif/Autogenerated/ReportingConfiguration.cs +++ b/src/Sarif/Autogenerated/ReportingConfiguration.cs @@ -6,7 +6,9 @@ using System.Collections.Generic; using System.ComponentModel; using System.Runtime.Serialization; + using Microsoft.CodeAnalysis.Sarif.Readers; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif @@ -157,4 +159,4 @@ private void Init(bool enabled, FailureLevel level, double rank, IDictionary deprecatedIds, string guid, IEn } } } -} \ No newline at end of file +} diff --git a/src/Sarif/Autogenerated/ReportingDescriptorEqualityComparer.cs b/src/Sarif/Autogenerated/ReportingDescriptorEqualityComparer.cs index 2bf840718..b8c3eecc0 100644 --- a/src/Sarif/Autogenerated/ReportingDescriptorEqualityComparer.cs +++ b/src/Sarif/Autogenerated/ReportingDescriptorEqualityComparer.cs @@ -4,6 +4,7 @@ using System; using System.CodeDom.Compiler; using System.Collections.Generic; + using Microsoft.CodeAnalysis.Sarif.Readers; namespace Microsoft.CodeAnalysis.Sarif @@ -333,4 +334,4 @@ public int GetHashCode(ReportingDescriptor obj) return result; } } -} \ No newline at end of file +} diff --git a/src/Sarif/Autogenerated/ReportingDescriptorReference.cs b/src/Sarif/Autogenerated/ReportingDescriptorReference.cs index abeef5827..cef235cb0 100644 --- a/src/Sarif/Autogenerated/ReportingDescriptorReference.cs +++ b/src/Sarif/Autogenerated/ReportingDescriptorReference.cs @@ -6,7 +6,9 @@ using System.Collections.Generic; using System.ComponentModel; using System.Runtime.Serialization; + using Microsoft.CodeAnalysis.Sarif.Readers; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif @@ -150,4 +152,4 @@ protected virtual void Init(string id, int index, string guid, ToolComponentRefe } } } -} \ No newline at end of file +} diff --git a/src/Sarif/Autogenerated/ReportingDescriptorReferenceEqualityComparer.cs b/src/Sarif/Autogenerated/ReportingDescriptorReferenceEqualityComparer.cs index 903723a9f..6db9aa15f 100644 --- a/src/Sarif/Autogenerated/ReportingDescriptorReferenceEqualityComparer.cs +++ b/src/Sarif/Autogenerated/ReportingDescriptorReferenceEqualityComparer.cs @@ -4,6 +4,7 @@ using System; using System.CodeDom.Compiler; using System.Collections.Generic; + using Microsoft.CodeAnalysis.Sarif.Readers; namespace Microsoft.CodeAnalysis.Sarif @@ -119,4 +120,4 @@ public int GetHashCode(ReportingDescriptorReference obj) return result; } } -} \ No newline at end of file +} diff --git a/src/Sarif/Autogenerated/ReportingDescriptorRelationship.cs b/src/Sarif/Autogenerated/ReportingDescriptorRelationship.cs index 9d448f5ea..a6a927548 100644 --- a/src/Sarif/Autogenerated/ReportingDescriptorRelationship.cs +++ b/src/Sarif/Autogenerated/ReportingDescriptorRelationship.cs @@ -5,7 +5,9 @@ using System.CodeDom.Compiler; using System.Collections.Generic; using System.Runtime.Serialization; + using Microsoft.CodeAnalysis.Sarif.Readers; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif @@ -151,4 +153,4 @@ protected virtual void Init(ReportingDescriptorReference target, IEnumerable invocations, Conversion con } } } -} \ No newline at end of file +} diff --git a/src/Sarif/Autogenerated/RunAutomationDetails.cs b/src/Sarif/Autogenerated/RunAutomationDetails.cs index 6a159930e..35bcd573a 100644 --- a/src/Sarif/Autogenerated/RunAutomationDetails.cs +++ b/src/Sarif/Autogenerated/RunAutomationDetails.cs @@ -5,6 +5,7 @@ using System.CodeDom.Compiler; using System.Collections.Generic; using System.Runtime.Serialization; + using Microsoft.CodeAnalysis.Sarif.Readers; namespace Microsoft.CodeAnalysis.Sarif @@ -145,4 +146,4 @@ protected virtual void Init(Message description, string id, string guid, string } } } -} \ No newline at end of file +} diff --git a/src/Sarif/Autogenerated/RunAutomationDetailsEqualityComparer.cs b/src/Sarif/Autogenerated/RunAutomationDetailsEqualityComparer.cs index 84b68b10b..4b28e068c 100644 --- a/src/Sarif/Autogenerated/RunAutomationDetailsEqualityComparer.cs +++ b/src/Sarif/Autogenerated/RunAutomationDetailsEqualityComparer.cs @@ -4,6 +4,7 @@ using System; using System.CodeDom.Compiler; using System.Collections.Generic; + using Microsoft.CodeAnalysis.Sarif.Readers; namespace Microsoft.CodeAnalysis.Sarif @@ -123,4 +124,4 @@ public int GetHashCode(RunAutomationDetails obj) return result; } } -} \ No newline at end of file +} diff --git a/src/Sarif/Autogenerated/RunEqualityComparer.cs b/src/Sarif/Autogenerated/RunEqualityComparer.cs index 5996c311a..eb7c7e528 100644 --- a/src/Sarif/Autogenerated/RunEqualityComparer.cs +++ b/src/Sarif/Autogenerated/RunEqualityComparer.cs @@ -4,6 +4,7 @@ using System; using System.CodeDom.Compiler; using System.Collections.Generic; + using Microsoft.CodeAnalysis.Sarif.Readers; namespace Microsoft.CodeAnalysis.Sarif @@ -745,4 +746,4 @@ public int GetHashCode(Run obj) return result; } } -} \ No newline at end of file +} diff --git a/src/Sarif/Autogenerated/SarifLog.cs b/src/Sarif/Autogenerated/SarifLog.cs index 9a94b3602..97611a7e2 100644 --- a/src/Sarif/Autogenerated/SarifLog.cs +++ b/src/Sarif/Autogenerated/SarifLog.cs @@ -5,7 +5,9 @@ using System.CodeDom.Compiler; using System.Collections.Generic; using System.Runtime.Serialization; + using Microsoft.CodeAnalysis.Sarif.Readers; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif @@ -186,4 +188,4 @@ private void Init(Uri schemaUri, SarifVersion version, IEnumerable runs, IE } } } -} \ No newline at end of file +} diff --git a/src/Sarif/Autogenerated/SarifLogEqualityComparer.cs b/src/Sarif/Autogenerated/SarifLogEqualityComparer.cs index 5d31b393d..b66850f8a 100644 --- a/src/Sarif/Autogenerated/SarifLogEqualityComparer.cs +++ b/src/Sarif/Autogenerated/SarifLogEqualityComparer.cs @@ -4,6 +4,7 @@ using System; using System.CodeDom.Compiler; using System.Collections.Generic; + using Microsoft.CodeAnalysis.Sarif.Readers; namespace Microsoft.CodeAnalysis.Sarif @@ -165,4 +166,4 @@ public int GetHashCode(SarifLog obj) return result; } } -} \ No newline at end of file +} diff --git a/src/Sarif/Autogenerated/SarifNodeKind.cs b/src/Sarif/Autogenerated/SarifNodeKind.cs index c3a1abaab..f2b495e87 100644 --- a/src/Sarif/Autogenerated/SarifNodeKind.cs +++ b/src/Sarif/Autogenerated/SarifNodeKind.cs @@ -228,4 +228,4 @@ public enum SarifNodeKind /// WebResponse } -} \ No newline at end of file +} diff --git a/src/Sarif/Autogenerated/SarifRewritingVisitor.cs b/src/Sarif/Autogenerated/SarifRewritingVisitor.cs index 378e77e82..f0d843f28 100644 --- a/src/Sarif/Autogenerated/SarifRewritingVisitor.cs +++ b/src/Sarif/Autogenerated/SarifRewritingVisitor.cs @@ -1454,4 +1454,4 @@ public virtual WebResponse VisitWebResponse(WebResponse node) return node; } } -} \ No newline at end of file +} diff --git a/src/Sarif/Autogenerated/SarifVersion.cs b/src/Sarif/Autogenerated/SarifVersion.cs index 0587d68ae..cbee06635 100644 --- a/src/Sarif/Autogenerated/SarifVersion.cs +++ b/src/Sarif/Autogenerated/SarifVersion.cs @@ -15,4 +15,4 @@ public enum SarifVersion OneZeroZero, Current } -} \ No newline at end of file +} diff --git a/src/Sarif/Autogenerated/SpecialLocations.cs b/src/Sarif/Autogenerated/SpecialLocations.cs index 65add4482..f174fb943 100644 --- a/src/Sarif/Autogenerated/SpecialLocations.cs +++ b/src/Sarif/Autogenerated/SpecialLocations.cs @@ -5,6 +5,7 @@ using System.CodeDom.Compiler; using System.Collections.Generic; using System.Runtime.Serialization; + using Microsoft.CodeAnalysis.Sarif.Readers; namespace Microsoft.CodeAnalysis.Sarif @@ -115,4 +116,4 @@ protected virtual void Init(ArtifactLocation displayBase, IDictionary frames, IDi } } } -} \ No newline at end of file +} diff --git a/src/Sarif/Autogenerated/StackEqualityComparer.cs b/src/Sarif/Autogenerated/StackEqualityComparer.cs index 4d6fe53ee..24881a6c0 100644 --- a/src/Sarif/Autogenerated/StackEqualityComparer.cs +++ b/src/Sarif/Autogenerated/StackEqualityComparer.cs @@ -4,6 +4,7 @@ using System; using System.CodeDom.Compiler; using System.Collections.Generic; + using Microsoft.CodeAnalysis.Sarif.Readers; namespace Microsoft.CodeAnalysis.Sarif @@ -126,4 +127,4 @@ public int GetHashCode(Stack obj) return result; } } -} \ No newline at end of file +} diff --git a/src/Sarif/Autogenerated/StackFrame.cs b/src/Sarif/Autogenerated/StackFrame.cs index b24be34cb..411e1c73f 100644 --- a/src/Sarif/Autogenerated/StackFrame.cs +++ b/src/Sarif/Autogenerated/StackFrame.cs @@ -5,7 +5,9 @@ using System.CodeDom.Compiler; using System.Collections.Generic; using System.Runtime.Serialization; + using Microsoft.CodeAnalysis.Sarif.Readers; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif @@ -157,4 +159,4 @@ protected virtual void Init(Location location, string module, int threadId, IEnu } } } -} \ No newline at end of file +} diff --git a/src/Sarif/Autogenerated/StackFrameEqualityComparer.cs b/src/Sarif/Autogenerated/StackFrameEqualityComparer.cs index 780dfb645..a35c753ef 100644 --- a/src/Sarif/Autogenerated/StackFrameEqualityComparer.cs +++ b/src/Sarif/Autogenerated/StackFrameEqualityComparer.cs @@ -4,6 +4,7 @@ using System; using System.CodeDom.Compiler; using System.Collections.Generic; + using Microsoft.CodeAnalysis.Sarif.Readers; namespace Microsoft.CodeAnalysis.Sarif @@ -142,4 +143,4 @@ public int GetHashCode(StackFrame obj) return result; } } -} \ No newline at end of file +} diff --git a/src/Sarif/Autogenerated/Suppression.cs b/src/Sarif/Autogenerated/Suppression.cs index 4ad18f219..b3119970c 100644 --- a/src/Sarif/Autogenerated/Suppression.cs +++ b/src/Sarif/Autogenerated/Suppression.cs @@ -5,7 +5,9 @@ using System.CodeDom.Compiler; using System.Collections.Generic; using System.Runtime.Serialization; + using Microsoft.CodeAnalysis.Sarif.Readers; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif @@ -158,4 +160,4 @@ protected virtual void Init(string guid, SuppressionKind kind, SuppressionStatus } } } -} \ No newline at end of file +} diff --git a/src/Sarif/Autogenerated/SuppressionEqualityComparer.cs b/src/Sarif/Autogenerated/SuppressionEqualityComparer.cs index ecd37a5f0..c99a8b08a 100644 --- a/src/Sarif/Autogenerated/SuppressionEqualityComparer.cs +++ b/src/Sarif/Autogenerated/SuppressionEqualityComparer.cs @@ -4,6 +4,7 @@ using System; using System.CodeDom.Compiler; using System.Collections.Generic; + using Microsoft.CodeAnalysis.Sarif.Readers; namespace Microsoft.CodeAnalysis.Sarif @@ -125,4 +126,4 @@ public int GetHashCode(Suppression obj) return result; } } -} \ No newline at end of file +} diff --git a/src/Sarif/Autogenerated/SuppressionKind.cs b/src/Sarif/Autogenerated/SuppressionKind.cs index bf683f471..fd4d8d7e5 100644 --- a/src/Sarif/Autogenerated/SuppressionKind.cs +++ b/src/Sarif/Autogenerated/SuppressionKind.cs @@ -15,4 +15,4 @@ public enum SuppressionKind InSource, External } -} \ No newline at end of file +} diff --git a/src/Sarif/Autogenerated/SuppressionStatus.cs b/src/Sarif/Autogenerated/SuppressionStatus.cs index 3bedd5775..da6580912 100644 --- a/src/Sarif/Autogenerated/SuppressionStatus.cs +++ b/src/Sarif/Autogenerated/SuppressionStatus.cs @@ -16,4 +16,4 @@ public enum SuppressionStatus UnderReview, Rejected } -} \ No newline at end of file +} diff --git a/src/Sarif/Autogenerated/ThreadFlow.cs b/src/Sarif/Autogenerated/ThreadFlow.cs index aabe20ada..169af2062 100644 --- a/src/Sarif/Autogenerated/ThreadFlow.cs +++ b/src/Sarif/Autogenerated/ThreadFlow.cs @@ -5,6 +5,7 @@ using System.CodeDom.Compiler; using System.Collections.Generic; using System.Runtime.Serialization; + using Microsoft.CodeAnalysis.Sarif.Readers; namespace Microsoft.CodeAnalysis.Sarif @@ -172,4 +173,4 @@ protected virtual void Init(string id, Message message, object initialState, obj } } } -} \ No newline at end of file +} diff --git a/src/Sarif/Autogenerated/ThreadFlowEqualityComparer.cs b/src/Sarif/Autogenerated/ThreadFlowEqualityComparer.cs index 482fd51e6..0e2095b7c 100644 --- a/src/Sarif/Autogenerated/ThreadFlowEqualityComparer.cs +++ b/src/Sarif/Autogenerated/ThreadFlowEqualityComparer.cs @@ -4,6 +4,7 @@ using System; using System.CodeDom.Compiler; using System.Collections.Generic; + using Microsoft.CodeAnalysis.Sarif.Readers; namespace Microsoft.CodeAnalysis.Sarif @@ -156,4 +157,4 @@ public int GetHashCode(ThreadFlow obj) return result; } } -} \ No newline at end of file +} diff --git a/src/Sarif/Autogenerated/ThreadFlowLocation.cs b/src/Sarif/Autogenerated/ThreadFlowLocation.cs index 02d02a7cd..21aa1e4ef 100644 --- a/src/Sarif/Autogenerated/ThreadFlowLocation.cs +++ b/src/Sarif/Autogenerated/ThreadFlowLocation.cs @@ -6,7 +6,9 @@ using System.Collections.Generic; using System.ComponentModel; using System.Runtime.Serialization; + using Microsoft.CodeAnalysis.Sarif.Readers; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif @@ -297,4 +299,4 @@ protected virtual void Init(int index, Location location, Stack stack, IEnumerab } } } -} \ No newline at end of file +} diff --git a/src/Sarif/Autogenerated/ThreadFlowLocationEqualityComparer.cs b/src/Sarif/Autogenerated/ThreadFlowLocationEqualityComparer.cs index 9d2f9b38e..61d2a91f9 100644 --- a/src/Sarif/Autogenerated/ThreadFlowLocationEqualityComparer.cs +++ b/src/Sarif/Autogenerated/ThreadFlowLocationEqualityComparer.cs @@ -4,6 +4,7 @@ using System; using System.CodeDom.Compiler; using System.Collections.Generic; + using Microsoft.CodeAnalysis.Sarif.Readers; namespace Microsoft.CodeAnalysis.Sarif @@ -267,4 +268,4 @@ public int GetHashCode(ThreadFlowLocation obj) return result; } } -} \ No newline at end of file +} diff --git a/src/Sarif/Autogenerated/ThreadFlowLocationImportance.cs b/src/Sarif/Autogenerated/ThreadFlowLocationImportance.cs index 586eacea3..bdaec34cd 100644 --- a/src/Sarif/Autogenerated/ThreadFlowLocationImportance.cs +++ b/src/Sarif/Autogenerated/ThreadFlowLocationImportance.cs @@ -15,4 +15,4 @@ public enum ThreadFlowLocationImportance Essential, Unimportant } -} \ No newline at end of file +} diff --git a/src/Sarif/Autogenerated/Tool.cs b/src/Sarif/Autogenerated/Tool.cs index 2992dae86..42592f8e5 100644 --- a/src/Sarif/Autogenerated/Tool.cs +++ b/src/Sarif/Autogenerated/Tool.cs @@ -5,7 +5,9 @@ using System.CodeDom.Compiler; using System.Collections.Generic; using System.Runtime.Serialization; + using Microsoft.CodeAnalysis.Sarif.Readers; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif @@ -144,4 +146,4 @@ protected virtual void Init(ToolComponent driver, IEnumerable ext } } } -} \ No newline at end of file +} diff --git a/src/Sarif/Autogenerated/ToolComponent.cs b/src/Sarif/Autogenerated/ToolComponent.cs index 5a424ae20..e45299c9e 100644 --- a/src/Sarif/Autogenerated/ToolComponent.cs +++ b/src/Sarif/Autogenerated/ToolComponent.cs @@ -6,7 +6,9 @@ using System.Collections.Generic; using System.ComponentModel; using System.Runtime.Serialization; + using Microsoft.CodeAnalysis.Sarif.Readers; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif @@ -503,4 +505,4 @@ protected virtual void Init(string guid, string name, string organization, strin } } } -} \ No newline at end of file +} diff --git a/src/Sarif/Autogenerated/ToolComponentContents.cs b/src/Sarif/Autogenerated/ToolComponentContents.cs index 8c3e8af3e..f08aecf1b 100644 --- a/src/Sarif/Autogenerated/ToolComponentContents.cs +++ b/src/Sarif/Autogenerated/ToolComponentContents.cs @@ -17,4 +17,4 @@ public enum ToolComponentContents LocalizedData = 1, NonLocalizedData = 2 } -} \ No newline at end of file +} diff --git a/src/Sarif/Autogenerated/ToolComponentEqualityComparer.cs b/src/Sarif/Autogenerated/ToolComponentEqualityComparer.cs index 90254b3a6..a9a38c60a 100644 --- a/src/Sarif/Autogenerated/ToolComponentEqualityComparer.cs +++ b/src/Sarif/Autogenerated/ToolComponentEqualityComparer.cs @@ -4,6 +4,7 @@ using System; using System.CodeDom.Compiler; using System.Collections.Generic; + using Microsoft.CodeAnalysis.Sarif.Readers; namespace Microsoft.CodeAnalysis.Sarif @@ -488,4 +489,4 @@ public int GetHashCode(ToolComponent obj) return result; } } -} \ No newline at end of file +} diff --git a/src/Sarif/Autogenerated/ToolComponentReference.cs b/src/Sarif/Autogenerated/ToolComponentReference.cs index d653e3600..752586bcc 100644 --- a/src/Sarif/Autogenerated/ToolComponentReference.cs +++ b/src/Sarif/Autogenerated/ToolComponentReference.cs @@ -6,7 +6,9 @@ using System.Collections.Generic; using System.ComponentModel; using System.Runtime.Serialization; + using Microsoft.CodeAnalysis.Sarif.Readers; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif @@ -136,4 +138,4 @@ protected virtual void Init(string name, int index, string guid, IDictionary CalculatePossibleRemappings(IEnumerable baseline, IEnumerable current); } -} \ No newline at end of file +} diff --git a/src/Sarif/Baseline/ResultMatching/RemappingCalculators/SarifLogRemapping.cs b/src/Sarif/Baseline/ResultMatching/RemappingCalculators/SarifLogRemapping.cs index ab905c47d..e66ee52a3 100644 --- a/src/Sarif/Baseline/ResultMatching/RemappingCalculators/SarifLogRemapping.cs +++ b/src/Sarif/Baseline/ResultMatching/RemappingCalculators/SarifLogRemapping.cs @@ -11,4 +11,4 @@ public class SarifLogRemapping public Func RemapResult { get; private set; } } -} \ No newline at end of file +} diff --git a/src/Sarif/Baseline/ResultMatching/ResultMatchingBaselinerFactory.cs b/src/Sarif/Baseline/ResultMatching/ResultMatchingBaselinerFactory.cs index 8ad23b138..0fcd82a57 100644 --- a/src/Sarif/Baseline/ResultMatching/ResultMatchingBaselinerFactory.cs +++ b/src/Sarif/Baseline/ResultMatching/ResultMatchingBaselinerFactory.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; + using Microsoft.CodeAnalysis.Sarif.Baseline.ResultMatching.ExactMatchers; using Microsoft.CodeAnalysis.Sarif.Baseline.ResultMatching.HeuristicMatchers; diff --git a/src/Sarif/Baseline/V2/WhatComponent.cs b/src/Sarif/Baseline/V2/WhatComponent.cs index 7072ec8e4..d9f37cc63 100644 --- a/src/Sarif/Baseline/V2/WhatComponent.cs +++ b/src/Sarif/Baseline/V2/WhatComponent.cs @@ -38,7 +38,7 @@ public bool Equals(WhatComponent other) public override bool Equals(object obj) { - if(obj is WhatComponent) + if (obj is WhatComponent) { return Equals((WhatComponent)obj); } diff --git a/src/Sarif/Baseline/V2/WhatMap.cs b/src/Sarif/Baseline/V2/WhatMap.cs index f01e1cb8c..81b1417f3 100644 --- a/src/Sarif/Baseline/V2/WhatMap.cs +++ b/src/Sarif/Baseline/V2/WhatMap.cs @@ -19,7 +19,7 @@ internal class WhatMap // This dictionary tracks which WhatComponents are unique. // The value is the index of the result with that value, if unique, or -1 if in several. private readonly Dictionary _map; - + public WhatMap() { _map = new Dictionary(); @@ -31,7 +31,7 @@ private void Add(ExtractedResult result, HashSet otherRunLocations, int string locationSpecifier = WhereComparer.LocationSpecifier(result, otherRunLocations); // Add Result attributes used as matching hints in a "bucket" for the Rule x LocationSpecifier x AttributeName - foreach(WhatComponent component in result.WhatProperties(locationSpecifier)) + foreach (WhatComponent component in result.WhatProperties(locationSpecifier)) { Add(component, index); } diff --git a/src/Sarif/Baseline/V2/WhereComparer.cs b/src/Sarif/Baseline/V2/WhereComparer.cs index a23348a50..3abf6cb45 100644 --- a/src/Sarif/Baseline/V2/WhereComparer.cs +++ b/src/Sarif/Baseline/V2/WhereComparer.cs @@ -218,7 +218,7 @@ public static void AddLocationIdentifiers(ExtractedResult result, HashSet public partial class CodeFlow { - public bool ShouldSerializeThreadFlows() + public bool ShouldSerializeThreadFlows() { - return this.ThreadFlows.HasAtLeastOneNonDefaultValue(ThreadFlow.ValueComparer); + return this.ThreadFlows.HasAtLeastOneNonDefaultValue(ThreadFlow.ValueComparer); } } } diff --git a/src/Sarif/Core/IPropertyBagHolder.cs b/src/Sarif/Core/IPropertyBagHolder.cs index ccd5fff1c..471396af5 100644 --- a/src/Sarif/Core/IPropertyBagHolder.cs +++ b/src/Sarif/Core/IPropertyBagHolder.cs @@ -19,4 +19,4 @@ public interface IPropertyBagHolder void SetPropertiesFrom(IPropertyBagHolder other); void RemoveProperty(string propertyName); } -} \ No newline at end of file +} diff --git a/src/Sarif/Core/PropertyBagHolder.cs b/src/Sarif/Core/PropertyBagHolder.cs index 148860acc..085bf0369 100644 --- a/src/Sarif/Core/PropertyBagHolder.cs +++ b/src/Sarif/Core/PropertyBagHolder.cs @@ -6,8 +6,10 @@ using System.Diagnostics; using System.Globalization; using System.Linq; + using Microsoft.CodeAnalysis.Sarif.Readers; using Microsoft.CodeAnalysis.Sarif.Visitors; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Sarif/Core/SarifLog.cs b/src/Sarif/Core/SarifLog.cs index 465b9b23a..a6516b5ef 100644 --- a/src/Sarif/Core/SarifLog.cs +++ b/src/Sarif/Core/SarifLog.cs @@ -1,5 +1,7 @@ using System.IO; + using Microsoft.CodeAnalysis.Sarif.Readers; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Sarif/Core/SerializedPropertyInfo.cs b/src/Sarif/Core/SerializedPropertyInfo.cs index 5470e679a..e3ea41298 100644 --- a/src/Sarif/Core/SerializedPropertyInfo.cs +++ b/src/Sarif/Core/SerializedPropertyInfo.cs @@ -3,6 +3,7 @@ using Microsoft.CodeAnalysis.Sarif.Readers; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Sarif/ExtensionMethods.cs b/src/Sarif/ExtensionMethods.cs index af88a1b56..cee132f46 100644 --- a/src/Sarif/ExtensionMethods.cs +++ b/src/Sarif/ExtensionMethods.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information.using System; -using Microsoft.CodeAnalysis.Sarif.Visitors; - using System; using System.Collections; using System.Collections.Generic; @@ -13,6 +11,8 @@ using System.Text.RegularExpressions; using System.Xml; +using Microsoft.CodeAnalysis.Sarif.Visitors; + namespace Microsoft.CodeAnalysis.Sarif { public static class ExtensionMethods @@ -552,4 +552,4 @@ internal static void ConsumeElementOfDepth(this XmlReader xmlReader, int endElem } } } -} \ No newline at end of file +} diff --git a/src/Sarif/ExternalProcess.cs b/src/Sarif/ExternalProcess.cs index dc742c820..dbf408926 100644 --- a/src/Sarif/ExternalProcess.cs +++ b/src/Sarif/ExternalProcess.cs @@ -67,4 +67,4 @@ public ExternalProcess( } } } -} \ No newline at end of file +} diff --git a/src/Sarif/FileRegionsCache.cs b/src/Sarif/FileRegionsCache.cs index 201eaac95..88bf7ade1 100644 --- a/src/Sarif/FileRegionsCache.cs +++ b/src/Sarif/FileRegionsCache.cs @@ -326,4 +326,4 @@ private static void Assert(bool condition) //Debug.Assert(condition); } } -} \ No newline at end of file +} diff --git a/src/Sarif/GlobalSuppressions.cs b/src/Sarif/GlobalSuppressions.cs index 8bb48e0a1..e5bcc21a4 100644 --- a/src/Sarif/GlobalSuppressions.cs +++ b/src/Sarif/GlobalSuppressions.cs @@ -1,3 +1,3 @@ using System.Diagnostics.CodeAnalysis; -[module: SuppressMessage("Microsoft.Security.Xml", "CA3053:UseXmlSecureResolver", Scope = "member", Target = "Microsoft.CodeAnalysis.Sarif.PropertiesDictionary.#LoadFromXml(System.IO.Stream)")] \ No newline at end of file +[module: SuppressMessage("Microsoft.Security.Xml", "CA3053:UseXmlSecureResolver", Scope = "member", Target = "Microsoft.CodeAnalysis.Sarif.PropertiesDictionary.#LoadFromXml(System.IO.Stream)")] diff --git a/src/Sarif/IConsoleCapture.cs b/src/Sarif/IConsoleCapture.cs index f7ce2d69f..0abdcf528 100644 --- a/src/Sarif/IConsoleCapture.cs +++ b/src/Sarif/IConsoleCapture.cs @@ -12,4 +12,4 @@ public interface IConsoleCapture string Text { get; } Task Capture(StreamReader reader, CancellationToken cancellationToken); } -} \ No newline at end of file +} diff --git a/src/Sarif/IOption.cs b/src/Sarif/IOption.cs index beb09646d..da2767336 100644 --- a/src/Sarif/IOption.cs +++ b/src/Sarif/IOption.cs @@ -15,4 +15,3 @@ public interface IOption bool IsPerLanguage { get; } } } - diff --git a/src/Sarif/IOptionsProvider.cs b/src/Sarif/IOptionsProvider.cs index cbc143004..157c6b4f9 100644 --- a/src/Sarif/IOptionsProvider.cs +++ b/src/Sarif/IOptionsProvider.cs @@ -10,4 +10,4 @@ public interface IOptionsProvider [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate", Justification = "This method is expensive and so should not be a property")] IEnumerable GetOptions(); } -} \ No newline at end of file +} diff --git a/src/Sarif/IntegerSet.cs b/src/Sarif/IntegerSet.cs index 0d2ad6aca..4418b4b38 100644 --- a/src/Sarif/IntegerSet.cs +++ b/src/Sarif/IntegerSet.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.Runtime.Serialization; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Sarif/NotYetAutoGenerated/Address.cs b/src/Sarif/NotYetAutoGenerated/Address.cs index ddaef8100..0538ddc2f 100644 --- a/src/Sarif/NotYetAutoGenerated/Address.cs +++ b/src/Sarif/NotYetAutoGenerated/Address.cs @@ -6,7 +6,9 @@ using System.Collections.Generic; using System.ComponentModel; using System.Runtime.Serialization; + using Microsoft.CodeAnalysis.Sarif.Readers; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif @@ -204,4 +206,4 @@ private void Init(int absoluteAddress, int? relativeAddress, int? length, string } } } -} \ No newline at end of file +} diff --git a/src/Sarif/NotYetAutoGenerated/Invocation.cs b/src/Sarif/NotYetAutoGenerated/Invocation.cs index b40d01327..f877a5e98 100644 --- a/src/Sarif/NotYetAutoGenerated/Invocation.cs +++ b/src/Sarif/NotYetAutoGenerated/Invocation.cs @@ -5,7 +5,9 @@ using System.CodeDom.Compiler; using System.Collections.Generic; using System.Runtime.Serialization; + using Microsoft.CodeAnalysis.Sarif.Readers; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif @@ -487,4 +489,4 @@ protected virtual void Init(string commandLine, IEnumerable arguments, I } } } -} \ No newline at end of file +} diff --git a/src/Sarif/NotYetAutoGenerated/ReportingConfiguration.cs b/src/Sarif/NotYetAutoGenerated/ReportingConfiguration.cs index a560cbffa..320ca9201 100644 --- a/src/Sarif/NotYetAutoGenerated/ReportingConfiguration.cs +++ b/src/Sarif/NotYetAutoGenerated/ReportingConfiguration.cs @@ -6,7 +6,9 @@ using System.Collections.Generic; using System.ComponentModel; using System.Runtime.Serialization; + using Microsoft.CodeAnalysis.Sarif.Readers; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif @@ -157,4 +159,4 @@ private void Init(bool enabled, FailureLevel level, double rank, IDictionary deprecatedIds, string guid, IEn } } } -} \ No newline at end of file +} diff --git a/src/Sarif/NotYetAutoGenerated/Result.cs b/src/Sarif/NotYetAutoGenerated/Result.cs index cae285333..451e10051 100644 --- a/src/Sarif/NotYetAutoGenerated/Result.cs +++ b/src/Sarif/NotYetAutoGenerated/Result.cs @@ -6,7 +6,9 @@ using System.Collections.Generic; using System.ComponentModel; using System.Runtime.Serialization; + using Microsoft.CodeAnalysis.Sarif.Readers; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif @@ -666,4 +668,4 @@ private void Init(string ruleId, int ruleIndex, ReportingDescriptorReference rul } } } -} \ No newline at end of file +} diff --git a/src/Sarif/NotYetAutoGenerated/Run.cs b/src/Sarif/NotYetAutoGenerated/Run.cs index 424ef49f0..e6e75f668 100644 --- a/src/Sarif/NotYetAutoGenerated/Run.cs +++ b/src/Sarif/NotYetAutoGenerated/Run.cs @@ -6,7 +6,9 @@ using System.Collections.Generic; using System.ComponentModel; using System.Runtime.Serialization; + using Microsoft.CodeAnalysis.Sarif.Readers; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif @@ -682,4 +684,4 @@ private void Init(Tool tool, IEnumerable invocations, Conversion con } } } -} \ No newline at end of file +} diff --git a/src/Sarif/NotYetAutoGenerated/SarifLog.cs b/src/Sarif/NotYetAutoGenerated/SarifLog.cs index 9a94b3602..97611a7e2 100644 --- a/src/Sarif/NotYetAutoGenerated/SarifLog.cs +++ b/src/Sarif/NotYetAutoGenerated/SarifLog.cs @@ -5,7 +5,9 @@ using System.CodeDom.Compiler; using System.Collections.Generic; using System.Runtime.Serialization; + using Microsoft.CodeAnalysis.Sarif.Readers; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif @@ -186,4 +188,4 @@ private void Init(Uri schemaUri, SarifVersion version, IEnumerable runs, IE } } } -} \ No newline at end of file +} diff --git a/src/Sarif/Notes.cs b/src/Sarif/Notes.cs index 10595d30c..48529a550 100644 --- a/src/Sarif/Notes.cs +++ b/src/Sarif/Notes.cs @@ -31,4 +31,4 @@ public static void LogNotApplicableToSpecifiedTarget(IAnalysisContext context, s context.RuntimeErrors |= RuntimeConditions.RuleNotApplicableToTarget; } } -} \ No newline at end of file +} diff --git a/src/Sarif/PerLanguageOption.cs b/src/Sarif/PerLanguageOption.cs index 7f81a6fef..ca055917c 100644 --- a/src/Sarif/PerLanguageOption.cs +++ b/src/Sarif/PerLanguageOption.cs @@ -83,4 +83,4 @@ public override string ToString() return string.Format(CultureInfo.InvariantCulture, "{0} - {1}", this.Feature, this.Name); } } -} \ No newline at end of file +} diff --git a/src/Sarif/Processors/Log/SarifLogExtensionMethods.cs b/src/Sarif/Processors/Log/SarifLogExtensionMethods.cs index f8ce2ffb4..c5da0412f 100644 --- a/src/Sarif/Processors/Log/SarifLogExtensionMethods.cs +++ b/src/Sarif/Processors/Log/SarifLogExtensionMethods.cs @@ -1,12 +1,12 @@ // Copyright (c) Microsoft. All rights reserved. Licensed under the MIT // license. See LICENSE file in the project root for full license information. -using Microsoft.CodeAnalysis.Sarif.Visitors; - using System; using System.Collections.Generic; using System.Linq; +using Microsoft.CodeAnalysis.Sarif.Visitors; + namespace Microsoft.CodeAnalysis.Sarif.Processors { /// diff --git a/src/Sarif/Processors/Log/SarifLogPipeline.cs b/src/Sarif/Processors/Log/SarifLogPipeline.cs index ad22783e3..0ec7bb986 100644 --- a/src/Sarif/Processors/Log/SarifLogPipeline.cs +++ b/src/Sarif/Processors/Log/SarifLogPipeline.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.Linq; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.Processors diff --git a/src/Sarif/Properties/AssemblyInfo.cs b/src/Sarif/Properties/AssemblyInfo.cs index f14fe0b91..3fd1bec8e 100644 --- a/src/Sarif/Properties/AssemblyInfo.cs +++ b/src/Sarif/Properties/AssemblyInfo.cs @@ -1,2 +1,2 @@ // Copyright (c) Microsoft. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. \ No newline at end of file +// Licensed under the MIT license. See LICENSE file in the project root for full license information. diff --git a/src/Sarif/PropertiesDictionary.cs b/src/Sarif/PropertiesDictionary.cs index 8fb66d339..7cbbe9f19 100644 --- a/src/Sarif/PropertiesDictionary.cs +++ b/src/Sarif/PropertiesDictionary.cs @@ -8,6 +8,7 @@ using System.IO; using System.Runtime.Serialization; using System.Xml; + using Newtonsoft.Json; using Newtonsoft.Json.Linq; diff --git a/src/Sarif/Readers/DateTimeConverter.cs b/src/Sarif/Readers/DateTimeConverter.cs index add0e22e4..cd3280caa 100644 --- a/src/Sarif/Readers/DateTimeConverter.cs +++ b/src/Sarif/Readers/DateTimeConverter.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Globalization; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.Readers diff --git a/src/Sarif/Readers/DeferredDictionaryConverter.cs b/src/Sarif/Readers/DeferredDictionaryConverter.cs index ff1993d1e..26ff7f943 100644 --- a/src/Sarif/Readers/DeferredDictionaryConverter.cs +++ b/src/Sarif/Readers/DeferredDictionaryConverter.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Collections.Generic; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.Readers diff --git a/src/Sarif/Readers/DeferredListConverter.cs b/src/Sarif/Readers/DeferredListConverter.cs index ab2199aec..1bb0be419 100644 --- a/src/Sarif/Readers/DeferredListConverter.cs +++ b/src/Sarif/Readers/DeferredListConverter.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Collections.Generic; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.Readers diff --git a/src/Sarif/Readers/EnumConverter.cs b/src/Sarif/Readers/EnumConverter.cs index 4a7f570c5..a5ea956d4 100644 --- a/src/Sarif/Readers/EnumConverter.cs +++ b/src/Sarif/Readers/EnumConverter.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.Readers diff --git a/src/Sarif/Readers/JsonPositionedTextReader.cs b/src/Sarif/Readers/JsonPositionedTextReader.cs index 75b766e0e..df2432564 100644 --- a/src/Sarif/Readers/JsonPositionedTextReader.cs +++ b/src/Sarif/Readers/JsonPositionedTextReader.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.IO; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.Readers diff --git a/src/Sarif/Readers/LineMappingStreamReader.cs b/src/Sarif/Readers/LineMappingStreamReader.cs index a21729665..8fcf1691b 100644 --- a/src/Sarif/Readers/LineMappingStreamReader.cs +++ b/src/Sarif/Readers/LineMappingStreamReader.cs @@ -67,15 +67,15 @@ private static Stream FindBomWidth(Stream stream, out int bomWidth) { bomWidth = 2; } - else if(buffer[0] == 0xFF && buffer[1] == 0xFE) + else if (buffer[0] == 0xFF && buffer[1] == 0xFE) { bomWidth = 2; } - else if(buffer[0] == 0xEF && buffer[1] == 0xBB && buffer[2] == 0xBF) + else if (buffer[0] == 0xEF && buffer[1] == 0xBB && buffer[2] == 0xBF) { bomWidth = 3; } - else if(buffer[0] == 0x00 && buffer[1] == 0x00 && buffer[2] == 0xFE && buffer[3] == 0xFF) + else if (buffer[0] == 0x00 && buffer[1] == 0x00 && buffer[2] == 0xFE && buffer[3] == 0xFF) { bomWidth = 4; } diff --git a/src/Sarif/Readers/PropertyBagConverter.cs b/src/Sarif/Readers/PropertyBagConverter.cs index bf09a3a40..d45aef099 100644 --- a/src/Sarif/Readers/PropertyBagConverter.cs +++ b/src/Sarif/Readers/PropertyBagConverter.cs @@ -28,7 +28,7 @@ public override object ReadJson(JsonReader reader, Type objectType, object exist reader.Read(); - while(reader.TokenType == JsonToken.PropertyName) + while (reader.TokenType == JsonToken.PropertyName) { string name = (string)reader.Value; reader.Read(); diff --git a/src/Sarif/Readers/SarifContractResolver.cs b/src/Sarif/Readers/SarifContractResolver.cs index 99c62a0fb..93fa65dc3 100644 --- a/src/Sarif/Readers/SarifContractResolver.cs +++ b/src/Sarif/Readers/SarifContractResolver.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; + using Newtonsoft.Json.Serialization; namespace Microsoft.CodeAnalysis.Sarif.Readers diff --git a/src/Sarif/Readers/SarifDeferredContractResolver.cs b/src/Sarif/Readers/SarifDeferredContractResolver.cs index afd776a72..af80c1147 100644 --- a/src/Sarif/Readers/SarifDeferredContractResolver.cs +++ b/src/Sarif/Readers/SarifDeferredContractResolver.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Collections.Generic; + using Newtonsoft.Json.Serialization; namespace Microsoft.CodeAnalysis.Sarif.Readers diff --git a/src/Sarif/Readers/SarifVersionConverter.cs b/src/Sarif/Readers/SarifVersionConverter.cs index 66eddbc59..4ef3f101b 100644 --- a/src/Sarif/Readers/SarifVersionConverter.cs +++ b/src/Sarif/Readers/SarifVersionConverter.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.Readers diff --git a/src/Sarif/Readers/UriConverter.cs b/src/Sarif/Readers/UriConverter.cs index 047a69555..1b2128235 100644 --- a/src/Sarif/Readers/UriConverter.cs +++ b/src/Sarif/Readers/UriConverter.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Collections.Generic; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.Readers @@ -58,7 +59,7 @@ public override void WriteJson(JsonWriter writer, object value, JsonSerializer s uri.IsAbsoluteUri && uri.Scheme.Equals(UriUtilities.FileScheme, StringComparison.Ordinal) && !uri.OriginalString.StartsWith(UriUtilities.FileScheme.WithColon(), StringComparison.Ordinal); - + string serializedValue = useAbsoluteUri ? uri.AbsoluteUri : uri.OriginalString; writer.WriteValue(serializedValue); diff --git a/src/Sarif/RuleUtilities.cs b/src/Sarif/RuleUtilities.cs index 8fa2c425d..c0c40a37a 100644 --- a/src/Sarif/RuleUtilities.cs +++ b/src/Sarif/RuleUtilities.cs @@ -164,4 +164,4 @@ public static string NormalizeRuleMessageId(string ruleMessageId, string ruleId, return ruleMessageId; } } -} \ No newline at end of file +} diff --git a/src/Sarif/SplittingStrategy.cs b/src/Sarif/SplittingStrategy.cs index ae36aa07b..09292ed16 100644 --- a/src/Sarif/SplittingStrategy.cs +++ b/src/Sarif/SplittingStrategy.cs @@ -64,4 +64,4 @@ public enum SplittingStrategy /// PerRunPerOrgPerEntityTypePerRepositoryPerPartialFingerprint, } -} \ No newline at end of file +} diff --git a/src/Sarif/StringSet.cs b/src/Sarif/StringSet.cs index e0fa9d1be..d90c88795 100644 --- a/src/Sarif/StringSet.cs +++ b/src/Sarif/StringSet.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.Runtime.Serialization; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Sarif/TypedPropertiesDictionary.cs b/src/Sarif/TypedPropertiesDictionary.cs index 1b4705748..5e8360c23 100644 --- a/src/Sarif/TypedPropertiesDictionary.cs +++ b/src/Sarif/TypedPropertiesDictionary.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.Runtime.Serialization; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Sarif/TypedPropertiesDictionaryConverter.cs b/src/Sarif/TypedPropertiesDictionaryConverter.cs index 322332116..37a81fe7e 100644 --- a/src/Sarif/TypedPropertiesDictionaryConverter.cs +++ b/src/Sarif/TypedPropertiesDictionaryConverter.cs @@ -5,6 +5,7 @@ using System.Collections; using System.Diagnostics; using System.Linq; + using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; diff --git a/src/Sarif/VersionConstants.cs b/src/Sarif/VersionConstants.cs index c65777505..a548b060a 100644 --- a/src/Sarif/VersionConstants.cs +++ b/src/Sarif/VersionConstants.cs @@ -8,4 +8,4 @@ public static class VersionConstants public const string SchemaVersionAsPublishedToSchemaStoreOrg = "2.1.0-rtm.5"; public const string StableSarifVersion = "2.1.0"; } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/AlgorithmKindVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/AlgorithmKindVersionOne.cs index 046c431ab..b3c50a5f1 100644 --- a/src/Sarif/VersionOne/Autogenerated/AlgorithmKindVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/AlgorithmKindVersionOne.cs @@ -47,4 +47,4 @@ public enum AlgorithmKindVersionOne Tlsh, Whirlpool } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/AnnotatedCodeLocationImportanceVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/AnnotatedCodeLocationImportanceVersionOne.cs index f2bb7a57f..4078446e4 100644 --- a/src/Sarif/VersionOne/Autogenerated/AnnotatedCodeLocationImportanceVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/AnnotatedCodeLocationImportanceVersionOne.cs @@ -15,4 +15,4 @@ public enum AnnotatedCodeLocationImportanceVersionOne Essential, Unimportant } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/AnnotatedCodeLocationKindVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/AnnotatedCodeLocationKindVersionOne.cs index a1c4cb069..beb4765a2 100644 --- a/src/Sarif/VersionOne/Autogenerated/AnnotatedCodeLocationKindVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/AnnotatedCodeLocationKindVersionOne.cs @@ -24,4 +24,4 @@ public enum AnnotatedCodeLocationKindVersionOne FunctionReturn, Usage } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/AnnotatedCodeLocationVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/AnnotatedCodeLocationVersionOne.cs index 6362fb07d..973b6027c 100644 --- a/src/Sarif/VersionOne/Autogenerated/AnnotatedCodeLocationVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/AnnotatedCodeLocationVersionOne.cs @@ -5,6 +5,7 @@ using System.CodeDom.Compiler; using System.Collections.Generic; using System.Runtime.Serialization; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.VersionOne @@ -318,4 +319,4 @@ private void Init(int id, int step, PhysicalLocationVersionOne physicalLocation, } } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/AnnotatedCodeLocationVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/AnnotatedCodeLocationVersionOneEqualityComparer.cs index 1cfeac20f..a72ba1212 100644 --- a/src/Sarif/VersionOne/Autogenerated/AnnotatedCodeLocationVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/AnnotatedCodeLocationVersionOneEqualityComparer.cs @@ -307,4 +307,4 @@ public int GetHashCode(AnnotatedCodeLocationVersionOne obj) return result; } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/AnnotationVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/AnnotationVersionOne.cs index b2d42d19b..5764a0c96 100644 --- a/src/Sarif/VersionOne/Autogenerated/AnnotationVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/AnnotationVersionOne.cs @@ -120,4 +120,4 @@ private void Init(string message, IEnumerable locati } } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/AnnotationVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/AnnotationVersionOneEqualityComparer.cs index 66d343a76..cdbfa93e6 100644 --- a/src/Sarif/VersionOne/Autogenerated/AnnotationVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/AnnotationVersionOneEqualityComparer.cs @@ -86,4 +86,4 @@ public int GetHashCode(AnnotationVersionOne obj) return result; } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/BaselineStateVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/BaselineStateVersionOne.cs index 301b1e077..7c47b44d7 100644 --- a/src/Sarif/VersionOne/Autogenerated/BaselineStateVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/BaselineStateVersionOne.cs @@ -16,4 +16,4 @@ public enum BaselineStateVersionOne New, Absent } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/CodeFlowVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/CodeFlowVersionOne.cs index 2d5b89164..1948cd7e3 100644 --- a/src/Sarif/VersionOne/Autogenerated/CodeFlowVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/CodeFlowVersionOne.cs @@ -134,4 +134,4 @@ private void Init(string message, IEnumerable l } } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/CodeFlowVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/CodeFlowVersionOneEqualityComparer.cs index 0efe50f90..04d5580f1 100644 --- a/src/Sarif/VersionOne/Autogenerated/CodeFlowVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/CodeFlowVersionOneEqualityComparer.cs @@ -124,4 +124,4 @@ public int GetHashCode(CodeFlowVersionOne obj) return result; } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/ExceptionDataVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/ExceptionDataVersionOne.cs index 51286f382..10a8a13c7 100644 --- a/src/Sarif/VersionOne/Autogenerated/ExceptionDataVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/ExceptionDataVersionOne.cs @@ -144,4 +144,4 @@ private void Init(string kind, string message, StackVersionOne stack, IEnumerabl } } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/ExceptionDataVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/ExceptionDataVersionOneEqualityComparer.cs index 03af6dca5..4b602efc2 100644 --- a/src/Sarif/VersionOne/Autogenerated/ExceptionDataVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/ExceptionDataVersionOneEqualityComparer.cs @@ -106,4 +106,4 @@ public int GetHashCode(ExceptionDataVersionOne obj) return result; } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/FileChangeVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/FileChangeVersionOne.cs index 8c8f6de90..74e9fb14e 100644 --- a/src/Sarif/VersionOne/Autogenerated/FileChangeVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/FileChangeVersionOne.cs @@ -137,4 +137,4 @@ private void Init(Uri uri, string uriBaseId, IEnumerable } } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/FileChangeVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/FileChangeVersionOneEqualityComparer.cs index 0c55e314f..00d62d8ff 100644 --- a/src/Sarif/VersionOne/Autogenerated/FileChangeVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/FileChangeVersionOneEqualityComparer.cs @@ -96,4 +96,4 @@ public int GetHashCode(FileChangeVersionOne obj) return result; } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/FileDataVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/FileDataVersionOne.cs index ae3a2c2f3..50de34622 100644 --- a/src/Sarif/VersionOne/Autogenerated/FileDataVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/FileDataVersionOne.cs @@ -201,4 +201,4 @@ private void Init(Uri uri, string uriBaseId, string parentKey, int offset, int l } } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/FileDataVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/FileDataVersionOneEqualityComparer.cs index f2fcea9a4..dc646ffa5 100644 --- a/src/Sarif/VersionOne/Autogenerated/FileDataVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/FileDataVersionOneEqualityComparer.cs @@ -176,4 +176,4 @@ public int GetHashCode(FileDataVersionOne obj) return result; } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/FixVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/FixVersionOne.cs index ccc66b712..39082544d 100644 --- a/src/Sarif/VersionOne/Autogenerated/FixVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/FixVersionOne.cs @@ -123,4 +123,4 @@ private void Init(string description, IEnumerable fileChan } } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/FixVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/FixVersionOneEqualityComparer.cs index d9e9bbd08..74216ce1e 100644 --- a/src/Sarif/VersionOne/Autogenerated/FixVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/FixVersionOneEqualityComparer.cs @@ -86,4 +86,4 @@ public int GetHashCode(FixVersionOne obj) return result; } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/FormattedRuleMessageVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/FormattedRuleMessageVersionOne.cs index 380b2dcdf..0238edd4c 100644 --- a/src/Sarif/VersionOne/Autogenerated/FormattedRuleMessageVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/FormattedRuleMessageVersionOne.cs @@ -116,4 +116,4 @@ private void Init(string formatId, IEnumerable arguments) } } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/FormattedRuleMessageVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/FormattedRuleMessageVersionOneEqualityComparer.cs index 930744d8f..de3ee8208 100644 --- a/src/Sarif/VersionOne/Autogenerated/FormattedRuleMessageVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/FormattedRuleMessageVersionOneEqualityComparer.cs @@ -86,4 +86,4 @@ public int GetHashCode(FormattedRuleMessageVersionOne obj) return result; } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/HashVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/HashVersionOne.cs index 2a7631a24..a1540c443 100644 --- a/src/Sarif/VersionOne/Autogenerated/HashVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/HashVersionOne.cs @@ -107,4 +107,4 @@ private void Init(string value, AlgorithmKindVersionOne algorithm) Algorithm = algorithm; } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/HashVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/HashVersionOneEqualityComparer.cs index 36d6f4313..0c37a345f 100644 --- a/src/Sarif/VersionOne/Autogenerated/HashVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/HashVersionOneEqualityComparer.cs @@ -60,4 +60,4 @@ public int GetHashCode(HashVersionOne obj) return result; } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/IRuleVersionOneVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/IRuleVersionOneVersionOne.cs index d39b7ae13..9a1192b59 100644 --- a/src/Sarif/VersionOne/Autogenerated/IRuleVersionOneVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/IRuleVersionOneVersionOne.cs @@ -53,4 +53,4 @@ public partial interface IRuleVersionOneVersionOne /// Uri HelpUri { get; } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/ISarifNodeVersionOneVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/ISarifNodeVersionOneVersionOne.cs index 21ea8303f..0c96c247e 100644 --- a/src/Sarif/VersionOne/Autogenerated/ISarifNodeVersionOneVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/ISarifNodeVersionOneVersionOne.cs @@ -21,4 +21,4 @@ public interface ISarifNodeVersionOne /// ISarifNodeVersionOne DeepClone(); } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/InvocationVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/InvocationVersionOne.cs index 14e680c70..c7b9e29e7 100644 --- a/src/Sarif/VersionOne/Autogenerated/InvocationVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/InvocationVersionOne.cs @@ -208,4 +208,4 @@ private void Init(string commandLine, IDictionary responseFiles, } } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/InvocationVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/InvocationVersionOneEqualityComparer.cs index 83618b387..9e3c55bb8 100644 --- a/src/Sarif/VersionOne/Autogenerated/InvocationVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/InvocationVersionOneEqualityComparer.cs @@ -225,4 +225,4 @@ public int GetHashCode(InvocationVersionOne obj) return result; } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/LocationVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/LocationVersionOne.cs index 5f1c9fc43..ef567c23e 100644 --- a/src/Sarif/VersionOne/Autogenerated/LocationVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/LocationVersionOne.cs @@ -158,4 +158,4 @@ private void Init(PhysicalLocationVersionOne analysisTarget, PhysicalLocationVer } } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/LocationVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/LocationVersionOneEqualityComparer.cs index ec8765165..743238f41 100644 --- a/src/Sarif/VersionOne/Autogenerated/LocationVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/LocationVersionOneEqualityComparer.cs @@ -131,4 +131,4 @@ public int GetHashCode(LocationVersionOne obj) return result; } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/LogicalLocationVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/LogicalLocationVersionOne.cs index 5352fafc0..90d092b12 100644 --- a/src/Sarif/VersionOne/Autogenerated/LogicalLocationVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/LogicalLocationVersionOne.cs @@ -117,4 +117,4 @@ private void Init(string name, string parentKey, string kind) Kind = kind; } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/LogicalLocationVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/LogicalLocationVersionOneEqualityComparer.cs index 742fabeab..49bd9d121 100644 --- a/src/Sarif/VersionOne/Autogenerated/LogicalLocationVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/LogicalLocationVersionOneEqualityComparer.cs @@ -73,4 +73,4 @@ public int GetHashCode(LogicalLocationVersionOne obj) return result; } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/NotificationLevelVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/NotificationLevelVersionOne.cs index d5909c3be..0d556e800 100644 --- a/src/Sarif/VersionOne/Autogenerated/NotificationLevelVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/NotificationLevelVersionOne.cs @@ -15,4 +15,4 @@ public enum NotificationLevelVersionOne Note, Error } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/NotificationVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/NotificationVersionOne.cs index 50d7c6440..60693930d 100644 --- a/src/Sarif/VersionOne/Autogenerated/NotificationVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/NotificationVersionOne.cs @@ -198,4 +198,4 @@ private void Init(string id, string ruleId, string ruleKey, PhysicalLocationVers } } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/NotificationVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/NotificationVersionOneEqualityComparer.cs index b81a3e125..e79bbdd98 100644 --- a/src/Sarif/VersionOne/Autogenerated/NotificationVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/NotificationVersionOneEqualityComparer.cs @@ -159,4 +159,4 @@ public int GetHashCode(NotificationVersionOne obj) return result; } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/PhysicalLocationVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/PhysicalLocationVersionOne.cs index 5ff1727c1..b2fc15ec0 100644 --- a/src/Sarif/VersionOne/Autogenerated/PhysicalLocationVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/PhysicalLocationVersionOne.cs @@ -124,4 +124,4 @@ private void Init(Uri uri, string uriBaseId, RegionVersionOne region) } } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/PhysicalLocationVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/PhysicalLocationVersionOneEqualityComparer.cs index 0e25e4b36..f998a52d8 100644 --- a/src/Sarif/VersionOne/Autogenerated/PhysicalLocationVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/PhysicalLocationVersionOneEqualityComparer.cs @@ -73,4 +73,4 @@ public int GetHashCode(PhysicalLocationVersionOne obj) return result; } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/RegionVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/RegionVersionOne.cs index afb47649e..2abe90097 100644 --- a/src/Sarif/VersionOne/Autogenerated/RegionVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/RegionVersionOne.cs @@ -147,4 +147,4 @@ private void Init(int startLine, int startColumn, int endLine, int endColumn, in Length = length; } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/RegionVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/RegionVersionOneEqualityComparer.cs index a2f85a06b..dccb274c7 100644 --- a/src/Sarif/VersionOne/Autogenerated/RegionVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/RegionVersionOneEqualityComparer.cs @@ -80,4 +80,4 @@ public int GetHashCode(RegionVersionOne obj) return result; } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/ReplacementVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/ReplacementVersionOne.cs index dee02c288..4187ececf 100644 --- a/src/Sarif/VersionOne/Autogenerated/ReplacementVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/ReplacementVersionOne.cs @@ -117,4 +117,4 @@ private void Init(int offset, int deletedLength, string insertedBytes) InsertedBytes = insertedBytes; } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/ReplacementVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/ReplacementVersionOneEqualityComparer.cs index bfa0bc61a..751842cc8 100644 --- a/src/Sarif/VersionOne/Autogenerated/ReplacementVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/ReplacementVersionOneEqualityComparer.cs @@ -65,4 +65,4 @@ public int GetHashCode(ReplacementVersionOne obj) return result; } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/ResultLevelVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/ResultLevelVersionOne.cs index 8c1951381..5720bb67d 100644 --- a/src/Sarif/VersionOne/Autogenerated/ResultLevelVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/ResultLevelVersionOne.cs @@ -18,4 +18,4 @@ public enum ResultLevelVersionOne Warning, Error } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/ResultVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/ResultVersionOne.cs index 939d749f3..b19473e88 100644 --- a/src/Sarif/VersionOne/Autogenerated/ResultVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/ResultVersionOne.cs @@ -337,4 +337,4 @@ private void Init(string ruleId, string ruleKey, ResultLevelVersionOne level, st public bool ShouldSerializeLevel() { return this.Level != ResultLevelVersionOne.Warning; } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/ResultVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/ResultVersionOneEqualityComparer.cs index 54eb3fcd7..61ced3a6b 100644 --- a/src/Sarif/VersionOne/Autogenerated/ResultVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/ResultVersionOneEqualityComparer.cs @@ -334,4 +334,4 @@ public int GetHashCode(ResultVersionOne obj) return result; } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/RuleConfigurationVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/RuleConfigurationVersionOne.cs index 438948a91..7eee570e5 100644 --- a/src/Sarif/VersionOne/Autogenerated/RuleConfigurationVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/RuleConfigurationVersionOne.cs @@ -15,4 +15,4 @@ public enum RuleConfigurationVersionOne Enabled, Disabled } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/RuleVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/RuleVersionOne.cs index b4e94c89f..ba73a1dc5 100644 --- a/src/Sarif/VersionOne/Autogenerated/RuleVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/RuleVersionOne.cs @@ -188,4 +188,4 @@ private void Init(string id, string name, string shortDescription, string fullDe } } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/RuleVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/RuleVersionOneEqualityComparer.cs index 35ff386e6..add984d46 100644 --- a/src/Sarif/VersionOne/Autogenerated/RuleVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/RuleVersionOneEqualityComparer.cs @@ -181,4 +181,4 @@ public int GetHashCode(RuleVersionOne obj) return result; } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/RunVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/RunVersionOne.cs index a1e9d1371..cdf91fbc5 100644 --- a/src/Sarif/VersionOne/Autogenerated/RunVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/RunVersionOne.cs @@ -313,4 +313,4 @@ private void Init(ToolVersionOne tool, InvocationVersionOne invocation, IDiction } } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/RunVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/RunVersionOneEqualityComparer.cs index 888faad92..30bc62632 100644 --- a/src/Sarif/VersionOne/Autogenerated/RunVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/RunVersionOneEqualityComparer.cs @@ -364,4 +364,4 @@ public int GetHashCode(RunVersionOne obj) return result; } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/SarifLogVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/SarifLogVersionOne.cs index 1c45011f9..428118cae 100644 --- a/src/Sarif/VersionOne/Autogenerated/SarifLogVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/SarifLogVersionOne.cs @@ -137,4 +137,4 @@ private void Init(Uri schemaUri, SarifVersionVersionOne version, IEnumerable ToolVersionOne } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/SarifRewritingVisitorVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/SarifRewritingVisitorVersionOne.cs index df91edf7b..be36352c4 100644 --- a/src/Sarif/VersionOne/Autogenerated/SarifRewritingVisitorVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/SarifRewritingVisitorVersionOne.cs @@ -487,4 +487,4 @@ public virtual ToolVersionOne VisitToolVersionOne(ToolVersionOne node) return node; } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/SarifVersionVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/SarifVersionVersionOne.cs index 9afb9262f..f77c56ddc 100644 --- a/src/Sarif/VersionOne/Autogenerated/SarifVersionVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/SarifVersionVersionOne.cs @@ -14,4 +14,4 @@ public enum SarifVersionVersionOne Unknown, OneZeroZero } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/StackFrameVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/StackFrameVersionOne.cs index 5ba18c1aa..754677f0e 100644 --- a/src/Sarif/VersionOne/Autogenerated/StackFrameVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/StackFrameVersionOne.cs @@ -234,4 +234,4 @@ private void Init(string message, Uri uri, string uriBaseId, int line, int colum } } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/StackFrameVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/StackFrameVersionOneEqualityComparer.cs index f50cab478..2b7e7227a 100644 --- a/src/Sarif/VersionOne/Autogenerated/StackFrameVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/StackFrameVersionOneEqualityComparer.cs @@ -204,4 +204,4 @@ public int GetHashCode(StackFrameVersionOne obj) return result; } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/StackVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/StackVersionOne.cs index 7d7b0e687..613242d00 100644 --- a/src/Sarif/VersionOne/Autogenerated/StackVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/StackVersionOne.cs @@ -137,4 +137,4 @@ private void Init(string message, IEnumerable frames, IDic } } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/StackVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/StackVersionOneEqualityComparer.cs index f27c671d7..ca4fbfad0 100644 --- a/src/Sarif/VersionOne/Autogenerated/StackVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/StackVersionOneEqualityComparer.cs @@ -124,4 +124,4 @@ public int GetHashCode(StackVersionOne obj) return result; } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/SuppressionStatesVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/SuppressionStatesVersionOne.cs index b6694c303..2d89c482d 100644 --- a/src/Sarif/VersionOne/Autogenerated/SuppressionStatesVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/SuppressionStatesVersionOne.cs @@ -17,4 +17,4 @@ public enum SuppressionStatesVersionOne SuppressedInSource, SuppressedExternally } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/TaintKindVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/TaintKindVersionOne.cs index 5d425d9d4..7f45d4076 100644 --- a/src/Sarif/VersionOne/Autogenerated/TaintKindVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/TaintKindVersionOne.cs @@ -16,4 +16,4 @@ public enum TaintKindVersionOne Source, Sanitizer } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/ToolVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/ToolVersionOne.cs index d7dec7d90..176a827d5 100644 --- a/src/Sarif/VersionOne/Autogenerated/ToolVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/ToolVersionOne.cs @@ -170,4 +170,4 @@ private void Init(string name, string fullName, string version, string semanticV } } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/ToolVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/ToolVersionOneEqualityComparer.cs index 963dc724f..90f1662eb 100644 --- a/src/Sarif/VersionOne/Autogenerated/ToolVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/ToolVersionOneEqualityComparer.cs @@ -151,4 +151,4 @@ public int GetHashCode(ToolVersionOne obj) return result; } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Core/IPropertyBagHolderVersionOne.cs b/src/Sarif/VersionOne/Core/IPropertyBagHolderVersionOne.cs index f29f0d735..d6acfc99b 100644 --- a/src/Sarif/VersionOne/Core/IPropertyBagHolderVersionOne.cs +++ b/src/Sarif/VersionOne/Core/IPropertyBagHolderVersionOne.cs @@ -19,4 +19,4 @@ public interface IPropertyBagHolderVersionOne void SetPropertiesFrom(IPropertyBagHolderVersionOne other); void RemoveProperty(string propertyName); } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Core/PropertyBagHolderVersionOne.cs b/src/Sarif/VersionOne/Core/PropertyBagHolderVersionOne.cs index 9d2e1526b..ebc141897 100644 --- a/src/Sarif/VersionOne/Core/PropertyBagHolderVersionOne.cs +++ b/src/Sarif/VersionOne/Core/PropertyBagHolderVersionOne.cs @@ -6,7 +6,9 @@ using System.Diagnostics; using System.Globalization; using System.Linq; + using Microsoft.CodeAnalysis.Sarif.Readers; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.VersionOne diff --git a/src/Sarif/VersionOne/Readers/AnnotatedCodeLocationIdConverter.cs b/src/Sarif/VersionOne/Readers/AnnotatedCodeLocationIdConverter.cs index da75839ab..ca52b7d17 100644 --- a/src/Sarif/VersionOne/Readers/AnnotatedCodeLocationIdConverter.cs +++ b/src/Sarif/VersionOne/Readers/AnnotatedCodeLocationIdConverter.cs @@ -3,6 +3,7 @@ using System; using System.Globalization; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.VersionOne.Readers diff --git a/src/Sarif/VersionOne/Readers/SarifContractResolverVersionOne.cs b/src/Sarif/VersionOne/Readers/SarifContractResolverVersionOne.cs index 8de697f98..ec3045a6d 100644 --- a/src/Sarif/VersionOne/Readers/SarifContractResolverVersionOne.cs +++ b/src/Sarif/VersionOne/Readers/SarifContractResolverVersionOne.cs @@ -3,7 +3,9 @@ using System; using System.Collections.Generic; + using Microsoft.CodeAnalysis.Sarif.VersionOne; + using Newtonsoft.Json.Serialization; namespace Microsoft.CodeAnalysis.Sarif.Readers diff --git a/src/Sarif/VersionOne/SarifUtilitiesVersionOne.cs b/src/Sarif/VersionOne/SarifUtilitiesVersionOne.cs index 0946745cc..2839582b0 100644 --- a/src/Sarif/VersionOne/SarifUtilitiesVersionOne.cs +++ b/src/Sarif/VersionOne/SarifUtilitiesVersionOne.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; + using Microsoft.CodeAnalysis.Sarif.VersionOne; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Sarif/Visitors/FilteringVisitor.cs b/src/Sarif/Visitors/FilteringVisitor.cs index 125aa239c..c8e9aee24 100644 --- a/src/Sarif/Visitors/FilteringVisitor.cs +++ b/src/Sarif/Visitors/FilteringVisitor.cs @@ -90,4 +90,3 @@ public override ArtifactLocation VisitArtifactLocation(ArtifactLocation node) } } } - diff --git a/src/Sarif/Visitors/PartitioningVisitor.cs b/src/Sarif/Visitors/PartitioningVisitor.cs index 739738ecd..3321145b1 100644 --- a/src/Sarif/Visitors/PartitioningVisitor.cs +++ b/src/Sarif/Visitors/PartitioningVisitor.cs @@ -490,4 +490,4 @@ public override Artifact VisitArtifact(Artifact node) } } } -} \ No newline at end of file +} diff --git a/src/Sarif/Visitors/SarifCurrentToVersionOneVisitor.cs b/src/Sarif/Visitors/SarifCurrentToVersionOneVisitor.cs index 6d5dc5fcf..21168da5e 100644 --- a/src/Sarif/Visitors/SarifCurrentToVersionOneVisitor.cs +++ b/src/Sarif/Visitors/SarifCurrentToVersionOneVisitor.cs @@ -7,8 +7,10 @@ using System.Linq; using System.Security; using System.Text; + using Microsoft.CodeAnalysis.Sarif.VersionOne; using Microsoft.CodeAnalysis.Sarif.Writers; + using Utilities = Microsoft.CodeAnalysis.Sarif.Visitors.SarifTransformerUtilities; namespace Microsoft.CodeAnalysis.Sarif.Visitors diff --git a/src/Sarif/Visitors/SarifTransformerUtilities.cs b/src/Sarif/Visitors/SarifTransformerUtilities.cs index b201901a0..992af2961 100644 --- a/src/Sarif/Visitors/SarifTransformerUtilities.cs +++ b/src/Sarif/Visitors/SarifTransformerUtilities.cs @@ -3,8 +3,10 @@ using System.Collections.Generic; using System.Globalization; + using Microsoft.CodeAnalysis.Sarif.Readers; using Microsoft.CodeAnalysis.Sarif.VersionOne; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.Visitors @@ -310,4 +312,4 @@ public static AnnotatedCodeLocationImportanceVersionOne CreateAnnotatedCodeLocat } } } -} \ No newline at end of file +} diff --git a/src/Sarif/Visitors/SarifVersionOneToCurrentVisitor.cs b/src/Sarif/Visitors/SarifVersionOneToCurrentVisitor.cs index 7ef6ae15c..6e39dede7 100644 --- a/src/Sarif/Visitors/SarifVersionOneToCurrentVisitor.cs +++ b/src/Sarif/Visitors/SarifVersionOneToCurrentVisitor.cs @@ -6,8 +6,10 @@ using System.Globalization; using System.Linq; using System.Text.RegularExpressions; + using Microsoft.CodeAnalysis.Sarif.VersionOne; using Microsoft.CodeAnalysis.Sarif.Writers; + using Utilities = Microsoft.CodeAnalysis.Sarif.Visitors.SarifTransformerUtilities; namespace Microsoft.CodeAnalysis.Sarif.Visitors diff --git a/src/Sarif/Visitors/UnknownEncodingException.cs b/src/Sarif/Visitors/UnknownEncodingException.cs index 32bb3b598..ebe5397ff 100644 --- a/src/Sarif/Visitors/UnknownEncodingException.cs +++ b/src/Sarif/Visitors/UnknownEncodingException.cs @@ -16,4 +16,4 @@ public UnknownEncodingException(string encodingName) EncodingName = encodingName; } } -} \ No newline at end of file +} diff --git a/src/Sarif/Visitors/UpdateIndicesFromLegacyDataVisitor.cs b/src/Sarif/Visitors/UpdateIndicesFromLegacyDataVisitor.cs index 9bb20bbd8..e839da046 100644 --- a/src/Sarif/Visitors/UpdateIndicesFromLegacyDataVisitor.cs +++ b/src/Sarif/Visitors/UpdateIndicesFromLegacyDataVisitor.cs @@ -89,4 +89,4 @@ public override ArtifactLocation VisitArtifactLocation(ArtifactLocation node) return base.VisitArtifactLocation(node); } } -} \ No newline at end of file +} diff --git a/src/Sarif/Visitors/VersionOneLogicalLocationKeyToLogicalLocationDataVisitor.cs b/src/Sarif/Visitors/VersionOneLogicalLocationKeyToLogicalLocationDataVisitor.cs index ef465ef9e..741cc815d 100644 --- a/src/Sarif/Visitors/VersionOneLogicalLocationKeyToLogicalLocationDataVisitor.cs +++ b/src/Sarif/Visitors/VersionOneLogicalLocationKeyToLogicalLocationDataVisitor.cs @@ -2,6 +2,7 @@ // license. See LICENSE file in the project root for full license information. using System.Collections.Generic; + using Microsoft.CodeAnalysis.Sarif.VersionOne; namespace Microsoft.CodeAnalysis.Sarif.Visitors diff --git a/src/Sarif/Warnings.cs b/src/Sarif/Warnings.cs index ee22e217c..d0e36baac 100644 --- a/src/Sarif/Warnings.cs +++ b/src/Sarif/Warnings.cs @@ -123,4 +123,4 @@ public static void LogRuleExplicitlyDisabled(IAnalysisContext context, string ru context.RuntimeErrors |= RuntimeConditions.RuleWasExplicitlyDisabled; } } -} \ No newline at end of file +} diff --git a/src/Sarif/Writers/PrereleaseCompatibilityTransformer.cs b/src/Sarif/Writers/PrereleaseCompatibilityTransformer.cs index 4684761db..375e719de 100644 --- a/src/Sarif/Writers/PrereleaseCompatibilityTransformer.cs +++ b/src/Sarif/Writers/PrereleaseCompatibilityTransformer.cs @@ -2,8 +2,10 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Collections.Generic; + using Microsoft.CodeAnalysis.Sarif.VersionOne; using Microsoft.CodeAnalysis.Sarif.Visitors; + using Newtonsoft.Json; using Newtonsoft.Json.Linq; @@ -2690,4 +2692,4 @@ private static void SplitCurrentNodeNameAndRemainingLeafNodePath(string fullPath } } } -} \ No newline at end of file +} diff --git a/src/Sarif/Writers/ResultLogJsonWriter.cs b/src/Sarif/Writers/ResultLogJsonWriter.cs index 73071fbb7..a5e0ab0fc 100644 --- a/src/Sarif/Writers/ResultLogJsonWriter.cs +++ b/src/Sarif/Writers/ResultLogJsonWriter.cs @@ -5,6 +5,7 @@ using System.Collections.Generic; using System.Globalization; using System.Linq; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.Writers @@ -258,7 +259,7 @@ public void WriteResults(IEnumerable results) { OpenResults(); } - } + } } public void CloseResults() diff --git a/src/Sarif/Writers/SarifLogger.cs b/src/Sarif/Writers/SarifLogger.cs index 345b8608d..dee791303 100644 --- a/src/Sarif/Writers/SarifLogger.cs +++ b/src/Sarif/Writers/SarifLogger.cs @@ -7,6 +7,7 @@ using System.IO; using System.Linq; using System.Text; + using Microsoft.CodeAnalysis.Sarif.Readers; using Microsoft.CodeAnalysis.Sarif.Visitors; @@ -576,4 +577,4 @@ private static Uri Redact(Uri uri, IEnumerable tokensToRedact) return new Uri(uriText, UriKind.RelativeOrAbsolute); } } -} \ No newline at end of file +} diff --git a/src/Sarif/Writers/SarifOneZeroZeroLogger.cs b/src/Sarif/Writers/SarifOneZeroZeroLogger.cs index 71f645b51..859b3f441 100644 --- a/src/Sarif/Writers/SarifOneZeroZeroLogger.cs +++ b/src/Sarif/Writers/SarifOneZeroZeroLogger.cs @@ -3,8 +3,10 @@ using System.Collections.Generic; using System.IO; + using Microsoft.CodeAnalysis.Sarif.Readers; using Microsoft.CodeAnalysis.Sarif.Visitors; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.Writers diff --git a/src/Sarif/Writers/SarifPartitioner.cs b/src/Sarif/Writers/SarifPartitioner.cs index 243539c58..5a623fa36 100644 --- a/src/Sarif/Writers/SarifPartitioner.cs +++ b/src/Sarif/Writers/SarifPartitioner.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; + using Microsoft.CodeAnalysis.Sarif.Visitors; namespace Microsoft.CodeAnalysis.Sarif.Writers diff --git a/src/Shared/CommonAssemblyInfo.cs b/src/Shared/CommonAssemblyInfo.cs index fc04ff54f..76e91b9d8 100644 --- a/src/Shared/CommonAssemblyInfo.cs +++ b/src/Shared/CommonAssemblyInfo.cs @@ -27,4 +27,3 @@ [assembly: InternalsVisibleTo("Test.UnitTests.Sarif.WorkItems, PublicKey=0024000004800000940000000602000000240000525341310004000001000100433fbf156abe9718142bdbd48a440e779a1b708fd21486ee0ae536f4c548edf8a7185c1e3ac89ceef76c15b8cc2497906798779a59402f9b9e27281fb15e7111566cdc9a9f8326301d45320623c5222089cf4d0013f365ae729fb0a9c9d15138042825cd511a0f3d4887a7b92f4c2749f81b410813d297b73244cf64995effb1")] [assembly: InternalsVisibleTo("Test.Utilities.Sarif, PublicKey=0024000004800000940000000602000000240000525341310004000001000100433fbf156abe9718142bdbd48a440e779a1b708fd21486ee0ae536f4c548edf8a7185c1e3ac89ceef76c15b8cc2497906798779a59402f9b9e27281fb15e7111566cdc9a9f8326301d45320623c5222089cf4d0013f365ae729fb0a9c9d15138042825cd511a0f3d4887a7b92f4c2749f81b410813d297b73244cf64995effb1")] [assembly: InternalsVisibleTo("Test.UnitTests.WorkItems, PublicKey=0024000004800000940000000602000000240000525341310004000001000100433fbf156abe9718142bdbd48a440e779a1b708fd21486ee0ae536f4c548edf8a7185c1e3ac89ceef76c15b8cc2497906798779a59402f9b9e27281fb15e7111566cdc9a9f8326301d45320623c5222089cf4d0013f365ae729fb0a9c9d15138042825cd511a0f3d4887a7b92f4c2749f81b410813d297b73244cf64995effb1")] - diff --git a/src/Test.EndToEnd.Baselining/BaseliningDetailLogger.cs b/src/Test.EndToEnd.Baselining/BaseliningDetailLogger.cs index abe38f88a..94a60a565 100644 --- a/src/Test.EndToEnd.Baselining/BaseliningDetailLogger.cs +++ b/src/Test.EndToEnd.Baselining/BaseliningDetailLogger.cs @@ -48,7 +48,7 @@ private static string RelativeSeriesPath(string seriesPath) public void Write(SarifLog newBaselineLog, SarifLog baselineLog, BaseliningSummary summary) { Dictionary baselineResultsByGuid = new Dictionary(); - foreach(Result result in baselineLog.EnumerateResults()) + foreach (Result result in baselineLog.EnumerateResults()) { baselineResultsByGuid[result.CorrelationGuid ?? result.Guid] = result; } diff --git a/src/Test.EndToEnd.Baselining/Extensions/ResultTextFormatter.cs b/src/Test.EndToEnd.Baselining/Extensions/ResultTextFormatter.cs index 363906aba..cd4d81402 100644 --- a/src/Test.EndToEnd.Baselining/Extensions/ResultTextFormatter.cs +++ b/src/Test.EndToEnd.Baselining/Extensions/ResultTextFormatter.cs @@ -42,7 +42,7 @@ public static string Snippet(this Result result, int lengthLimit = -1) { string value = result?.EnumeratePhysicalLocations().FirstOrDefault()?.Region?.Snippet?.Text ?? ""; value = value.Replace("\n", "").Replace("\r", "").TrimStart(); - + if (lengthLimit > 0 && value.Length > lengthLimit) { value = value.Substring(0, lengthLimit); } return value; } diff --git a/src/Test.EndToEnd.Baselining/Program.cs b/src/Test.EndToEnd.Baselining/Program.cs index 5dc7b9efc..c92e8ba2e 100644 --- a/src/Test.EndToEnd.Baselining/Program.cs +++ b/src/Test.EndToEnd.Baselining/Program.cs @@ -104,7 +104,7 @@ private static int Run(RunOptions options) { BaseliningTester tester = new BaseliningTester(); BaseliningSummary overallSummary = tester.RunAll(options.TestRootPath); - + return 0; } @@ -124,4 +124,4 @@ private static int CreateDebugLogs(RebuildDebugLogsOptions options) return 0; } } -} \ No newline at end of file +} diff --git a/src/Test.FunctionalTests.Sarif/DefaultObjectPopulatingVisitor.cs b/src/Test.FunctionalTests.Sarif/DefaultObjectPopulatingVisitor.cs index 712e1ad82..bf7612bfb 100644 --- a/src/Test.FunctionalTests.Sarif/DefaultObjectPopulatingVisitor.cs +++ b/src/Test.FunctionalTests.Sarif/DefaultObjectPopulatingVisitor.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.Reflection; + using Microsoft.Json.Schema; namespace Microsoft.CodeAnalysis.Sarif @@ -491,4 +492,4 @@ private string GetPropertyFormatPattern(string objectTypeName, string propertyNa return propertySchema.Properties.ContainsKey(jsonPropertyName) ? propertySchema.Properties[jsonPropertyName].Pattern : null; } } -} \ No newline at end of file +} diff --git a/src/Test.FunctionalTests.Sarif/Multitool/ValidateCommandTests.cs b/src/Test.FunctionalTests.Sarif/Multitool/ValidateCommandTests.cs index ef4cf34cb..d11d9a36d 100644 --- a/src/Test.FunctionalTests.Sarif/Multitool/ValidateCommandTests.cs +++ b/src/Test.FunctionalTests.Sarif/Multitool/ValidateCommandTests.cs @@ -414,7 +414,7 @@ private void RunArrayLimitTest(string testFileNameSuffix) private void RunValidTestForRule(string ruleId) => RunTestForRule(ruleId, ValidTestFileNameSuffix); - + private void RunInvalidTestForRule(string ruleId) => RunTestForRule(ruleId, InvalidTestFileNameSuffix); @@ -594,7 +594,7 @@ private IList GetValidationRules() // Select one rule arbitrarily, find out what assembly it's in, and get all the other // rules from that assembly. Assembly validationRuleAssembly = typeof(RuleIdentifiersMustBeValid).Assembly; - + return CompositionUtilities.GetExports( new Assembly[] { diff --git a/src/Test.FunctionalTests.Sarif/MultitoolCommandLineTests.cs b/src/Test.FunctionalTests.Sarif/MultitoolCommandLineTests.cs index 5ba2956d0..7adc97115 100644 --- a/src/Test.FunctionalTests.Sarif/MultitoolCommandLineTests.cs +++ b/src/Test.FunctionalTests.Sarif/MultitoolCommandLineTests.cs @@ -3,7 +3,9 @@ using System.Diagnostics; using System.IO; + using FluentAssertions; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Test.FunctionalTests.Sarif/PropertyBagConverterTests.cs b/src/Test.FunctionalTests.Sarif/PropertyBagConverterTests.cs index 47c13f4fc..8549ce47b 100644 --- a/src/Test.FunctionalTests.Sarif/PropertyBagConverterTests.cs +++ b/src/Test.FunctionalTests.Sarif/PropertyBagConverterTests.cs @@ -3,8 +3,11 @@ using System; using System.Collections.Generic; + using FluentAssertions; + using Newtonsoft.Json; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Test.FunctionalTests.Sarif/SarifConverterTests.cs b/src/Test.FunctionalTests.Sarif/SarifConverterTests.cs index 85e55832c..17e7735f3 100644 --- a/src/Test.FunctionalTests.Sarif/SarifConverterTests.cs +++ b/src/Test.FunctionalTests.Sarif/SarifConverterTests.cs @@ -7,9 +7,12 @@ using System.Text; using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif.Visitors; using Microsoft.CodeAnalysis.Sarif.Writers; + using Newtonsoft.Json; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Converters diff --git a/src/Test.FunctionalTests.Sarif/SarifLogEqualityComparerTests.cs b/src/Test.FunctionalTests.Sarif/SarifLogEqualityComparerTests.cs index 4b29a2f37..c3dce5259 100644 --- a/src/Test.FunctionalTests.Sarif/SarifLogEqualityComparerTests.cs +++ b/src/Test.FunctionalTests.Sarif/SarifLogEqualityComparerTests.cs @@ -2,9 +2,13 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.IO; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif.Writers; + using Newtonsoft.Json; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Test.FunctionalTests.Sarif/SarifValidatorTests.cs b/src/Test.FunctionalTests.Sarif/SarifValidatorTests.cs index ce6160bca..73473fcf1 100644 --- a/src/Test.FunctionalTests.Sarif/SarifValidatorTests.cs +++ b/src/Test.FunctionalTests.Sarif/SarifValidatorTests.cs @@ -6,12 +6,16 @@ using System.IO; using System.Linq; using System.Text; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif.Writers; using Microsoft.Json.Schema; using Microsoft.Json.Schema.Validation; + using Newtonsoft.Json; using Newtonsoft.Json.Linq; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Test.FunctionalTests.Sarif/Writers/FilterByPredicateTests.cs b/src/Test.FunctionalTests.Sarif/Writers/FilterByPredicateTests.cs index a991d76eb..5821fa34f 100644 --- a/src/Test.FunctionalTests.Sarif/Writers/FilterByPredicateTests.cs +++ b/src/Test.FunctionalTests.Sarif/Writers/FilterByPredicateTests.cs @@ -2,9 +2,12 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; + using Microsoft.CodeAnalysis.Sarif.Visitors; using Microsoft.CodeAnalysis.Test.Utilities.Sarif; + using Newtonsoft.Json; + using Xunit; using Xunit.Abstractions; diff --git a/src/Test.FunctionalTests.Sarif/Writers/PartitionTests.cs b/src/Test.FunctionalTests.Sarif/Writers/PartitionTests.cs index f34f11541..c7a9cf97f 100644 --- a/src/Test.FunctionalTests.Sarif/Writers/PartitionTests.cs +++ b/src/Test.FunctionalTests.Sarif/Writers/PartitionTests.cs @@ -3,9 +3,13 @@ using System.Collections.Generic; using System.Linq; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif.Visitors; + using Newtonsoft.Json; + using Xunit; using Xunit.Abstractions; diff --git a/src/Test.FunctionalTests.Sarif/v2/ConverterTestData/FortifyFpr/src/ContentFileViewModel.cs b/src/Test.FunctionalTests.Sarif/v2/ConverterTestData/FortifyFpr/src/ContentFileViewModel.cs index 0fbf83f6e..14bc05a40 100644 --- a/src/Test.FunctionalTests.Sarif/v2/ConverterTestData/FortifyFpr/src/ContentFileViewModel.cs +++ b/src/Test.FunctionalTests.Sarif/v2/ConverterTestData/FortifyFpr/src/ContentFileViewModel.cs @@ -14,4 +14,4 @@ public class ContentFileViewModel : BaseViewModel public DateTime ExpiryDate { get; set; } #endregion } -} \ No newline at end of file +} diff --git a/src/Test.FunctionalTests.Sarif/v2/ConverterTestData/FortifyFpr/src/Controllers/ContentFileHandlingController.cs b/src/Test.FunctionalTests.Sarif/v2/ConverterTestData/FortifyFpr/src/Controllers/ContentFileHandlingController.cs index 6a6dd9c68..49bc8de92 100644 --- a/src/Test.FunctionalTests.Sarif/v2/ConverterTestData/FortifyFpr/src/Controllers/ContentFileHandlingController.cs +++ b/src/Test.FunctionalTests.Sarif/v2/ConverterTestData/FortifyFpr/src/Controllers/ContentFileHandlingController.cs @@ -41,4 +41,4 @@ public void SomeMethod() System.IO.MemoryStream streamPackage = new System.IO.MemoryStream(); } } -} \ No newline at end of file +} diff --git a/src/Test.FunctionalTests.Sarif/v2/ConverterTestData/FortifyFpr/src/DocumentValidator.cs b/src/Test.FunctionalTests.Sarif/v2/ConverterTestData/FortifyFpr/src/DocumentValidator.cs index 15ece6f60..f009527bf 100644 --- a/src/Test.FunctionalTests.Sarif/v2/ConverterTestData/FortifyFpr/src/DocumentValidator.cs +++ b/src/Test.FunctionalTests.Sarif/v2/ConverterTestData/FortifyFpr/src/DocumentValidator.cs @@ -18,4 +18,4 @@ private void IsDocumentValid() } } -} \ No newline at end of file +} diff --git a/src/Test.Plugins/TestWorkItemModelTransformer.cs b/src/Test.Plugins/TestWorkItemModelTransformer.cs index 8b2dc495e..a6afd57c4 100644 --- a/src/Test.Plugins/TestWorkItemModelTransformer.cs +++ b/src/Test.Plugins/TestWorkItemModelTransformer.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; + using Microsoft.CodeAnalysis.Sarif; using Microsoft.CodeAnalysis.Sarif.WorkItems; diff --git a/src/Test.UnitTests.Sarif.Converters/AndroidStudioConverterTests.cs b/src/Test.UnitTests.Sarif.Converters/AndroidStudioConverterTests.cs index 8a1a71527..a8b79ffa4 100644 --- a/src/Test.UnitTests.Sarif.Converters/AndroidStudioConverterTests.cs +++ b/src/Test.UnitTests.Sarif.Converters/AndroidStudioConverterTests.cs @@ -7,9 +7,11 @@ using System.IO; using System.Linq; using System.Xml; + using FluentAssertions; using Microsoft.CodeAnalysis.Sarif.Writers; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Converters diff --git a/src/Test.UnitTests.Sarif.Converters/AndroidStudioProblemTests.cs b/src/Test.UnitTests.Sarif.Converters/AndroidStudioProblemTests.cs index dd03d3acb..8422fc266 100644 --- a/src/Test.UnitTests.Sarif.Converters/AndroidStudioProblemTests.cs +++ b/src/Test.UnitTests.Sarif.Converters/AndroidStudioProblemTests.cs @@ -7,8 +7,11 @@ using System.Linq; using System.Xml; using System.Xml.Linq; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif.Driver; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Converters diff --git a/src/Test.UnitTests.Sarif.Converters/AndroidStudioStringsTests.cs b/src/Test.UnitTests.Sarif.Converters/AndroidStudioStringsTests.cs index 549cbcb64..474b735ed 100644 --- a/src/Test.UnitTests.Sarif.Converters/AndroidStudioStringsTests.cs +++ b/src/Test.UnitTests.Sarif.Converters/AndroidStudioStringsTests.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Xml; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Converters diff --git a/src/Test.UnitTests.Sarif.Converters/BuiltinConverterFactoryTests.cs b/src/Test.UnitTests.Sarif.Converters/BuiltinConverterFactoryTests.cs index c023826b6..dd008daba 100644 --- a/src/Test.UnitTests.Sarif.Converters/BuiltinConverterFactoryTests.cs +++ b/src/Test.UnitTests.Sarif.Converters/BuiltinConverterFactoryTests.cs @@ -4,7 +4,9 @@ using System; using System.Collections.Generic; using System.Linq; + using Microsoft.CodeAnalysis.Sarif.Converters; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Test.UnitTests.Sarif.Converters/ClangAnalyzerConverterTests.cs b/src/Test.UnitTests.Sarif.Converters/ClangAnalyzerConverterTests.cs index cf0a9ad11..646a4a63d 100644 --- a/src/Test.UnitTests.Sarif.Converters/ClangAnalyzerConverterTests.cs +++ b/src/Test.UnitTests.Sarif.Converters/ClangAnalyzerConverterTests.cs @@ -3,7 +3,9 @@ using System; using System.IO; + using Microsoft.CodeAnalysis.Sarif.Writers; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Converters @@ -104,9 +106,3 @@ public void ClangAnalyzerConverter_MissingNestedDictionaryKey() } } } - - - - - - diff --git a/src/Test.UnitTests.Sarif.Converters/ConverterTestsBase.cs b/src/Test.UnitTests.Sarif.Converters/ConverterTestsBase.cs index 502a04f7c..41cc44362 100644 --- a/src/Test.UnitTests.Sarif.Converters/ConverterTestsBase.cs +++ b/src/Test.UnitTests.Sarif.Converters/ConverterTestsBase.cs @@ -2,10 +2,12 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; + using FluentAssertions; using Microsoft.CodeAnalysis.Sarif.Converters; using Microsoft.CodeAnalysis.Sarif.Writers; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Test.UnitTests.Sarif.Converters/CppCheckConverterTests.cs b/src/Test.UnitTests.Sarif.Converters/CppCheckConverterTests.cs index dfd701a9b..81b186ac1 100644 --- a/src/Test.UnitTests.Sarif.Converters/CppCheckConverterTests.cs +++ b/src/Test.UnitTests.Sarif.Converters/CppCheckConverterTests.cs @@ -4,8 +4,11 @@ using System; using System.IO; using System.Xml; + using Microsoft.CodeAnalysis.Sarif.Writers; + using Newtonsoft.Json; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Converters diff --git a/src/Test.UnitTests.Sarif.Converters/CppCheckErrorTests.cs b/src/Test.UnitTests.Sarif.Converters/CppCheckErrorTests.cs index dc22e3e5a..0581f6a5f 100644 --- a/src/Test.UnitTests.Sarif.Converters/CppCheckErrorTests.cs +++ b/src/Test.UnitTests.Sarif.Converters/CppCheckErrorTests.cs @@ -5,7 +5,9 @@ using System.Collections.Immutable; using System.Linq; using System.Xml; + using FluentAssertions; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Converters diff --git a/src/Test.UnitTests.Sarif.Converters/CppCheckLocationTests.cs b/src/Test.UnitTests.Sarif.Converters/CppCheckLocationTests.cs index cef72f948..da79b69f7 100644 --- a/src/Test.UnitTests.Sarif.Converters/CppCheckLocationTests.cs +++ b/src/Test.UnitTests.Sarif.Converters/CppCheckLocationTests.cs @@ -3,7 +3,9 @@ using System; using System.Xml; + using FluentAssertions; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Converters diff --git a/src/Test.UnitTests.Sarif.Converters/CppCheckStringsTests.cs b/src/Test.UnitTests.Sarif.Converters/CppCheckStringsTests.cs index 2c4e260b5..ebc2e9c2a 100644 --- a/src/Test.UnitTests.Sarif.Converters/CppCheckStringsTests.cs +++ b/src/Test.UnitTests.Sarif.Converters/CppCheckStringsTests.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Xml; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Converters diff --git a/src/Test.UnitTests.Sarif.Converters/FlawFinderCsvConverterTests.cs b/src/Test.UnitTests.Sarif.Converters/FlawFinderCsvConverterTests.cs index 3dbaf4059..c9b5cc9b9 100644 --- a/src/Test.UnitTests.Sarif.Converters/FlawFinderCsvConverterTests.cs +++ b/src/Test.UnitTests.Sarif.Converters/FlawFinderCsvConverterTests.cs @@ -3,10 +3,14 @@ using System; using System.IO; + using CsvHelper; using CsvHelper.TypeConversion; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif.Writers; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Converters diff --git a/src/Test.UnitTests.Sarif.Converters/FortifyConverterTests.cs b/src/Test.UnitTests.Sarif.Converters/FortifyConverterTests.cs index 3327a465f..d5e4c02df 100644 --- a/src/Test.UnitTests.Sarif.Converters/FortifyConverterTests.cs +++ b/src/Test.UnitTests.Sarif.Converters/FortifyConverterTests.cs @@ -6,7 +6,9 @@ using System.Collections.Immutable; using System.IO; using System.Linq; + using FluentAssertions; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Converters diff --git a/src/Test.UnitTests.Sarif.Converters/FortifyFprConverterTests.cs b/src/Test.UnitTests.Sarif.Converters/FortifyFprConverterTests.cs index b55fb5604..2460924f2 100644 --- a/src/Test.UnitTests.Sarif.Converters/FortifyFprConverterTests.cs +++ b/src/Test.UnitTests.Sarif.Converters/FortifyFprConverterTests.cs @@ -2,7 +2,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; + using FluentAssertions; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Converters diff --git a/src/Test.UnitTests.Sarif.Converters/FortifyFprStringsTests.cs b/src/Test.UnitTests.Sarif.Converters/FortifyFprStringsTests.cs index 54050e2d7..020b5ccf3 100644 --- a/src/Test.UnitTests.Sarif.Converters/FortifyFprStringsTests.cs +++ b/src/Test.UnitTests.Sarif.Converters/FortifyFprStringsTests.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Xml; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Converters diff --git a/src/Test.UnitTests.Sarif.Converters/FortifyIssueTests.cs b/src/Test.UnitTests.Sarif.Converters/FortifyIssueTests.cs index 8ebe79c1b..af4a6a83b 100644 --- a/src/Test.UnitTests.Sarif.Converters/FortifyIssueTests.cs +++ b/src/Test.UnitTests.Sarif.Converters/FortifyIssueTests.cs @@ -5,7 +5,9 @@ using System.Collections.Immutable; using System.Xml; using System.Xml.Linq; + using FluentAssertions; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Converters diff --git a/src/Test.UnitTests.Sarif.Converters/FortifyPathElementTests.cs b/src/Test.UnitTests.Sarif.Converters/FortifyPathElementTests.cs index 9b41d0034..12c9a4681 100644 --- a/src/Test.UnitTests.Sarif.Converters/FortifyPathElementTests.cs +++ b/src/Test.UnitTests.Sarif.Converters/FortifyPathElementTests.cs @@ -3,6 +3,7 @@ using System; using System.Xml; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Converters diff --git a/src/Test.UnitTests.Sarif.Converters/FortifyStringsTests.cs b/src/Test.UnitTests.Sarif.Converters/FortifyStringsTests.cs index 3cf17a470..a9d2ac5de 100644 --- a/src/Test.UnitTests.Sarif.Converters/FortifyStringsTests.cs +++ b/src/Test.UnitTests.Sarif.Converters/FortifyStringsTests.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Xml; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Converters diff --git a/src/Test.UnitTests.Sarif.Converters/FxCopConverterTests.cs b/src/Test.UnitTests.Sarif.Converters/FxCopConverterTests.cs index ed4f26ace..fcc4356f8 100644 --- a/src/Test.UnitTests.Sarif.Converters/FxCopConverterTests.cs +++ b/src/Test.UnitTests.Sarif.Converters/FxCopConverterTests.cs @@ -6,7 +6,9 @@ using System.IO; using System.Linq; using System.Xml; + using FluentAssertions; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Converters diff --git a/src/Test.UnitTests.Sarif.Converters/PylintConverterTests.cs b/src/Test.UnitTests.Sarif.Converters/PylintConverterTests.cs index 04e4bdd59..f870e15d3 100644 --- a/src/Test.UnitTests.Sarif.Converters/PylintConverterTests.cs +++ b/src/Test.UnitTests.Sarif.Converters/PylintConverterTests.cs @@ -5,11 +5,15 @@ using System.Collections.Generic; using System.IO; using System.Text; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif; using Microsoft.CodeAnalysis.Sarif.Converters; using Microsoft.CodeAnalysis.Sarif.Converters.PylintObjectModel; + using Moq; + using Xunit; namespace Sarif.Converters.UnitTests diff --git a/src/Test.UnitTests.Sarif.Converters/TSLintConverterTests.cs b/src/Test.UnitTests.Sarif.Converters/TSLintConverterTests.cs index 97a40d6d9..e46d40599 100644 --- a/src/Test.UnitTests.Sarif.Converters/TSLintConverterTests.cs +++ b/src/Test.UnitTests.Sarif.Converters/TSLintConverterTests.cs @@ -5,9 +5,13 @@ using System.Collections.Generic; using System.IO; using System.Text; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif.Converters.TSLintObjectModel; + using Moq; + using Xunit; diff --git a/src/Test.UnitTests.Sarif.Converters/TSLintLogReaderTests.cs b/src/Test.UnitTests.Sarif.Converters/TSLintLogReaderTests.cs index 05788b7fe..56b2f593c 100644 --- a/src/Test.UnitTests.Sarif.Converters/TSLintLogReaderTests.cs +++ b/src/Test.UnitTests.Sarif.Converters/TSLintLogReaderTests.cs @@ -4,9 +4,13 @@ using System; using System.Collections.Generic; using System.IO; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif.Converters.TSLintObjectModel; + using Newtonsoft.Json.Linq; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Converters diff --git a/src/Test.UnitTests.Sarif.Converters/ToolFileConverterBaseTests.cs b/src/Test.UnitTests.Sarif.Converters/ToolFileConverterBaseTests.cs index b9d711b55..2ab1a7c62 100644 --- a/src/Test.UnitTests.Sarif.Converters/ToolFileConverterBaseTests.cs +++ b/src/Test.UnitTests.Sarif.Converters/ToolFileConverterBaseTests.cs @@ -3,7 +3,9 @@ using System; using System.IO; + using FluentAssertions; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Converters diff --git a/src/Test.UnitTests.Sarif.Converters/ToolFormatConverterTests.cs b/src/Test.UnitTests.Sarif.Converters/ToolFormatConverterTests.cs index d844cbff5..f246a75b1 100644 --- a/src/Test.UnitTests.Sarif.Converters/ToolFormatConverterTests.cs +++ b/src/Test.UnitTests.Sarif.Converters/ToolFormatConverterTests.cs @@ -6,10 +6,13 @@ using System.IO; using System.Reflection; using System.Text; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif.Converters; using Microsoft.CodeAnalysis.Sarif.Driver; using Microsoft.CodeAnalysis.Sarif.Writers; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Test.UnitTests.Sarif.Driver/DriverExtensionMethodsTests.cs b/src/Test.UnitTests.Sarif.Driver/DriverExtensionMethodsTests.cs index bf2862559..73e9af715 100644 --- a/src/Test.UnitTests.Sarif.Driver/DriverExtensionMethodsTests.cs +++ b/src/Test.UnitTests.Sarif.Driver/DriverExtensionMethodsTests.cs @@ -2,8 +2,11 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif.Writers; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Driver diff --git a/src/Test.UnitTests.Sarif.Driver/DriverUtilitiesTests.cs b/src/Test.UnitTests.Sarif.Driver/DriverUtilitiesTests.cs index 9b02f41ce..a110d32db 100644 --- a/src/Test.UnitTests.Sarif.Driver/DriverUtilitiesTests.cs +++ b/src/Test.UnitTests.Sarif.Driver/DriverUtilitiesTests.cs @@ -2,8 +2,11 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; + using CommandLine; + using FluentAssertions; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Driver diff --git a/src/Test.UnitTests.Sarif.Driver/FileSpecifierTests.cs b/src/Test.UnitTests.Sarif.Driver/FileSpecifierTests.cs index 0ef0d672f..1607d2877 100644 --- a/src/Test.UnitTests.Sarif.Driver/FileSpecifierTests.cs +++ b/src/Test.UnitTests.Sarif.Driver/FileSpecifierTests.cs @@ -3,7 +3,9 @@ using System; using System.IO; + using FluentAssertions; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Driver diff --git a/src/Test.UnitTests.Sarif.Driver/FunctionlessTestRule.cs b/src/Test.UnitTests.Sarif.Driver/FunctionlessTestRule.cs index 52a840ab2..f7ef2d88b 100644 --- a/src/Test.UnitTests.Sarif.Driver/FunctionlessTestRule.cs +++ b/src/Test.UnitTests.Sarif.Driver/FunctionlessTestRule.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using System.Composition; using System.Resources; + using Microsoft.CodeAnalysis.Sarif.Driver; using Microsoft.CodeAnalysis.Test.UnitTests.Sarif.Driver.Sdk; diff --git a/src/Test.UnitTests.Sarif.Driver/Sdk/AnalyzeCommandBaseTests.cs b/src/Test.UnitTests.Sarif.Driver/Sdk/AnalyzeCommandBaseTests.cs index e31d701c4..ea28c9286 100644 --- a/src/Test.UnitTests.Sarif.Driver/Sdk/AnalyzeCommandBaseTests.cs +++ b/src/Test.UnitTests.Sarif.Driver/Sdk/AnalyzeCommandBaseTests.cs @@ -7,13 +7,18 @@ using System.Linq; using System.Reflection; using System.Text; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif.Converters; using Microsoft.CodeAnalysis.Sarif.Readers; using Microsoft.CodeAnalysis.Sarif.VersionOne; using Microsoft.CodeAnalysis.Sarif.Writers; + using Moq; + using Newtonsoft.Json; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Driver @@ -1196,4 +1201,4 @@ public IFileSystem FileSystem } #endregion ResultsCachingTestsAndHelpers } -} \ No newline at end of file +} diff --git a/src/Test.UnitTests.Sarif.Driver/Sdk/DriverSdkExtensionsTests.cs b/src/Test.UnitTests.Sarif.Driver/Sdk/DriverSdkExtensionsTests.cs index 6a0f7e935..051459e44 100644 --- a/src/Test.UnitTests.Sarif.Driver/Sdk/DriverSdkExtensionsTests.cs +++ b/src/Test.UnitTests.Sarif.Driver/Sdk/DriverSdkExtensionsTests.cs @@ -4,8 +4,11 @@ using System; using System.Collections.Generic; using System.Linq; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif.Driver.Sdk; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Driver diff --git a/src/Test.UnitTests.Sarif.Driver/Sdk/EntryPointUtilitiesTests.cs b/src/Test.UnitTests.Sarif.Driver/Sdk/EntryPointUtilitiesTests.cs index 51a9362eb..9a6cebc38 100644 --- a/src/Test.UnitTests.Sarif.Driver/Sdk/EntryPointUtilitiesTests.cs +++ b/src/Test.UnitTests.Sarif.Driver/Sdk/EntryPointUtilitiesTests.cs @@ -7,6 +7,7 @@ using System.IO; using FluentAssertions; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Driver diff --git a/src/Test.UnitTests.Sarif.Driver/Sdk/ExportConfigurationCommandBaseTests.cs b/src/Test.UnitTests.Sarif.Driver/Sdk/ExportConfigurationCommandBaseTests.cs index 0e9deb428..e8d9f6020 100644 --- a/src/Test.UnitTests.Sarif.Driver/Sdk/ExportConfigurationCommandBaseTests.cs +++ b/src/Test.UnitTests.Sarif.Driver/Sdk/ExportConfigurationCommandBaseTests.cs @@ -6,6 +6,7 @@ using System.Reflection; using FluentAssertions; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Driver diff --git a/src/Test.UnitTests.Sarif.Driver/Sdk/FormatForVisualStudioTests.cs b/src/Test.UnitTests.Sarif.Driver/Sdk/FormatForVisualStudioTests.cs index 5b2da8a1c..b90c5793e 100644 --- a/src/Test.UnitTests.Sarif.Driver/Sdk/FormatForVisualStudioTests.cs +++ b/src/Test.UnitTests.Sarif.Driver/Sdk/FormatForVisualStudioTests.cs @@ -3,8 +3,11 @@ using System; using System.Collections.Generic; + using FluentAssertions; + using Microsoft.CodeAnalysis.Test.Utilities.Sarif; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Driver diff --git a/src/Test.UnitTests.Sarif.Driver/Sdk/RuleUtilitiesTests.cs b/src/Test.UnitTests.Sarif.Driver/Sdk/RuleUtilitiesTests.cs index 3ed052883..19c6359df 100644 --- a/src/Test.UnitTests.Sarif.Driver/Sdk/RuleUtilitiesTests.cs +++ b/src/Test.UnitTests.Sarif.Driver/Sdk/RuleUtilitiesTests.cs @@ -2,7 +2,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; + using FluentAssertions; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Driver diff --git a/src/Test.UnitTests.Sarif.Driver/Sdk/SarifLoggerTests.cs b/src/Test.UnitTests.Sarif.Driver/Sdk/SarifLoggerTests.cs index 8de2c4d92..f6796dcd1 100644 --- a/src/Test.UnitTests.Sarif.Driver/Sdk/SarifLoggerTests.cs +++ b/src/Test.UnitTests.Sarif.Driver/Sdk/SarifLoggerTests.cs @@ -3,8 +3,11 @@ using System.IO; using System.Linq; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif.Writers; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Driver diff --git a/src/Test.UnitTests.Sarif.Driver/Sdk/SkimmerBaseTests.cs b/src/Test.UnitTests.Sarif.Driver/Sdk/SkimmerBaseTests.cs index 56cfb133e..698afc345 100644 --- a/src/Test.UnitTests.Sarif.Driver/Sdk/SkimmerBaseTests.cs +++ b/src/Test.UnitTests.Sarif.Driver/Sdk/SkimmerBaseTests.cs @@ -2,8 +2,11 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Linq; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif; + using Xunit; namespace Microsoft.CodeAnalysis.Test.UnitTests.Sarif.Driver.Sdk diff --git a/src/Test.UnitTests.Sarif.Driver/Sdk/TestSkimmerBase.cs b/src/Test.UnitTests.Sarif.Driver/Sdk/TestSkimmerBase.cs index 1c1612f57..c41bfd281 100644 --- a/src/Test.UnitTests.Sarif.Driver/Sdk/TestSkimmerBase.cs +++ b/src/Test.UnitTests.Sarif.Driver/Sdk/TestSkimmerBase.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.Resources; + using Microsoft.CodeAnalysis.Sarif; using Microsoft.CodeAnalysis.Sarif.Driver; diff --git a/src/Test.UnitTests.Sarif.Driver/SkimmerIdComparerTests.cs b/src/Test.UnitTests.Sarif.Driver/SkimmerIdComparerTests.cs index a7b6ed2da..ed207cfa4 100644 --- a/src/Test.UnitTests.Sarif.Driver/SkimmerIdComparerTests.cs +++ b/src/Test.UnitTests.Sarif.Driver/SkimmerIdComparerTests.cs @@ -2,7 +2,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Collections.Generic; + using FluentAssertions; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Driver diff --git a/src/Test.UnitTests.Sarif.Driver/TestRule.cs b/src/Test.UnitTests.Sarif.Driver/TestRule.cs index 96ec75720..15d3142d1 100644 --- a/src/Test.UnitTests.Sarif.Driver/TestRule.cs +++ b/src/Test.UnitTests.Sarif.Driver/TestRule.cs @@ -6,7 +6,9 @@ using System.Composition; using System.IO; using System.Resources; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif.Driver; using Microsoft.CodeAnalysis.Test.UnitTests.Sarif.Driver.Sdk; diff --git a/src/Test.UnitTests.Sarif.Driver/TestRuleBehaviors.cs b/src/Test.UnitTests.Sarif.Driver/TestRuleBehaviors.cs index fe76f03f0..f8af9239d 100644 --- a/src/Test.UnitTests.Sarif.Driver/TestRuleBehaviors.cs +++ b/src/Test.UnitTests.Sarif.Driver/TestRuleBehaviors.cs @@ -28,4 +28,4 @@ internal enum TestRuleBehaviors // Force 'current platform not valid to analyze' code path. TreatPlatformAsInvalid = 0x400 } -} \ No newline at end of file +} diff --git a/src/Test.UnitTests.Sarif.Multitool.Library/ConvertCommandTests.cs b/src/Test.UnitTests.Sarif.Multitool.Library/ConvertCommandTests.cs index 57f7306a0..fdb077eb3 100644 --- a/src/Test.UnitTests.Sarif.Multitool.Library/ConvertCommandTests.cs +++ b/src/Test.UnitTests.Sarif.Multitool.Library/ConvertCommandTests.cs @@ -1,10 +1,14 @@ // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +using System.IO; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif.Converters; + using Moq; -using System.IO; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Test.UnitTests.Sarif.Multitool.Library/ExportValidationRulesDocumentationCommandTests.cs b/src/Test.UnitTests.Sarif.Multitool.Library/ExportValidationRulesDocumentationCommandTests.cs index e921e1fb6..7a865f6ff 100644 --- a/src/Test.UnitTests.Sarif.Multitool.Library/ExportValidationRulesDocumentationCommandTests.cs +++ b/src/Test.UnitTests.Sarif.Multitool.Library/ExportValidationRulesDocumentationCommandTests.cs @@ -3,8 +3,11 @@ using System.Collections.Generic; using System.Text; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif.Multitool.Rules; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Multitool @@ -34,7 +37,7 @@ public void BuildRule_GeneratesExpectedMarkdown() string expectedMarkdown = resourceExtractor.GetResourceText(test.Key); sb.ToString().Should().Be(expectedMarkdown); - } + } } private class TestRule1 : SarifValidationSkimmerBase diff --git a/src/Test.UnitTests.Sarif.Multitool.Library/GenericCommandTests.cs b/src/Test.UnitTests.Sarif.Multitool.Library/GenericCommandTests.cs index eae2e19b8..bc1c7f15a 100644 --- a/src/Test.UnitTests.Sarif.Multitool.Library/GenericCommandTests.cs +++ b/src/Test.UnitTests.Sarif.Multitool.Library/GenericCommandTests.cs @@ -5,6 +5,7 @@ using System.Collections.Generic; using System.Linq; using System.Reflection; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Test.UnitTests.Sarif.Multitool.Library/MergeCommandTests.cs b/src/Test.UnitTests.Sarif.Multitool.Library/MergeCommandTests.cs index dcbf14aae..1af124759 100644 --- a/src/Test.UnitTests.Sarif.Multitool.Library/MergeCommandTests.cs +++ b/src/Test.UnitTests.Sarif.Multitool.Library/MergeCommandTests.cs @@ -3,8 +3,11 @@ using System; using System.IO; + using FluentAssertions; + using Moq; + using Xunit; using Xunit.Abstractions; diff --git a/src/Test.UnitTests.Sarif.Multitool.Library/PageCommandTests.cs b/src/Test.UnitTests.Sarif.Multitool.Library/PageCommandTests.cs index 3eff060a0..691d710a6 100644 --- a/src/Test.UnitTests.Sarif.Multitool.Library/PageCommandTests.cs +++ b/src/Test.UnitTests.Sarif.Multitool.Library/PageCommandTests.cs @@ -4,9 +4,13 @@ using System; using System.Collections.Generic; using System.IO; + using FluentAssertions; + using Moq; + using Newtonsoft.Json; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Test.UnitTests.Sarif.Multitool.Library/QueryCommandTests.cs b/src/Test.UnitTests.Sarif.Multitool.Library/QueryCommandTests.cs index 5bd66e536..521fdb014 100644 --- a/src/Test.UnitTests.Sarif.Multitool.Library/QueryCommandTests.cs +++ b/src/Test.UnitTests.Sarif.Multitool.Library/QueryCommandTests.cs @@ -2,7 +2,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.IO; + using Microsoft.CodeAnalysis.Sarif.Query; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Test.UnitTests.Sarif.Multitool.Library/RebaseUriCommandTests.cs b/src/Test.UnitTests.Sarif.Multitool.Library/RebaseUriCommandTests.cs index 6bb628782..e736636e1 100644 --- a/src/Test.UnitTests.Sarif.Multitool.Library/RebaseUriCommandTests.cs +++ b/src/Test.UnitTests.Sarif.Multitool.Library/RebaseUriCommandTests.cs @@ -4,6 +4,7 @@ using System; using System.IO; using System.Text; + using FluentAssertions; using Microsoft.Extensions.Options; @@ -36,7 +37,7 @@ public void RebaseUriCommand_InjectsRegions() { Runs = new[] { - new Run { Results = new[] { + new Run { Results = new[] { new Result { Locations = new [] { new Location { PhysicalLocation = new PhysicalLocation { @@ -59,11 +60,11 @@ public void RebaseUriCommand_InjectsRegions() RebaseUriOptions options = CreateDefaultOptions(); options.TargetFileSpecifiers = new string[] { logFilePath }; - - options.DataToInsert = new[] - { + + options.DataToInsert = new[] + { OptionallyEmittedData.RegionSnippets | - OptionallyEmittedData.ContextRegionSnippets + OptionallyEmittedData.ContextRegionSnippets }; Mock mockFileSystem = ArrangeMockFileSystem(inputSarifLog, logFilePath, transformedContents); diff --git a/src/Test.UnitTests.Sarif.Multitool.Library/Rules/SarifValidationSkimmerBaseTests.cs b/src/Test.UnitTests.Sarif.Multitool.Library/Rules/SarifValidationSkimmerBaseTests.cs index 16ab7ad87..448e8dd71 100644 --- a/src/Test.UnitTests.Sarif.Multitool.Library/Rules/SarifValidationSkimmerBaseTests.cs +++ b/src/Test.UnitTests.Sarif.Multitool.Library/Rules/SarifValidationSkimmerBaseTests.cs @@ -2,8 +2,11 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Text; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif.Multitool.Rules; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Test.UnitTests.Sarif.Multitool.Library/TransformCommandTests.cs b/src/Test.UnitTests.Sarif.Multitool.Library/TransformCommandTests.cs index 66594c1b2..163bba60e 100644 --- a/src/Test.UnitTests.Sarif.Multitool.Library/TransformCommandTests.cs +++ b/src/Test.UnitTests.Sarif.Multitool.Library/TransformCommandTests.cs @@ -4,12 +4,17 @@ using System.Collections.Generic; using System.IO; using System.Text; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif.Readers; using Microsoft.CodeAnalysis.Sarif.VersionOne; + using Moq; + using Newtonsoft.Json; using Newtonsoft.Json.Linq; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Test.UnitTests.Sarif.Multitool.Library/ValidateCommandTests.cs b/src/Test.UnitTests.Sarif.Multitool.Library/ValidateCommandTests.cs index 96c3a558a..0304530e0 100644 --- a/src/Test.UnitTests.Sarif.Multitool.Library/ValidateCommandTests.cs +++ b/src/Test.UnitTests.Sarif.Multitool.Library/ValidateCommandTests.cs @@ -2,9 +2,13 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.IO; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif.Driver; + using Moq; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Test.UnitTests.Sarif.Multitool/FileWorkItemsCommandTests.cs b/src/Test.UnitTests.Sarif.Multitool/FileWorkItemsCommandTests.cs index aed8e8f0e..503a2186a 100644 --- a/src/Test.UnitTests.Sarif.Multitool/FileWorkItemsCommandTests.cs +++ b/src/Test.UnitTests.Sarif.Multitool/FileWorkItemsCommandTests.cs @@ -3,7 +3,9 @@ using System; using System.Collections.Generic; + using FluentAssertions; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Test.UnitTests.Sarif.WorkItems/SarifWorkItemExtensionsTests.cs b/src/Test.UnitTests.Sarif.WorkItems/SarifWorkItemExtensionsTests.cs index d5c5b3f5f..dca19cb5a 100644 --- a/src/Test.UnitTests.Sarif.WorkItems/SarifWorkItemExtensionsTests.cs +++ b/src/Test.UnitTests.Sarif.WorkItems/SarifWorkItemExtensionsTests.cs @@ -5,8 +5,11 @@ using System.Collections.ObjectModel; using System.ComponentModel; using System.Text; + using FluentAssertions; + using Microsoft.CodeAnalysis.Test.Utilities.Sarif; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.WorkItems @@ -88,7 +91,7 @@ public void SarifWorkItemExtensions_CreateWorkItemTitle_LongTitleFromLogicalLoca result.Locations = new List(); result.Locations.Add(location); result.RuleId = "TestRuleId"; - + SarifLog sarifLog = CreateLogWithEmptyRun(); Run run = sarifLog.Runs[0]; run.Results.Add(result); @@ -243,13 +246,13 @@ public void SarifWorkItemExtensions_GetRunToolNames_FetchesAllRunToolNames() } } } - } + } }), new Tuple("Result with rule.Id", new Result { Rule = new ReportingDescriptorReference { - Id = TestRuleId + Id = TestRuleId } }), new Tuple("Result with rule index only", new Result @@ -284,7 +287,7 @@ private static SarifLog CreateLogWithEmptyRun() Rules = new ReportingDescriptor[] { new ReportingDescriptor - { + { Name = "Test Rule", Id = nameof(TestRuleId) } diff --git a/src/Test.UnitTests.Sarif.WorkItems/SarifWorkItemFilerTests.cs b/src/Test.UnitTests.Sarif.WorkItems/SarifWorkItemFilerTests.cs index 374a8087c..25013fad1 100644 --- a/src/Test.UnitTests.Sarif.WorkItems/SarifWorkItemFilerTests.cs +++ b/src/Test.UnitTests.Sarif.WorkItems/SarifWorkItemFilerTests.cs @@ -7,16 +7,22 @@ using System.Linq; using System.Threading; using System.Threading.Tasks; + using FluentAssertions; + using Microsoft.CodeAnalysis.Test.Utilities.Sarif; using Microsoft.CodeAnalysis.WorkItems; using Microsoft.TeamFoundation.WorkItemTracking.WebApi.Models; using Microsoft.VisualStudio.Services.WebApi; using Microsoft.VisualStudio.Services.WebApi.Patch.Json; using Microsoft.WorkItems; + using Moq; + using Newtonsoft.Json; + using Octokit; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.WorkItems @@ -183,10 +189,10 @@ private void TestWorkItemFiler(SarifLog sarifLog, SarifWorkItemContext context, // Validate that we updated the SARIF log with work itme URIs. // updatedSarifLog.Should().NotBeEquivalentTo(sarifLog); - - foreach(Run run in updatedSarifLog.Runs) + + foreach (Run run in updatedSarifLog.Runs) { - foreach(Result result in run.Results) + foreach (Result result in run.Results) { result.WorkItemUris.Should().NotBeNull(); result.WorkItemUris.Count.Should().Be(1); @@ -199,7 +205,7 @@ private void TestWorkItemFiler(SarifLog sarifLog, SarifWorkItemContext context, programmableUris.Count.Should().Be(1); programmableUris[0].Should().Be(bugUri); } - } + } } private static FilingClient CreateAdoMocksAndFilingClient(AttachmentReference attachmentReference, WorkItem workItem, SarifWorkItemFiler filer) @@ -371,4 +377,4 @@ private static SarifWorkItemContext CreateAzureDevOpsTestContext() "Extensibility", nameof(ExpectedWorkItemsCount), defaultValue: () => { return 1; }); } -} \ No newline at end of file +} diff --git a/src/Test.UnitTests.Sarif.WorkItems/SarifWorkItemFilingContextTests.cs b/src/Test.UnitTests.Sarif.WorkItems/SarifWorkItemFilingContextTests.cs index eda15bca0..035455bda 100644 --- a/src/Test.UnitTests.Sarif.WorkItems/SarifWorkItemFilingContextTests.cs +++ b/src/Test.UnitTests.Sarif.WorkItems/SarifWorkItemFilingContextTests.cs @@ -3,8 +3,11 @@ using System; using System.IO; + using FluentAssertions; + using Microsoft.CodeAnalysis.Test.Utilities.Sarif; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.WorkItems diff --git a/src/Test.UnitTests.Sarif.WorkItems/SarifWorkItemModelTests.cs b/src/Test.UnitTests.Sarif.WorkItems/SarifWorkItemModelTests.cs index b13107a06..1ccaacf3d 100644 --- a/src/Test.UnitTests.Sarif.WorkItems/SarifWorkItemModelTests.cs +++ b/src/Test.UnitTests.Sarif.WorkItems/SarifWorkItemModelTests.cs @@ -2,8 +2,10 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using FluentAssertions; + using Microsoft.CodeAnalysis.Test.Utilities.Sarif; using Microsoft.WorkItems; + using Xunit; diff --git a/src/Test.UnitTests.Sarif/Baseline/DefaultBaselineUnitTests.cs b/src/Test.UnitTests.Sarif/Baseline/DefaultBaselineUnitTests.cs index 41a83a2ec..2a52c746b 100644 --- a/src/Test.UnitTests.Sarif/Baseline/DefaultBaselineUnitTests.cs +++ b/src/Test.UnitTests.Sarif/Baseline/DefaultBaselineUnitTests.cs @@ -4,7 +4,9 @@ using System; using System.Collections.Generic; using System.Linq; + using FluentAssertions; + using Xunit; using Xunit.Abstractions; diff --git a/src/Test.UnitTests.Sarif/Baseline/ResultMatching/ExactMatchers/FullFingerprintMatcherTests.cs b/src/Test.UnitTests.Sarif/Baseline/ResultMatching/ExactMatchers/FullFingerprintMatcherTests.cs index c2c743a7c..698ddba29 100644 --- a/src/Test.UnitTests.Sarif/Baseline/ResultMatching/ExactMatchers/FullFingerprintMatcherTests.cs +++ b/src/Test.UnitTests.Sarif/Baseline/ResultMatching/ExactMatchers/FullFingerprintMatcherTests.cs @@ -3,7 +3,9 @@ using System.Collections.Generic; using System.Linq; + using FluentAssertions; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Baseline.ResultMatching.ExactMatchers diff --git a/src/Test.UnitTests.Sarif/Baseline/ResultMatching/ExactMatchers/IdenticalResultMatcherTests.cs b/src/Test.UnitTests.Sarif/Baseline/ResultMatching/ExactMatchers/IdenticalResultMatcherTests.cs index 609b2b133..395d57f57 100644 --- a/src/Test.UnitTests.Sarif/Baseline/ResultMatching/ExactMatchers/IdenticalResultMatcherTests.cs +++ b/src/Test.UnitTests.Sarif/Baseline/ResultMatching/ExactMatchers/IdenticalResultMatcherTests.cs @@ -4,7 +4,9 @@ using System; using System.Collections.Generic; using System.Linq; + using FluentAssertions; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Baseline.ResultMatching.ExactMatchers diff --git a/src/Test.UnitTests.Sarif/Baseline/ResultMatching/HeuristicMatchers/ContextRegionResultMatcherTests.cs b/src/Test.UnitTests.Sarif/Baseline/ResultMatching/HeuristicMatchers/ContextRegionResultMatcherTests.cs index 849c700e4..707f0605c 100644 --- a/src/Test.UnitTests.Sarif/Baseline/ResultMatching/HeuristicMatchers/ContextRegionResultMatcherTests.cs +++ b/src/Test.UnitTests.Sarif/Baseline/ResultMatching/HeuristicMatchers/ContextRegionResultMatcherTests.cs @@ -2,7 +2,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; + using FluentAssertions; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Baseline.ResultMatching.HeuristicMatchers diff --git a/src/Test.UnitTests.Sarif/Baseline/ResultMatching/HeuristicMatchers/PartialFingerprintResultMatcherTests.cs b/src/Test.UnitTests.Sarif/Baseline/ResultMatching/HeuristicMatchers/PartialFingerprintResultMatcherTests.cs index fefff5edd..d587ea2fb 100644 --- a/src/Test.UnitTests.Sarif/Baseline/ResultMatching/HeuristicMatchers/PartialFingerprintResultMatcherTests.cs +++ b/src/Test.UnitTests.Sarif/Baseline/ResultMatching/HeuristicMatchers/PartialFingerprintResultMatcherTests.cs @@ -2,7 +2,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; + using FluentAssertions; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Baseline.ResultMatching.HeuristicMatchers diff --git a/src/Test.UnitTests.Sarif/Baseline/ResultMatching/ResultMatchingBaselinerTests.cs b/src/Test.UnitTests.Sarif/Baseline/ResultMatching/ResultMatchingBaselinerTests.cs index 034a01428..b34ad264f 100644 --- a/src/Test.UnitTests.Sarif/Baseline/ResultMatching/ResultMatchingBaselinerTests.cs +++ b/src/Test.UnitTests.Sarif/Baseline/ResultMatching/ResultMatchingBaselinerTests.cs @@ -4,7 +4,9 @@ using System; using System.Collections.Generic; using System.Linq; + using FluentAssertions; + using Xunit; using Xunit.Abstractions; diff --git a/src/Test.UnitTests.Sarif/Baseline/ResultMatching/SarifLogResultMatcherTests.cs b/src/Test.UnitTests.Sarif/Baseline/ResultMatching/SarifLogResultMatcherTests.cs index 903c25a94..c2d3408ef 100644 --- a/src/Test.UnitTests.Sarif/Baseline/ResultMatching/SarifLogResultMatcherTests.cs +++ b/src/Test.UnitTests.Sarif/Baseline/ResultMatching/SarifLogResultMatcherTests.cs @@ -4,7 +4,9 @@ using System; using System.Collections.Generic; using System.Linq; + using FluentAssertions; + using Xunit; using Xunit.Abstractions; diff --git a/src/Test.UnitTests.Sarif/Baseline/StrictBaselineUnitTests.cs b/src/Test.UnitTests.Sarif/Baseline/StrictBaselineUnitTests.cs index 844b9e44d..989c57c2c 100644 --- a/src/Test.UnitTests.Sarif/Baseline/StrictBaselineUnitTests.cs +++ b/src/Test.UnitTests.Sarif/Baseline/StrictBaselineUnitTests.cs @@ -4,7 +4,9 @@ using System; using System.Collections.Generic; using System.Linq; + using FluentAssertions; + using Xunit; using Xunit.Abstractions; diff --git a/src/Test.UnitTests.Sarif/Baseline2/ExtractedResultTests.cs b/src/Test.UnitTests.Sarif/Baseline2/ExtractedResultTests.cs index 96291cf9d..5533f1379 100644 --- a/src/Test.UnitTests.Sarif/Baseline2/ExtractedResultTests.cs +++ b/src/Test.UnitTests.Sarif/Baseline2/ExtractedResultTests.cs @@ -2,9 +2,12 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif; using Microsoft.CodeAnalysis.Sarif.Baseline.ResultMatching; + using Xunit; namespace Microsoft.CodeAnalysis.Test.UnitTests.Sarif.Baseline diff --git a/src/Test.UnitTests.Sarif/Baseline2/OverallBaseliningTests.cs b/src/Test.UnitTests.Sarif/Baseline2/OverallBaseliningTests.cs index fa23180e4..8d2ca3946 100644 --- a/src/Test.UnitTests.Sarif/Baseline2/OverallBaseliningTests.cs +++ b/src/Test.UnitTests.Sarif/Baseline2/OverallBaseliningTests.cs @@ -10,6 +10,7 @@ using Microsoft.CodeAnalysis.Sarif; using Microsoft.CodeAnalysis.Sarif.Baseline.ResultMatching; using Microsoft.CodeAnalysis.Test.Utilities.Sarif; + using Newtonsoft.Json; using Xunit; diff --git a/src/Test.UnitTests.Sarif/Baseline2/TrustMapTests.cs b/src/Test.UnitTests.Sarif/Baseline2/TrustMapTests.cs index 2804ffa20..f7b54ffa2 100644 --- a/src/Test.UnitTests.Sarif/Baseline2/TrustMapTests.cs +++ b/src/Test.UnitTests.Sarif/Baseline2/TrustMapTests.cs @@ -2,7 +2,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif.Baseline; + using Xunit; namespace Microsoft.CodeAnalysis.Test.UnitTests.Sarif.Baseline diff --git a/src/Test.UnitTests.Sarif/Baseline2/WhatComparerTests.cs b/src/Test.UnitTests.Sarif/Baseline2/WhatComparerTests.cs index 144031f59..829b1ec7e 100644 --- a/src/Test.UnitTests.Sarif/Baseline2/WhatComparerTests.cs +++ b/src/Test.UnitTests.Sarif/Baseline2/WhatComparerTests.cs @@ -3,10 +3,13 @@ using System; using System.Collections.Generic; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif; using Microsoft.CodeAnalysis.Sarif.Baseline; using Microsoft.CodeAnalysis.Sarif.Baseline.ResultMatching; + using Xunit; namespace Microsoft.CodeAnalysis.Test.UnitTests.Sarif.Baseline diff --git a/src/Test.UnitTests.Sarif/Baseline2/WhereComparerTests.cs b/src/Test.UnitTests.Sarif/Baseline2/WhereComparerTests.cs index 6cf5b01c5..31672da13 100644 --- a/src/Test.UnitTests.Sarif/Baseline2/WhereComparerTests.cs +++ b/src/Test.UnitTests.Sarif/Baseline2/WhereComparerTests.cs @@ -3,9 +3,12 @@ using System; using System.Collections.Generic; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif; using Microsoft.CodeAnalysis.Sarif.Baseline; + using Xunit; namespace Microsoft.CodeAnalysis.Test.UnitTests.Sarif.Baseline diff --git a/src/Test.UnitTests.Sarif/CacheTests.cs b/src/Test.UnitTests.Sarif/CacheTests.cs index d36a57f47..cad440bfc 100644 --- a/src/Test.UnitTests.Sarif/CacheTests.cs +++ b/src/Test.UnitTests.Sarif/CacheTests.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using FluentAssertions; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.UnitTests diff --git a/src/Test.UnitTests.Sarif/ConsoleLoggerTests.cs b/src/Test.UnitTests.Sarif/ConsoleLoggerTests.cs index 2140f7c98..529fd33ee 100644 --- a/src/Test.UnitTests.Sarif/ConsoleLoggerTests.cs +++ b/src/Test.UnitTests.Sarif/ConsoleLoggerTests.cs @@ -1,8 +1,11 @@ // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif; + using Xunit; namespace Microsoft.CodeAnalysis.Test.UnitTests.Sarif diff --git a/src/Test.UnitTests.Sarif/Core/ArtifactLocationTests.cs b/src/Test.UnitTests.Sarif/Core/ArtifactLocationTests.cs index 66d5960dc..1c2d58ea0 100644 --- a/src/Test.UnitTests.Sarif/Core/ArtifactLocationTests.cs +++ b/src/Test.UnitTests.Sarif/Core/ArtifactLocationTests.cs @@ -3,8 +3,11 @@ using System; using System.Collections.Generic; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif; + using Xunit; namespace Microsoft.CodeAnalysis.Test.UnitTests.Sarif.Core diff --git a/src/Test.UnitTests.Sarif/Core/ArtifactTests.cs b/src/Test.UnitTests.Sarif/Core/ArtifactTests.cs index f84edbe3e..d8a260212 100644 --- a/src/Test.UnitTests.Sarif/Core/ArtifactTests.cs +++ b/src/Test.UnitTests.Sarif/Core/ArtifactTests.cs @@ -4,10 +4,15 @@ using System; using System.IO; using System.Text; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif; + using Moq; + using Newtonsoft.Json; + using Xunit; namespace Microsoft.CodeAnalysis.Test.UnitTests.Sarif.Core @@ -270,4 +275,4 @@ private static void Validate(Artifact fileData, OptionallyEmittedData dataToInse } } -} \ No newline at end of file +} diff --git a/src/Test.UnitTests.Sarif/Core/FileLocationTests.cs b/src/Test.UnitTests.Sarif/Core/FileLocationTests.cs index 95992cfd1..017ac96d7 100644 --- a/src/Test.UnitTests.Sarif/Core/FileLocationTests.cs +++ b/src/Test.UnitTests.Sarif/Core/FileLocationTests.cs @@ -3,7 +3,9 @@ using System; using System.Text; + using FluentAssertions; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.UnitTests.Core diff --git a/src/Test.UnitTests.Sarif/Core/InvocationTests.cs b/src/Test.UnitTests.Sarif/Core/InvocationTests.cs index 5ce6ef733..7c86fa9c8 100644 --- a/src/Test.UnitTests.Sarif/Core/InvocationTests.cs +++ b/src/Test.UnitTests.Sarif/Core/InvocationTests.cs @@ -1,5 +1,7 @@ using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif; + using Xunit; namespace Microsoft.CodeAnalysis.Test.UnitTests.Sarif.Core diff --git a/src/Test.UnitTests.Sarif/Core/LocationTests.cs b/src/Test.UnitTests.Sarif/Core/LocationTests.cs index 1c9c86a98..e73ca8d54 100644 --- a/src/Test.UnitTests.Sarif/Core/LocationTests.cs +++ b/src/Test.UnitTests.Sarif/Core/LocationTests.cs @@ -1,5 +1,7 @@ using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif; + using Xunit; namespace Microsoft.CodeAnalysis.Test.UnitTests.Sarif.Core diff --git a/src/Test.UnitTests.Sarif/Core/PropertyBagHolderTests.cs b/src/Test.UnitTests.Sarif/Core/PropertyBagHolderTests.cs index f4e80d4d9..4dd29e9fb 100644 --- a/src/Test.UnitTests.Sarif/Core/PropertyBagHolderTests.cs +++ b/src/Test.UnitTests.Sarif/Core/PropertyBagHolderTests.cs @@ -3,10 +3,14 @@ using System; using System.Collections.Generic; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif; + using Newtonsoft.Json; using Newtonsoft.Json.Serialization; + using Xunit; namespace Microsoft.CodeAnalysis.Test.UnitTests.Sarif.Core diff --git a/src/Test.UnitTests.Sarif/Core/RegionTests.cs b/src/Test.UnitTests.Sarif/Core/RegionTests.cs index ef4aa1467..bf3e50f56 100644 --- a/src/Test.UnitTests.Sarif/Core/RegionTests.cs +++ b/src/Test.UnitTests.Sarif/Core/RegionTests.cs @@ -2,7 +2,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif; + using Xunit; namespace Microsoft.CodeAnalysis.Test.UnitTests.Sarif.Core @@ -125,4 +127,4 @@ public void Region_HasAllRegionTypes_ComputesPropertiesCorrectly() region.IsBinaryRegion.Should().BeTrue(); } } -} \ No newline at end of file +} diff --git a/src/Test.UnitTests.Sarif/Core/ResultTests.cs b/src/Test.UnitTests.Sarif/Core/ResultTests.cs index cf095ecae..0fac934f1 100644 --- a/src/Test.UnitTests.Sarif/Core/ResultTests.cs +++ b/src/Test.UnitTests.Sarif/Core/ResultTests.cs @@ -2,7 +2,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif; + using Xunit; namespace Microsoft.CodeAnalysis.Test.UnitTests.Sarif.Core diff --git a/src/Test.UnitTests.Sarif/Core/RunTests.cs b/src/Test.UnitTests.Sarif/Core/RunTests.cs index 69f92322d..6ad3f6b57 100644 --- a/src/Test.UnitTests.Sarif/Core/RunTests.cs +++ b/src/Test.UnitTests.Sarif/Core/RunTests.cs @@ -3,9 +3,13 @@ using System; using System.Collections.Generic; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif; + using Newtonsoft.Json; + using Xunit; namespace Microsoft.CodeAnalysis.Test.UnitTests.Sarif.Core diff --git a/src/Test.UnitTests.Sarif/Core/SarifLogTests.cs b/src/Test.UnitTests.Sarif/Core/SarifLogTests.cs index 5979e5851..52c0c13ec 100644 --- a/src/Test.UnitTests.Sarif/Core/SarifLogTests.cs +++ b/src/Test.UnitTests.Sarif/Core/SarifLogTests.cs @@ -2,7 +2,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using FluentAssertions; + using Newtonsoft.Json; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.UnitTests.Core diff --git a/src/Test.UnitTests.Sarif/Core/StackTests.cs b/src/Test.UnitTests.Sarif/Core/StackTests.cs index a00db2cf6..edf6bdef8 100644 --- a/src/Test.UnitTests.Sarif/Core/StackTests.cs +++ b/src/Test.UnitTests.Sarif/Core/StackTests.cs @@ -6,8 +6,11 @@ using System.Diagnostics; using System.IO; using System.Linq; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif; + using Xunit; namespace Microsoft.CodeAnalysis.Test.UnitTests.Sarif.Core diff --git a/src/Test.UnitTests.Sarif/Core/TagsTests.cs b/src/Test.UnitTests.Sarif/Core/TagsTests.cs index a84dacae5..539221adb 100644 --- a/src/Test.UnitTests.Sarif/Core/TagsTests.cs +++ b/src/Test.UnitTests.Sarif/Core/TagsTests.cs @@ -2,7 +2,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; + using FluentAssertions; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Test.UnitTests.Sarif/Core/ToolTests.cs b/src/Test.UnitTests.Sarif/Core/ToolTests.cs index fba2e4ad1..f6675d102 100644 --- a/src/Test.UnitTests.Sarif/Core/ToolTests.cs +++ b/src/Test.UnitTests.Sarif/Core/ToolTests.cs @@ -4,7 +4,9 @@ using System; using System.Collections.ObjectModel; using System.Text; + using FluentAssertions; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Core diff --git a/src/Test.UnitTests.Sarif/Core/WebMessageUtilitiesTests.cs b/src/Test.UnitTests.Sarif/Core/WebMessageUtilitiesTests.cs index 9bb0757b0..22bc4f770 100644 --- a/src/Test.UnitTests.Sarif/Core/WebMessageUtilitiesTests.cs +++ b/src/Test.UnitTests.Sarif/Core/WebMessageUtilitiesTests.cs @@ -2,8 +2,11 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif; + using Xunit; namespace Microsoft.CodeAnalysis.Test.UnitTests.Sarif.Core diff --git a/src/Test.UnitTests.Sarif/Core/WebRequestTests.cs b/src/Test.UnitTests.Sarif/Core/WebRequestTests.cs index a85c33c22..37e634de1 100644 --- a/src/Test.UnitTests.Sarif/Core/WebRequestTests.cs +++ b/src/Test.UnitTests.Sarif/Core/WebRequestTests.cs @@ -2,9 +2,12 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; + using FluentAssertions; using FluentAssertions.Extensions; + using Microsoft.CodeAnalysis.Sarif; + using Xunit; namespace Microsoft.CodeAnalysis.Test.UnitTests.Sarif.Core @@ -186,7 +189,7 @@ public void WebRequest_TryParse_ReturnsFalseOnInvalidRequest() webRequest.Should().BeNull(); } - [Fact(Skip="Disabling due to timing inconsistencies across execution environments.")] + [Fact(Skip = "Disabling due to timing inconsistencies across execution environments.")] public void WebRequest_TryParse_HasAcceptablePerformance() { // This is a sanitized version of an actual customer's web request that exposed a perf diff --git a/src/Test.UnitTests.Sarif/Core/WebResponseTests.cs b/src/Test.UnitTests.Sarif/Core/WebResponseTests.cs index eb61d9daf..5c7050d26 100644 --- a/src/Test.UnitTests.Sarif/Core/WebResponseTests.cs +++ b/src/Test.UnitTests.Sarif/Core/WebResponseTests.cs @@ -2,8 +2,11 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif; + using Xunit; namespace Microsoft.CodeAnalysis.Test.UnitTests.Sarif.Core diff --git a/src/Test.UnitTests.Sarif/ExtensionsTests.cs b/src/Test.UnitTests.Sarif/ExtensionsTests.cs index b5b1ae437..c0aadc8ea 100644 --- a/src/Test.UnitTests.Sarif/ExtensionsTests.cs +++ b/src/Test.UnitTests.Sarif/ExtensionsTests.cs @@ -4,8 +4,11 @@ using System.Collections.Generic; using System.Xml; using System.Xml.Linq; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif.Converters; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Test.UnitTests.Sarif/FileRegionsCacheTests.cs b/src/Test.UnitTests.Sarif/FileRegionsCacheTests.cs index 2fb0a9e42..01dea08ac 100644 --- a/src/Test.UnitTests.Sarif/FileRegionsCacheTests.cs +++ b/src/Test.UnitTests.Sarif/FileRegionsCacheTests.cs @@ -5,7 +5,9 @@ using System.Collections.ObjectModel; using System.Diagnostics; using System.Text; + using FluentAssertions; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.UnitTests diff --git a/src/Test.UnitTests.Sarif/GitHelperTests.cs b/src/Test.UnitTests.Sarif/GitHelperTests.cs index b0f951650..631f26c9c 100644 --- a/src/Test.UnitTests.Sarif/GitHelperTests.cs +++ b/src/Test.UnitTests.Sarif/GitHelperTests.cs @@ -2,8 +2,11 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; + using FluentAssertions; + using Moq; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Test.UnitTests.Sarif/JsonTests.cs b/src/Test.UnitTests.Sarif/JsonTests.cs index 99e51e3ad..7ff157fe2 100644 --- a/src/Test.UnitTests.Sarif/JsonTests.cs +++ b/src/Test.UnitTests.Sarif/JsonTests.cs @@ -5,7 +5,9 @@ using System.Collections.Generic; using System.IO; using System.Text; + using Microsoft.CodeAnalysis.Sarif.Writers; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif @@ -79,4 +81,4 @@ protected static string CreateCurrentV2SarifLogText(int resultCount = 0, Action< return JsonConvert.SerializeObject(sarifLog, Formatting.Indented); } } -} \ No newline at end of file +} diff --git a/src/Test.UnitTests.Sarif/Map/JsonMapBuilderTests.cs b/src/Test.UnitTests.Sarif/Map/JsonMapBuilderTests.cs index 69a5f7fda..baefaa01b 100644 --- a/src/Test.UnitTests.Sarif/Map/JsonMapBuilderTests.cs +++ b/src/Test.UnitTests.Sarif/Map/JsonMapBuilderTests.cs @@ -2,6 +2,7 @@ // Licensed under the MIT License. using System.IO; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Map diff --git a/src/Test.UnitTests.Sarif/Map/LongArrayDeltaConverterTests.cs b/src/Test.UnitTests.Sarif/Map/LongArrayDeltaConverterTests.cs index ca8c5a144..5470030f0 100644 --- a/src/Test.UnitTests.Sarif/Map/LongArrayDeltaConverterTests.cs +++ b/src/Test.UnitTests.Sarif/Map/LongArrayDeltaConverterTests.cs @@ -2,7 +2,9 @@ // Licensed under the MIT License. using System.Collections.Generic; + using Newtonsoft.Json; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Map diff --git a/src/Test.UnitTests.Sarif/MockFactory.cs b/src/Test.UnitTests.Sarif/MockFactory.cs index 006bc2409..3ba966e3a 100644 --- a/src/Test.UnitTests.Sarif/MockFactory.cs +++ b/src/Test.UnitTests.Sarif/MockFactory.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; + using Moq; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Test.UnitTests.Sarif/OrderSensitiveValueComparisonListTests.cs b/src/Test.UnitTests.Sarif/OrderSensitiveValueComparisonListTests.cs index cc79687e6..caa5c0f28 100644 --- a/src/Test.UnitTests.Sarif/OrderSensitiveValueComparisonListTests.cs +++ b/src/Test.UnitTests.Sarif/OrderSensitiveValueComparisonListTests.cs @@ -3,7 +3,9 @@ using System; using System.Collections.Generic; + using FluentAssertions; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.UnitTests @@ -110,4 +112,4 @@ private OrderSensitiveValueComparisonList CreateTestList(IEquali return list; } } -} \ No newline at end of file +} diff --git a/src/Test.UnitTests.Sarif/Processors/GenericTests/GenericProcessorTests.cs b/src/Test.UnitTests.Sarif/Processors/GenericTests/GenericProcessorTests.cs index 9fd0b2ce0..6919f123b 100644 --- a/src/Test.UnitTests.Sarif/Processors/GenericTests/GenericProcessorTests.cs +++ b/src/Test.UnitTests.Sarif/Processors/GenericTests/GenericProcessorTests.cs @@ -3,7 +3,9 @@ using System; using System.Collections.Generic; using System.Linq; + using FluentAssertions; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Processors diff --git a/src/Test.UnitTests.Sarif/Processors/Log/LogPipelineSerializationTests.cs b/src/Test.UnitTests.Sarif/Processors/Log/LogPipelineSerializationTests.cs index 7645668c8..c6602b542 100644 --- a/src/Test.UnitTests.Sarif/Processors/Log/LogPipelineSerializationTests.cs +++ b/src/Test.UnitTests.Sarif/Processors/Log/LogPipelineSerializationTests.cs @@ -2,8 +2,11 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; + using FluentAssertions; + using Newtonsoft.Json; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Processors diff --git a/src/Test.UnitTests.Sarif/Processors/Log/MergeStageTests.cs b/src/Test.UnitTests.Sarif/Processors/Log/MergeStageTests.cs index 599dbf842..39601eada 100644 --- a/src/Test.UnitTests.Sarif/Processors/Log/MergeStageTests.cs +++ b/src/Test.UnitTests.Sarif/Processors/Log/MergeStageTests.cs @@ -3,7 +3,9 @@ using System; using System.Collections.Generic; + using FluentAssertions; + using Xunit; using Xunit.Abstractions; diff --git a/src/Test.UnitTests.Sarif/Processors/Log/RebaseUriStageTests.cs b/src/Test.UnitTests.Sarif/Processors/Log/RebaseUriStageTests.cs index 3b456899d..f92fa8616 100644 --- a/src/Test.UnitTests.Sarif/Processors/Log/RebaseUriStageTests.cs +++ b/src/Test.UnitTests.Sarif/Processors/Log/RebaseUriStageTests.cs @@ -4,7 +4,9 @@ using System; using System.Collections.Generic; using System.Linq; + using FluentAssertions; + using Xunit; using Xunit.Abstractions; diff --git a/src/Test.UnitTests.Sarif/Processors/Log/SarifLogExtensionTests.cs b/src/Test.UnitTests.Sarif/Processors/Log/SarifLogExtensionTests.cs index bdd81053d..c564fa302 100644 --- a/src/Test.UnitTests.Sarif/Processors/Log/SarifLogExtensionTests.cs +++ b/src/Test.UnitTests.Sarif/Processors/Log/SarifLogExtensionTests.cs @@ -1,8 +1,11 @@ using System; using System.Collections.Generic; using System.Linq; + using FluentAssertions; + using Newtonsoft.Json; + using Xunit; using Xunit.Abstractions; diff --git a/src/Test.UnitTests.Sarif/PropertiesDictionaryTests.cs b/src/Test.UnitTests.Sarif/PropertiesDictionaryTests.cs index bcf32ec75..6fa76f982 100644 --- a/src/Test.UnitTests.Sarif/PropertiesDictionaryTests.cs +++ b/src/Test.UnitTests.Sarif/PropertiesDictionaryTests.cs @@ -4,7 +4,9 @@ using System; using System.Collections.Generic; using System.IO; + using FluentAssertions; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Test.UnitTests.Sarif/Query/EvaluatorTests.cs b/src/Test.UnitTests.Sarif/Query/EvaluatorTests.cs index f766748f5..5a52c460a 100644 --- a/src/Test.UnitTests.Sarif/Query/EvaluatorTests.cs +++ b/src/Test.UnitTests.Sarif/Query/EvaluatorTests.cs @@ -2,7 +2,9 @@ using System.Collections; using System.Collections.Generic; using System.Linq; + using Microsoft.CodeAnalysis.Sarif.Query.Evaluators; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Query diff --git a/src/Test.UnitTests.Sarif/Query/StringSliceTests.cs b/src/Test.UnitTests.Sarif/Query/StringSliceTests.cs index 908dcc768..3ac1f7296 100644 --- a/src/Test.UnitTests.Sarif/Query/StringSliceTests.cs +++ b/src/Test.UnitTests.Sarif/Query/StringSliceTests.cs @@ -1,6 +1,8 @@ using System; using System.Text; + using Microsoft.CodeAnalysis.Sarif.Query; + using Xunit; namespace Microsoft.CodeAnalysis.Test.UnitTests.Sarif.Query diff --git a/src/Test.UnitTests.Sarif/RandomSarifLogGenerator.cs b/src/Test.UnitTests.Sarif/RandomSarifLogGenerator.cs index fd6ef95f4..ff638231b 100644 --- a/src/Test.UnitTests.Sarif/RandomSarifLogGenerator.cs +++ b/src/Test.UnitTests.Sarif/RandomSarifLogGenerator.cs @@ -5,6 +5,7 @@ using System.IO; using System.Linq; using System.Runtime.CompilerServices; + using Xunit.Abstractions; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Test.UnitTests.Sarif/Readers/DeferredCollectionsTests.cs b/src/Test.UnitTests.Sarif/Readers/DeferredCollectionsTests.cs index 28ada7f46..63bc0649b 100644 --- a/src/Test.UnitTests.Sarif/Readers/DeferredCollectionsTests.cs +++ b/src/Test.UnitTests.Sarif/Readers/DeferredCollectionsTests.cs @@ -4,8 +4,11 @@ using System.Collections.Generic; using System.IO; using System.Linq; + using Microsoft.CodeAnalysis.Sarif.Readers.SampleModel; + using Newtonsoft.Json; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Readers diff --git a/src/Test.UnitTests.Sarif/Readers/EnumConverterTests.cs b/src/Test.UnitTests.Sarif/Readers/EnumConverterTests.cs index e300abe0d..c4e86b5a0 100644 --- a/src/Test.UnitTests.Sarif/Readers/EnumConverterTests.cs +++ b/src/Test.UnitTests.Sarif/Readers/EnumConverterTests.cs @@ -48,4 +48,4 @@ public void EnumConverter_ConvertToCamelCase() Assert.Equal("meToo", EnumConverter.ConvertToCamelCase("MeToo")); } } -} \ No newline at end of file +} diff --git a/src/Test.UnitTests.Sarif/Readers/IsSuppressedInSourceConverterTests.cs b/src/Test.UnitTests.Sarif/Readers/IsSuppressedInSourceConverterTests.cs index 5a555e495..c423da5be 100644 --- a/src/Test.UnitTests.Sarif/Readers/IsSuppressedInSourceConverterTests.cs +++ b/src/Test.UnitTests.Sarif/Readers/IsSuppressedInSourceConverterTests.cs @@ -2,8 +2,11 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; + using FluentAssertions; + using Newtonsoft.Json; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Readers diff --git a/src/Test.UnitTests.Sarif/Readers/LineMappingStreamReaderTests.cs b/src/Test.UnitTests.Sarif/Readers/LineMappingStreamReaderTests.cs index 0215d60f5..1fc8847e0 100644 --- a/src/Test.UnitTests.Sarif/Readers/LineMappingStreamReaderTests.cs +++ b/src/Test.UnitTests.Sarif/Readers/LineMappingStreamReaderTests.cs @@ -2,9 +2,12 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; using System.IO; + using Microsoft.CodeAnalysis.Sarif.Readers.SampleModel; + using Newtonsoft.Json; using Newtonsoft.Json.Linq; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Readers diff --git a/src/Test.UnitTests.Sarif/Readers/PropertyBagConverterTests.cs b/src/Test.UnitTests.Sarif/Readers/PropertyBagConverterTests.cs index f31912db7..2866cd4fd 100644 --- a/src/Test.UnitTests.Sarif/Readers/PropertyBagConverterTests.cs +++ b/src/Test.UnitTests.Sarif/Readers/PropertyBagConverterTests.cs @@ -4,8 +4,11 @@ using System; using System.Collections.Generic; using System.Linq; + using FluentAssertions; + using Newtonsoft.Json; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Readers diff --git a/src/Test.UnitTests.Sarif/Readers/ResultDiffingVisitorTests.cs b/src/Test.UnitTests.Sarif/Readers/ResultDiffingVisitorTests.cs index a67cd1dbe..ae18bd5e1 100644 --- a/src/Test.UnitTests.Sarif/Readers/ResultDiffingVisitorTests.cs +++ b/src/Test.UnitTests.Sarif/Readers/ResultDiffingVisitorTests.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using System.Linq; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Readers diff --git a/src/Test.UnitTests.Sarif/Readers/SampleModel/LogModel.cs b/src/Test.UnitTests.Sarif/Readers/SampleModel/LogModel.cs index 7e3d92319..4c27af78f 100644 --- a/src/Test.UnitTests.Sarif/Readers/SampleModel/LogModel.cs +++ b/src/Test.UnitTests.Sarif/Readers/SampleModel/LogModel.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.IO; + using Newtonsoft.Json; using Newtonsoft.Json.Serialization; diff --git a/src/Test.UnitTests.Sarif/RoundTrippingTests.cs b/src/Test.UnitTests.Sarif/RoundTrippingTests.cs index 2fd790db2..a2e987acf 100644 --- a/src/Test.UnitTests.Sarif/RoundTrippingTests.cs +++ b/src/Test.UnitTests.Sarif/RoundTrippingTests.cs @@ -3,8 +3,11 @@ using System; using System.Globalization; + using FluentAssertions; + using Newtonsoft.Json; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Test.UnitTests.Sarif/SarifExtensionsTests.cs b/src/Test.UnitTests.Sarif/SarifExtensionsTests.cs index b6ff05fc2..47030fea7 100644 --- a/src/Test.UnitTests.Sarif/SarifExtensionsTests.cs +++ b/src/Test.UnitTests.Sarif/SarifExtensionsTests.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Text; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif @@ -139,4 +140,4 @@ public void SarifExtensions_Result_GetMessageText_Concise_Truncated() Assert.Equal(Expected, actual); } } -} \ No newline at end of file +} diff --git a/src/Test.UnitTests.Sarif/SarifUtilitiesTests.cs b/src/Test.UnitTests.Sarif/SarifUtilitiesTests.cs index 5a7fe430b..24d7c5676 100644 --- a/src/Test.UnitTests.Sarif/SarifUtilitiesTests.cs +++ b/src/Test.UnitTests.Sarif/SarifUtilitiesTests.cs @@ -1,15 +1,15 @@ // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using Castle.DynamicProxy.Generators; - -using FluentAssertions; - using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Text; +using Castle.DynamicProxy.Generators; + +using FluentAssertions; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Test.UnitTests.Sarif/ToolFormatTests.cs b/src/Test.UnitTests.Sarif/ToolFormatTests.cs index 96366997b..add79d828 100644 --- a/src/Test.UnitTests.Sarif/ToolFormatTests.cs +++ b/src/Test.UnitTests.Sarif/ToolFormatTests.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.Reflection; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Test.UnitTests.Sarif/UriConverterTests.cs b/src/Test.UnitTests.Sarif/UriConverterTests.cs index 8c5485921..58f7203d8 100644 --- a/src/Test.UnitTests.Sarif/UriConverterTests.cs +++ b/src/Test.UnitTests.Sarif/UriConverterTests.cs @@ -6,9 +6,13 @@ using System.Linq; using System.Runtime.Serialization; using System.Text; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif; + using Newtonsoft.Json; + using Xunit; namespace Microsoft.CodeAnalysis.Test.UnitTests.Sarif diff --git a/src/Test.UnitTests.Sarif/Visitors/ExtractAllArtifactionLocationsVisitorTests.cs b/src/Test.UnitTests.Sarif/Visitors/ExtractAllArtifactionLocationsVisitorTests.cs index 8d4de5276..32acda456 100644 --- a/src/Test.UnitTests.Sarif/Visitors/ExtractAllArtifactionLocationsVisitorTests.cs +++ b/src/Test.UnitTests.Sarif/Visitors/ExtractAllArtifactionLocationsVisitorTests.cs @@ -2,8 +2,11 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Collections.Generic; + using FluentAssertions; + using Microsoft.CodeAnalysis.Test.Utilities.Sarif; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Visitors diff --git a/src/Test.UnitTests.Sarif/Visitors/GitHubIngestionVisitorTests.cs b/src/Test.UnitTests.Sarif/Visitors/GitHubIngestionVisitorTests.cs index 73df73664..147ed31ed 100644 --- a/src/Test.UnitTests.Sarif/Visitors/GitHubIngestionVisitorTests.cs +++ b/src/Test.UnitTests.Sarif/Visitors/GitHubIngestionVisitorTests.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using Newtonsoft.Json; + using Xunit; using Xunit.Abstractions; diff --git a/src/Test.UnitTests.Sarif/Visitors/InsertOptionalDataVisitorTests.cs b/src/Test.UnitTests.Sarif/Visitors/InsertOptionalDataVisitorTests.cs index 265f31c68..e604a6b2e 100644 --- a/src/Test.UnitTests.Sarif/Visitors/InsertOptionalDataVisitorTests.cs +++ b/src/Test.UnitTests.Sarif/Visitors/InsertOptionalDataVisitorTests.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.IO; + using FluentAssertions; using Microsoft.CodeAnalysis.Sarif.Driver; @@ -11,7 +12,9 @@ using Microsoft.CodeAnalysis.Test.Utilities.Sarif; using Moq; + using Newtonsoft.Json; + using Xunit; using Xunit.Abstractions; @@ -711,4 +714,4 @@ public void InsertOptionalDataVisitor_ResolvesOriginalUriBaseIds() run.Artifacts[0].Contents.Text.Should().Be(File.ReadAllText(Path.Combine(testDirectory, inputFileName))); } } -} \ No newline at end of file +} diff --git a/src/Test.UnitTests.Sarif/Visitors/MakeUriAbsoluteVisitorTest.cs b/src/Test.UnitTests.Sarif/Visitors/MakeUriAbsoluteVisitorTest.cs index 50bcc05e5..a072e1753 100644 --- a/src/Test.UnitTests.Sarif/Visitors/MakeUriAbsoluteVisitorTest.cs +++ b/src/Test.UnitTests.Sarif/Visitors/MakeUriAbsoluteVisitorTest.cs @@ -4,7 +4,9 @@ using System; using System.Collections.Generic; using System.Linq; + using FluentAssertions; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Visitors diff --git a/src/Test.UnitTests.Sarif/Visitors/PerRunPerRuleSplittingVisitorTests.cs b/src/Test.UnitTests.Sarif/Visitors/PerRunPerRuleSplittingVisitorTests.cs index f05f33f22..28b166d29 100644 --- a/src/Test.UnitTests.Sarif/Visitors/PerRunPerRuleSplittingVisitorTests.cs +++ b/src/Test.UnitTests.Sarif/Visitors/PerRunPerRuleSplittingVisitorTests.cs @@ -1,8 +1,11 @@ // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; + using FluentAssertions; + using Microsoft.CodeAnalysis.Test.Utilities.Sarif; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Visitors diff --git a/src/Test.UnitTests.Sarif/Visitors/RebaseUriVisitorTests.cs b/src/Test.UnitTests.Sarif/Visitors/RebaseUriVisitorTests.cs index 5604eff73..617becd10 100644 --- a/src/Test.UnitTests.Sarif/Visitors/RebaseUriVisitorTests.cs +++ b/src/Test.UnitTests.Sarif/Visitors/RebaseUriVisitorTests.cs @@ -5,9 +5,13 @@ using System.Collections.Generic; using System.IO; using System.Linq; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif.Writers; + using Newtonsoft.Json; + using Xunit; using Xunit.Abstractions; diff --git a/src/Test.UnitTests.Sarif/Visitors/RemapIndicesVisitorTests.cs b/src/Test.UnitTests.Sarif/Visitors/RemapIndicesVisitorTests.cs index af9297d39..4c6908ac0 100644 --- a/src/Test.UnitTests.Sarif/Visitors/RemapIndicesVisitorTests.cs +++ b/src/Test.UnitTests.Sarif/Visitors/RemapIndicesVisitorTests.cs @@ -88,7 +88,7 @@ public void RunMergingVisitor_RemapsNestedFilesProperly() // Confirm that Artifacts (including indirectly referenced ones) were all copied to the destination Run mergedRun.Artifacts.Count.Should().Be(baselineRun.Artifacts.Count + currentRun.Artifacts.Count); - + // Confirm that Artifacts have consistent indices in the merged Run for (int i = 0; i < mergedRun.Artifacts.Count; i++) { @@ -287,17 +287,17 @@ public void RunMergingVisitor_MapsRulesProperly() { var baselineRun = new Run { - Tool = new Tool + Tool = new Tool { - Driver = new ToolComponent - { + Driver = new ToolComponent + { Name = "Test Tool", Rules = new List() - { + { new ReportingDescriptor() { Id = "Rule001" }, new ReportingDescriptor() { Id = "Rule002" }, } - } , + }, }, Results = new List { diff --git a/src/Test.UnitTests.Sarif/Visitors/RemoveOptionalDataVisitorTests.cs b/src/Test.UnitTests.Sarif/Visitors/RemoveOptionalDataVisitorTests.cs index be5a9466b..fb3131e4c 100644 --- a/src/Test.UnitTests.Sarif/Visitors/RemoveOptionalDataVisitorTests.cs +++ b/src/Test.UnitTests.Sarif/Visitors/RemoveOptionalDataVisitorTests.cs @@ -1,9 +1,11 @@ // Copyright (c) Microsoft. All rights reserved. Licensed under the MIT // license. See LICENSE file in the project root for full license information. -using FluentAssertions; using System; using System.Collections.Generic; + +using FluentAssertions; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Visitors @@ -41,4 +43,4 @@ public void RemoveGuids() log.Runs[0].Results[0].Guid.Should().BeNull(); } } -} \ No newline at end of file +} diff --git a/src/Test.UnitTests.Sarif/Visitors/SarifCurrentToVersionOneVisitorTests.cs b/src/Test.UnitTests.Sarif/Visitors/SarifCurrentToVersionOneVisitorTests.cs index 8c1eb28ae..d40faafa9 100644 --- a/src/Test.UnitTests.Sarif/Visitors/SarifCurrentToVersionOneVisitorTests.cs +++ b/src/Test.UnitTests.Sarif/Visitors/SarifCurrentToVersionOneVisitorTests.cs @@ -4,7 +4,9 @@ using Microsoft.CodeAnalysis.Sarif.VersionOne; using Microsoft.CodeAnalysis.Sarif.Visitors; using Microsoft.CodeAnalysis.Sarif.Writers; + using Newtonsoft.Json; + using Xunit; using Xunit.Abstractions; @@ -80,4 +82,4 @@ protected override string ConstructTestOutputFromInputResource(string inputResou [Fact] public void SarifTransformerTests_ToVersionOne_PopulatesRunIdAndStableId() => RunTest("OneRunWithAutomationDetails.sarif"); } -} \ No newline at end of file +} diff --git a/src/Test.UnitTests.Sarif/Visitors/SarifVersionOneToCurrentVisitorTests.cs b/src/Test.UnitTests.Sarif/Visitors/SarifVersionOneToCurrentVisitorTests.cs index 88b8cf5eb..54d67e380 100644 --- a/src/Test.UnitTests.Sarif/Visitors/SarifVersionOneToCurrentVisitorTests.cs +++ b/src/Test.UnitTests.Sarif/Visitors/SarifVersionOneToCurrentVisitorTests.cs @@ -3,7 +3,9 @@ using Microsoft.CodeAnalysis.Sarif.VersionOne; using Microsoft.CodeAnalysis.Sarif.Visitors; + using Newtonsoft.Json; + using Xunit; using Xunit.Abstractions; diff --git a/src/Test.UnitTests.Sarif/Visitors/UpdateIndicesFromLegacyDataVisitorTests.cs b/src/Test.UnitTests.Sarif/Visitors/UpdateIndicesFromLegacyDataVisitorTests.cs index afa4d59a2..c28199f56 100644 --- a/src/Test.UnitTests.Sarif/Visitors/UpdateIndicesFromLegacyDataVisitorTests.cs +++ b/src/Test.UnitTests.Sarif/Visitors/UpdateIndicesFromLegacyDataVisitorTests.cs @@ -3,7 +3,9 @@ using System; using System.Collections.Generic; + using FluentAssertions; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Visitors diff --git a/src/Test.UnitTests.Sarif/WarningsTests.cs b/src/Test.UnitTests.Sarif/WarningsTests.cs index 03c3e4e99..cae981748 100644 --- a/src/Test.UnitTests.Sarif/WarningsTests.cs +++ b/src/Test.UnitTests.Sarif/WarningsTests.cs @@ -3,6 +3,7 @@ using FluentAssertions; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Test.UnitTests.Sarif/Writers/MimeTypeTests.cs b/src/Test.UnitTests.Sarif/Writers/MimeTypeTests.cs index b65e62ffe..057918ed8 100644 --- a/src/Test.UnitTests.Sarif/Writers/MimeTypeTests.cs +++ b/src/Test.UnitTests.Sarif/Writers/MimeTypeTests.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Writers diff --git a/src/Test.UnitTests.Sarif/Writers/PrereleaseCompatibilityTransformerTests.cs b/src/Test.UnitTests.Sarif/Writers/PrereleaseCompatibilityTransformerTests.cs index a59941583..1ade8909b 100644 --- a/src/Test.UnitTests.Sarif/Writers/PrereleaseCompatibilityTransformerTests.cs +++ b/src/Test.UnitTests.Sarif/Writers/PrereleaseCompatibilityTransformerTests.cs @@ -3,7 +3,9 @@ using System; using System.IO; + using Newtonsoft.Json; + using Xunit; using Xunit.Abstractions; diff --git a/src/Test.UnitTests.Sarif/Writers/ResultLogJsonWriterTests.cs b/src/Test.UnitTests.Sarif/Writers/ResultLogJsonWriterTests.cs index 8f0cfed89..e650d7b4c 100644 --- a/src/Test.UnitTests.Sarif/Writers/ResultLogJsonWriterTests.cs +++ b/src/Test.UnitTests.Sarif/Writers/ResultLogJsonWriterTests.cs @@ -5,8 +5,11 @@ using System.Collections.Generic; using System.Globalization; using System.IO; + using FluentAssertions; + using Newtonsoft.Json; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Writers diff --git a/src/Test.UnitTests.Sarif/Writers/SarifConsolidatorTests.cs b/src/Test.UnitTests.Sarif/Writers/SarifConsolidatorTests.cs index 2543bd061..89a2e058b 100644 --- a/src/Test.UnitTests.Sarif/Writers/SarifConsolidatorTests.cs +++ b/src/Test.UnitTests.Sarif/Writers/SarifConsolidatorTests.cs @@ -3,7 +3,9 @@ using System; using System.Collections.Generic; + using Microsoft.CodeAnalysis.Sarif.Writers; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Test.UnitTests.Sarif/Writers/SarifLoggerTests.cs b/src/Test.UnitTests.Sarif/Writers/SarifLoggerTests.cs index 52fd9557b..3d20d1a57 100644 --- a/src/Test.UnitTests.Sarif/Writers/SarifLoggerTests.cs +++ b/src/Test.UnitTests.Sarif/Writers/SarifLoggerTests.cs @@ -8,11 +8,15 @@ using System.Linq; using System.Reflection; using System.Text; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif.Driver; using Microsoft.CodeAnalysis.Sarif.Writers; using Microsoft.CodeAnalysis.Test.Utilities.Sarif; + using Newtonsoft.Json; + using Xunit; using Xunit.Abstractions; diff --git a/src/Test.UnitTests.WorkItems/FilingClientFactoryTests.cs b/src/Test.UnitTests.WorkItems/FilingClientFactoryTests.cs index 4d1828a37..a1f3a9256 100644 --- a/src/Test.UnitTests.WorkItems/FilingClientFactoryTests.cs +++ b/src/Test.UnitTests.WorkItems/FilingClientFactoryTests.cs @@ -2,7 +2,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; + using FluentAssertions; + using Xunit; namespace Microsoft.WorkItems diff --git a/src/Test.UnitTests.WorkItems/Logging/ApplicationInsightsTelemetryInitializerTests.cs b/src/Test.UnitTests.WorkItems/Logging/ApplicationInsightsTelemetryInitializerTests.cs index b5c402f69..61085f234 100644 --- a/src/Test.UnitTests.WorkItems/Logging/ApplicationInsightsTelemetryInitializerTests.cs +++ b/src/Test.UnitTests.WorkItems/Logging/ApplicationInsightsTelemetryInitializerTests.cs @@ -2,9 +2,12 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; + using FluentAssertions; + using Microsoft.ApplicationInsights.DataContracts; using Microsoft.TeamFoundation; + using Xunit; namespace Microsoft.WorkItems.Logging diff --git a/src/Test.UnitTests.WorkItems/Logging/MetricsLogValuesTests.cs b/src/Test.UnitTests.WorkItems/Logging/MetricsLogValuesTests.cs index 9bd00c55b..382c4837f 100644 --- a/src/Test.UnitTests.WorkItems/Logging/MetricsLogValuesTests.cs +++ b/src/Test.UnitTests.WorkItems/Logging/MetricsLogValuesTests.cs @@ -4,10 +4,13 @@ using System; using System.Collections.Generic; using System.Linq; + using FluentAssertions; + using Microsoft.ApplicationInsights.DataContracts; using Microsoft.Extensions.Logging; using Microsoft.TeamFoundation; + using Xunit; namespace Microsoft.WorkItems.Logging diff --git a/src/Test.UnitTests.WorkItems/ServiceProviderFactoryTests.cs b/src/Test.UnitTests.WorkItems/ServiceProviderFactoryTests.cs index f11117137..11b799969 100644 --- a/src/Test.UnitTests.WorkItems/ServiceProviderFactoryTests.cs +++ b/src/Test.UnitTests.WorkItems/ServiceProviderFactoryTests.cs @@ -2,7 +2,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; + using FluentAssertions; + using Xunit; namespace Microsoft.WorkItems diff --git a/src/Test.Utilities.Sarif/AssertionExtensions.cs b/src/Test.Utilities.Sarif/AssertionExtensions.cs index 67d73dd1d..dd7fa9c61 100644 --- a/src/Test.Utilities.Sarif/AssertionExtensions.cs +++ b/src/Test.Utilities.Sarif/AssertionExtensions.cs @@ -4,9 +4,11 @@ using System; using System.Text.RegularExpressions; using System.Threading.Tasks; + using FluentAssertions; using FluentAssertions.Execution; using FluentAssertions.Primitives; + using Microsoft.CodeAnalysis.Test.Utilities.Sarif; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Test.Utilities.Sarif/FileDiffingFunctionalTests.cs b/src/Test.Utilities.Sarif/FileDiffingFunctionalTests.cs index 4039530a5..736ce4aec 100644 --- a/src/Test.Utilities.Sarif/FileDiffingFunctionalTests.cs +++ b/src/Test.Utilities.Sarif/FileDiffingFunctionalTests.cs @@ -3,6 +3,7 @@ using System; using System.IO; + using Xunit.Abstractions; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Test.Utilities.Sarif/FileDiffingUnitTests.cs b/src/Test.Utilities.Sarif/FileDiffingUnitTests.cs index 164c963f5..f33a91df4 100644 --- a/src/Test.Utilities.Sarif/FileDiffingUnitTests.cs +++ b/src/Test.Utilities.Sarif/FileDiffingUnitTests.cs @@ -8,13 +8,17 @@ using System.Linq; using System.Reflection; using System.Text; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif.Readers; using Microsoft.CodeAnalysis.Sarif.VersionOne; using Microsoft.CodeAnalysis.Sarif.Writers; + using Newtonsoft.Json; using Newtonsoft.Json.Linq; using Newtonsoft.Json.Serialization; + using Xunit.Abstractions; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Test.Utilities.Sarif/TestData.cs b/src/Test.Utilities.Sarif/TestData.cs index 955f2e1b5..6e46987d4 100644 --- a/src/Test.Utilities.Sarif/TestData.cs +++ b/src/Test.Utilities.Sarif/TestData.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; + using Microsoft.CodeAnalysis.Sarif; namespace Microsoft.CodeAnalysis.Test.Utilities.Sarif @@ -437,4 +438,4 @@ public static SarifLog CreateBaselineNew() }; } } -} \ No newline at end of file +} diff --git a/src/Test.Utilities.Sarif/TestMessageLogger.cs b/src/Test.Utilities.Sarif/TestMessageLogger.cs index 575b8c850..3bb345eb1 100644 --- a/src/Test.Utilities.Sarif/TestMessageLogger.cs +++ b/src/Test.Utilities.Sarif/TestMessageLogger.cs @@ -95,4 +95,4 @@ public void LogConfigurationNotification(Notification notification) ConfigurationNotifications.Add(notification); } } -} \ No newline at end of file +} diff --git a/src/Test.Utilities.Sarif/Utilities.cs b/src/Test.Utilities.Sarif/Utilities.cs index 6f3620f0c..761dc9ea3 100644 --- a/src/Test.Utilities.Sarif/Utilities.cs +++ b/src/Test.Utilities.Sarif/Utilities.cs @@ -9,8 +9,10 @@ using System.Text; using System.Xml; using System.Xml.Linq; + using Microsoft.CodeAnalysis.Sarif.Converters; using Microsoft.CodeAnalysis.Sarif.Writers; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/WorkItems/AzureDevOpsFilingClient.cs b/src/WorkItems/AzureDevOpsFilingClient.cs index 3c9ce1ae7..65271d8f0 100644 --- a/src/WorkItems/AzureDevOpsFilingClient.cs +++ b/src/WorkItems/AzureDevOpsFilingClient.cs @@ -6,12 +6,14 @@ using System.IO; using System.Linq; using System.Threading.Tasks; + using Microsoft.Extensions.Logging; using Microsoft.TeamFoundation.WorkItemTracking.WebApi.Models; using Microsoft.VisualStudio.Services.WebApi; using Microsoft.VisualStudio.Services.WebApi.Patch; using Microsoft.VisualStudio.Services.WebApi.Patch.Json; using Microsoft.WorkItems.Logging; + using Newtonsoft.Json; namespace Microsoft.WorkItems diff --git a/src/WorkItems/FilingClient.cs b/src/WorkItems/FilingClient.cs index de194f531..4786ee742 100644 --- a/src/WorkItems/FilingClient.cs +++ b/src/WorkItems/FilingClient.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.Threading.Tasks; + using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; @@ -13,7 +14,7 @@ namespace Microsoft.WorkItems /// Abstract base for classes that represents a system (for example, GitHub or Azure DevOps) /// to which work items can be filed. /// - public abstract class FilingClient: IDisposable + public abstract class FilingClient : IDisposable { public enum SourceControlProvider diff --git a/src/WorkItems/GitHubClientWrapper.cs b/src/WorkItems/GitHubClientWrapper.cs index 539b390b9..072ed6a34 100644 --- a/src/WorkItems/GitHubClientWrapper.cs +++ b/src/WorkItems/GitHubClientWrapper.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Threading.Tasks; + using Octokit; namespace Microsoft.WorkItems @@ -32,4 +33,4 @@ public Task UpdateWorkItemAsync( return this.gitHubClient.Issue.Update(organization, repository, issueNumber, issueUpdate); } } -} \ No newline at end of file +} diff --git a/src/WorkItems/GitHubConnectionFacade.cs b/src/WorkItems/GitHubConnectionFacade.cs index 09df40240..e64f1d898 100644 --- a/src/WorkItems/GitHubConnectionFacade.cs +++ b/src/WorkItems/GitHubConnectionFacade.cs @@ -3,9 +3,11 @@ using System; using System.Threading.Tasks; + using Microsoft.TeamFoundation.WorkItemTracking.WebApi; using Microsoft.VisualStudio.Services.Common; using Microsoft.VisualStudio.Services.WebApi; + using Octokit; using Octokit.Internal; @@ -29,4 +31,4 @@ async public Task ConnectAsync(string organization, string return gitHubClientWrapper; } } -} \ No newline at end of file +} diff --git a/src/WorkItems/GitHubFilingClient.cs b/src/WorkItems/GitHubFilingClient.cs index 64d36abf6..d82e1aae0 100644 --- a/src/WorkItems/GitHubFilingClient.cs +++ b/src/WorkItems/GitHubFilingClient.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.Threading.Tasks; + using Octokit; namespace Microsoft.WorkItems @@ -76,4 +77,4 @@ public override Task GetWorkItemMetadata(WorkItemModel workItemMo throw new NotImplementedException(); } } -} \ No newline at end of file +} diff --git a/src/WorkItems/IGitHubClientWrapper.cs b/src/WorkItems/IGitHubClientWrapper.cs index f93574314..d16e5ada6 100644 --- a/src/WorkItems/IGitHubClientWrapper.cs +++ b/src/WorkItems/IGitHubClientWrapper.cs @@ -1,9 +1,10 @@ // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using Octokit; using System.Threading.Tasks; +using Octokit; + namespace Microsoft.WorkItems { public interface IGitHubClientWrapper @@ -27,4 +28,4 @@ public Task UpdateWorkItemAsync( int issueNumber, IssueUpdate issueUpdate); } -} \ No newline at end of file +} diff --git a/src/WorkItems/IGitHubConnection.cs b/src/WorkItems/IGitHubConnection.cs index 5c45f4207..4bebb6fa1 100644 --- a/src/WorkItems/IGitHubConnection.cs +++ b/src/WorkItems/IGitHubConnection.cs @@ -1,10 +1,11 @@ // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using Octokit; using System; using System.Threading.Tasks; +using Octokit; + namespace Microsoft.WorkItems { /// @@ -20,4 +21,4 @@ internal interface IGitHubConnection /// Task ConnectAsync(string organization, string personalAccessToken); } -} \ No newline at end of file +} diff --git a/src/WorkItems/IVssConnection.cs b/src/WorkItems/IVssConnection.cs index e23a2f42f..c8091bed4 100644 --- a/src/WorkItems/IVssConnection.cs +++ b/src/WorkItems/IVssConnection.cs @@ -9,7 +9,7 @@ namespace Microsoft.WorkItems /// /// This interface allows for mocking of the low-level VssConnection class. /// - internal interface IVssConnection: IDisposable + internal interface IVssConnection : IDisposable { /// /// Provide for both the instantiation of the connection instance followed by @@ -26,4 +26,4 @@ internal interface IVssConnection: IDisposable /// Task GetClientAsync(); } -} \ No newline at end of file +} diff --git a/src/WorkItems/IWorkItemModelTransformer.cs b/src/WorkItems/IWorkItemModelTransformer.cs index a2c65678d..fd4d04691 100644 --- a/src/WorkItems/IWorkItemModelTransformer.cs +++ b/src/WorkItems/IWorkItemModelTransformer.cs @@ -7,4 +7,4 @@ public interface IWorkItemModelTransformer where T : WorkItemModel { void Transform(T workItemModel); } -} \ No newline at end of file +} diff --git a/src/WorkItems/IWorkItemTrackingHttpClient.cs b/src/WorkItems/IWorkItemTrackingHttpClient.cs index d0b263715..feafa02c7 100644 --- a/src/WorkItems/IWorkItemTrackingHttpClient.cs +++ b/src/WorkItems/IWorkItemTrackingHttpClient.cs @@ -6,6 +6,7 @@ using System.IO; using System.Threading; using System.Threading.Tasks; + using Microsoft.TeamFoundation.WorkItemTracking.WebApi.Models; using Microsoft.VisualStudio.Services.WebApi.Patch.Json; @@ -29,13 +30,13 @@ Task CreateAttachmentAsync( /// Creates a single work item. /// Task CreateWorkItemAsync( - JsonPatchDocument document, - string project, - string type, - bool? validateOnly = null, - bool? bypassRules = null, - bool? suppressNotifications = null, - object userState = null, + JsonPatchDocument document, + string project, + string type, + bool? validateOnly = null, + bool? bypassRules = null, + bool? suppressNotifications = null, + object userState = null, CancellationToken cancellationToken = default); /// @@ -65,4 +66,4 @@ Task GetWorkItemAsync( object userState = null, CancellationToken cancellationToken = default); } -} \ No newline at end of file +} diff --git a/src/WorkItems/Logging/ApplicationInsightsTelemetryInitializer.cs b/src/WorkItems/Logging/ApplicationInsightsTelemetryInitializer.cs index a8929376c..0a5e4b681 100644 --- a/src/WorkItems/Logging/ApplicationInsightsTelemetryInitializer.cs +++ b/src/WorkItems/Logging/ApplicationInsightsTelemetryInitializer.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; + using Microsoft.ApplicationInsights.Channel; using Microsoft.ApplicationInsights.Extensibility; diff --git a/src/WorkItems/Logging/AssemblyExtensions.cs b/src/WorkItems/Logging/AssemblyExtensions.cs index 2a9407671..7ffeb8c75 100644 --- a/src/WorkItems/Logging/AssemblyExtensions.cs +++ b/src/WorkItems/Logging/AssemblyExtensions.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using System.IO; using System.Reflection; + using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; diff --git a/src/WorkItems/Logging/LoggerExtensions.cs b/src/WorkItems/Logging/LoggerExtensions.cs index c276bb243..9e8df3af5 100644 --- a/src/WorkItems/Logging/LoggerExtensions.cs +++ b/src/WorkItems/Logging/LoggerExtensions.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; + using Microsoft.CodeAnalysis.WorkItems.Logging; using Microsoft.Extensions.Logging; @@ -12,19 +13,19 @@ public static class LoggerExtensions public static void LogMetrics(this ILogger logger, EventId eventId, IDictionary customDimensions) { LogMetrics( - logger, - eventId, - message: string.Empty, + logger, + eventId, + message: string.Empty, customDimensions); } public static void LogMetrics(this ILogger logger, EventId eventId, string message, IDictionary customDimensions) { logger.Log( - LogLevel.Information, - eventId, + LogLevel.Information, + eventId, new MetricsLogValues(message, eventId, customDimensions), - exception: null, + exception: null, (state, error) => state.ToString()); } diff --git a/src/WorkItems/Logging/LoggingContext.cs b/src/WorkItems/Logging/LoggingContext.cs index 6efc207b3..43b2d69af 100644 --- a/src/WorkItems/Logging/LoggingContext.cs +++ b/src/WorkItems/Logging/LoggingContext.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Text; + using Microsoft.Extensions.Logging; namespace Microsoft.CodeAnalysis.WorkItems.Logging diff --git a/src/WorkItems/Logging/MetricsLogValues.cs b/src/WorkItems/Logging/MetricsLogValues.cs index 84c1dc9cb..f515db38a 100644 --- a/src/WorkItems/Logging/MetricsLogValues.cs +++ b/src/WorkItems/Logging/MetricsLogValues.cs @@ -5,6 +5,7 @@ using System.Collections; using System.Collections.Generic; using System.Linq; + using Microsoft.Extensions.Logging; namespace Microsoft.WorkItems.Logging diff --git a/src/WorkItems/Properties/AssemblyInfo.cs b/src/WorkItems/Properties/AssemblyInfo.cs index f14fe0b91..3fd1bec8e 100644 --- a/src/WorkItems/Properties/AssemblyInfo.cs +++ b/src/WorkItems/Properties/AssemblyInfo.cs @@ -1,2 +1,2 @@ // Copyright (c) Microsoft. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. \ No newline at end of file +// Licensed under the MIT license. See LICENSE file in the project root for full license information. diff --git a/src/WorkItems/ServiceProviderFactory.cs b/src/WorkItems/ServiceProviderFactory.cs index 8984d037a..06dc29bbf 100644 --- a/src/WorkItems/ServiceProviderFactory.cs +++ b/src/WorkItems/ServiceProviderFactory.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; + using Microsoft.ApplicationInsights.Channel; using Microsoft.ApplicationInsights.Extensibility; using Microsoft.Extensions.Configuration; diff --git a/src/WorkItems/VssConnectionFacade.cs b/src/WorkItems/VssConnectionFacade.cs index 43c8b26dd..9c2ae0f6d 100644 --- a/src/WorkItems/VssConnectionFacade.cs +++ b/src/WorkItems/VssConnectionFacade.cs @@ -3,6 +3,7 @@ using System; using System.Threading.Tasks; + using Microsoft.TeamFoundation.WorkItemTracking.WebApi; using Microsoft.VisualStudio.Services.Common; using Microsoft.VisualStudio.Services.WebApi; @@ -35,4 +36,4 @@ public void Dispose() } } } -} \ No newline at end of file +} diff --git a/src/WorkItems/WorkItemTrackingHttpClientWrapper.cs b/src/WorkItems/WorkItemTrackingHttpClientWrapper.cs index 17d56e50c..7caaebe59 100644 --- a/src/WorkItems/WorkItemTrackingHttpClientWrapper.cs +++ b/src/WorkItems/WorkItemTrackingHttpClientWrapper.cs @@ -6,6 +6,7 @@ using System.IO; using System.Threading; using System.Threading.Tasks; + using Microsoft.TeamFoundation.WorkItemTracking.WebApi; using Microsoft.TeamFoundation.WorkItemTracking.WebApi.Models; using Microsoft.VisualStudio.Services.WebApi.Patch.Json; @@ -22,7 +23,7 @@ public WorkItemTrackingHttpClientWrapper(WorkItemTrackingHttpClient workItemTrac } public Task CreateAttachmentAsync( - MemoryStream stream, + MemoryStream stream, string fileName = null, string uploadType = null, string areaPath = null, @@ -33,9 +34,9 @@ public Task CreateAttachmentAsync( } public Task CreateWorkItemAsync( - JsonPatchDocument document, - string project, - string type, + JsonPatchDocument document, + string project, + string type, bool? validateOnly = null, bool? bypassRules = null, bool? suppressNotifications = null, @@ -79,4 +80,4 @@ public void Dispose() } } } -} \ No newline at end of file +} From 7b0a7c053b953525e6720c37cfc4ef67fd0c8f06 Mon Sep 17 00:00:00 2001 From: Eddy Nakamura Date: Thu, 15 Oct 2020 18:29:57 -0300 Subject: [PATCH 2/7] enforcing header --- src/.editorconfig | 5 +++++ src/Sarif.Converters/FortifyFprConverter.cs | 2 +- src/Sarif.Converters/GlobalSuppressions.cs | 5 ++++- src/Sarif.Converters/PREFastObjectModel/Defect.cs | 5 ++++- src/Sarif.Converters/PREFastObjectModel/DefectList.cs | 5 ++++- src/Sarif.Converters/PREFastObjectModel/KeyEvent.cs | 5 ++++- src/Sarif.Converters/PREFastObjectModel/PREFastPath.cs | 5 ++++- src/Sarif.Converters/PREFastObjectModel/SFA.cs | 5 ++++- src/Sarif.Driver/DriverExtensionMethods.cs | 2 +- src/Sarif.Driver/Sdk/MultifileOptionsBase.cs | 2 +- src/Sarif.Multitool.Library/Extensions.cs | 5 ++++- src/Sarif.Multitool/Properties/AssemblyInfo.cs | 3 ++- src/Sarif/Baseline/V2/ResultMatchingComparer.cs | 4 ++-- src/Sarif/Baseline/V2/TrustMap.cs | 4 ++-- src/Sarif/Baseline/V2/V2ResultMatcher.cs | 4 ++-- src/Sarif/Baseline/V2/WhatComparer.cs | 4 ++-- src/Sarif/Baseline/V2/WhatComponent.cs | 4 ++-- src/Sarif/Baseline/V2/WhatMap.cs | 4 ++-- src/Sarif/Baseline/V2/WhereComparer.cs | 4 ++-- src/Sarif/Core/Artifact.cs | 2 +- src/Sarif/Core/ArtifactLocation.cs | 2 +- src/Sarif/Core/CodeFlow.cs | 2 +- src/Sarif/Core/ExceptionData.cs | 2 +- src/Sarif/Core/IPropertyBagHolder.cs | 2 +- src/Sarif/Core/Invocation.cs | 2 +- src/Sarif/Core/Location.cs | 2 +- src/Sarif/Core/LogicalLocation.cs | 2 +- src/Sarif/Core/Message.cs | 2 +- src/Sarif/Core/MultiformatMessageString.cs | 2 +- src/Sarif/Core/Notification.cs | 2 +- src/Sarif/Core/PropertyBagHolder.cs | 2 +- src/Sarif/Core/Region.cs | 2 +- src/Sarif/Core/ReportingConfiguration.cs | 2 +- src/Sarif/Core/ReportingDescriptor.cs | 2 +- src/Sarif/Core/Result.cs | 2 +- src/Sarif/Core/Run.cs | 2 +- src/Sarif/Core/SarifLog.cs | 5 ++++- src/Sarif/Core/SerializedPropertyInfoEqualityComparer.cs | 2 +- src/Sarif/Core/Stack.cs | 2 +- src/Sarif/Core/StackFrame.cs | 2 +- src/Sarif/Core/Tags.cs | 2 +- src/Sarif/Core/ThreadFlow.cs | 2 +- src/Sarif/Core/ThreadflowLocation.cs | 2 +- src/Sarif/Core/Tool.cs | 2 +- src/Sarif/Core/ToolComponent.cs | 2 +- src/Sarif/Core/ToolComponentReference.cs | 2 +- src/Sarif/Core/WebMessageUtilities.cs | 2 +- src/Sarif/Core/WebRequest.cs | 2 +- src/Sarif/Core/WebResponse.cs | 2 +- src/Sarif/ExtensionMethods.cs | 2 +- src/Sarif/GlobalSuppressions.cs | 3 +++ src/Sarif/IAnalysisContext.cs | 2 +- src/Sarif/Map/JsonMapBuilder.cs | 4 ++-- src/Sarif/Map/JsonMapNode.cs | 4 ++-- src/Sarif/Map/JsonMapSettings.cs | 4 ++-- src/Sarif/Map/LongArrayDeltaConverter.cs | 4 ++-- src/Sarif/Processors/Log/SarifLogActionTuple.cs | 4 ++-- src/Sarif/Processors/Log/SarifLogActions.cs | 4 ++-- src/Sarif/Processors/Log/SarifLogExtensionMethods.cs | 4 ++-- src/Sarif/Processors/Log/SarifLogPipeline.cs | 4 ++-- src/Sarif/Processors/Log/SarifLogStageFactory.cs | 4 ++-- src/Sarif/Query/BitArrayExtensions.cs | 4 ++-- src/Sarif/Query/CompareOperator.cs | 4 ++-- src/Sarif/Query/Evaluators/BoolEvaluator.cs | 4 ++-- src/Sarif/Query/Evaluators/DoubleEvaluator.cs | 4 ++-- src/Sarif/Query/Evaluators/EnumEvaluator.cs | 4 ++-- src/Sarif/Query/Evaluators/EvaluatorFactory.cs | 5 ++++- src/Sarif/Query/Evaluators/ExpressionEvaluators.cs | 4 ++-- src/Sarif/Query/Evaluators/IExpressionEvaluator.cs | 4 ++-- src/Sarif/Query/Evaluators/LongEvaluator.cs | 4 ++-- src/Sarif/Query/Evaluators/ResultEvaluators.cs | 4 ++-- src/Sarif/Query/Evaluators/SetEvaluator.cs | 4 ++-- src/Sarif/Query/Evaluators/StringEvaluator.cs | 4 ++-- src/Sarif/Query/ExpressionParser.cs | 4 ++-- src/Sarif/Query/Expressions.cs | 4 ++-- src/Sarif/Query/IExpression.cs | 4 ++-- src/Sarif/Query/QueryParseException.cs | 4 ++-- src/Sarif/Query/StringSlice.cs | 4 ++-- src/Sarif/Readers/DeferredList.cs | 4 ++-- src/Sarif/Readers/LineMappingStreamReader.cs | 4 ++-- src/Sarif/Readers/OverflowCorrector.cs | 4 ++-- src/Sarif/Readers/PropertyBagConverter.cs | 4 ++-- src/Sarif/Readers/SerializedPropertyInfoConverter.cs | 4 ++-- .../VersionOne/Autogenerated/AlgorithmKindVersionOne.cs | 2 +- .../AnnotatedCodeLocationImportanceVersionOne.cs | 2 +- .../Autogenerated/AnnotatedCodeLocationKindVersionOne.cs | 2 +- .../Autogenerated/AnnotatedCodeLocationVersionOne.cs | 2 +- .../AnnotatedCodeLocationVersionOneEqualityComparer.cs | 2 +- src/Sarif/VersionOne/Autogenerated/AnnotationVersionOne.cs | 2 +- .../Autogenerated/AnnotationVersionOneEqualityComparer.cs | 2 +- .../VersionOne/Autogenerated/BaselineStateVersionOne.cs | 2 +- src/Sarif/VersionOne/Autogenerated/CodeFlowVersionOne.cs | 2 +- .../Autogenerated/CodeFlowVersionOneEqualityComparer.cs | 2 +- .../VersionOne/Autogenerated/ExceptionDataVersionOne.cs | 2 +- .../Autogenerated/ExceptionDataVersionOneEqualityComparer.cs | 2 +- src/Sarif/VersionOne/Autogenerated/FileChangeVersionOne.cs | 2 +- .../Autogenerated/FileChangeVersionOneEqualityComparer.cs | 2 +- src/Sarif/VersionOne/Autogenerated/FileDataVersionOne.cs | 2 +- .../Autogenerated/FileDataVersionOneEqualityComparer.cs | 2 +- src/Sarif/VersionOne/Autogenerated/FixVersionOne.cs | 2 +- .../Autogenerated/FixVersionOneEqualityComparer.cs | 2 +- .../Autogenerated/FormattedRuleMessageVersionOne.cs | 2 +- .../FormattedRuleMessageVersionOneEqualityComparer.cs | 2 +- src/Sarif/VersionOne/Autogenerated/HashVersionOne.cs | 2 +- .../Autogenerated/HashVersionOneEqualityComparer.cs | 2 +- .../VersionOne/Autogenerated/IRuleVersionOneVersionOne.cs | 2 +- .../Autogenerated/ISarifNodeVersionOneVersionOne.cs | 2 +- src/Sarif/VersionOne/Autogenerated/InvocationVersionOne.cs | 2 +- .../Autogenerated/InvocationVersionOneEqualityComparer.cs | 2 +- src/Sarif/VersionOne/Autogenerated/LocationVersionOne.cs | 2 +- .../Autogenerated/LocationVersionOneEqualityComparer.cs | 2 +- .../VersionOne/Autogenerated/LogicalLocationVersionOne.cs | 2 +- .../LogicalLocationVersionOneEqualityComparer.cs | 2 +- .../VersionOne/Autogenerated/NotificationLevelVersionOne.cs | 2 +- src/Sarif/VersionOne/Autogenerated/NotificationVersionOne.cs | 2 +- .../Autogenerated/NotificationVersionOneEqualityComparer.cs | 2 +- .../VersionOne/Autogenerated/PhysicalLocationVersionOne.cs | 2 +- .../PhysicalLocationVersionOneEqualityComparer.cs | 2 +- src/Sarif/VersionOne/Autogenerated/RegionVersionOne.cs | 2 +- .../Autogenerated/RegionVersionOneEqualityComparer.cs | 2 +- src/Sarif/VersionOne/Autogenerated/ReplacementVersionOne.cs | 2 +- .../Autogenerated/ReplacementVersionOneEqualityComparer.cs | 2 +- src/Sarif/VersionOne/Autogenerated/ResultLevelVersionOne.cs | 2 +- src/Sarif/VersionOne/Autogenerated/ResultVersionOne.cs | 2 +- .../Autogenerated/ResultVersionOneEqualityComparer.cs | 2 +- .../VersionOne/Autogenerated/RuleConfigurationVersionOne.cs | 2 +- src/Sarif/VersionOne/Autogenerated/RuleVersionOne.cs | 2 +- .../Autogenerated/RuleVersionOneEqualityComparer.cs | 2 +- src/Sarif/VersionOne/Autogenerated/RunVersionOne.cs | 2 +- .../Autogenerated/RunVersionOneEqualityComparer.cs | 2 +- src/Sarif/VersionOne/Autogenerated/SarifLogVersionOne.cs | 2 +- .../Autogenerated/SarifLogVersionOneEqualityComparer.cs | 2 +- .../Autogenerated/SarifNodeKindVersionOneVersionOne.cs | 2 +- .../Autogenerated/SarifRewritingVisitorVersionOne.cs | 2 +- src/Sarif/VersionOne/Autogenerated/SarifVersionVersionOne.cs | 2 +- src/Sarif/VersionOne/Autogenerated/StackFrameVersionOne.cs | 2 +- .../Autogenerated/StackFrameVersionOneEqualityComparer.cs | 2 +- src/Sarif/VersionOne/Autogenerated/StackVersionOne.cs | 2 +- .../Autogenerated/StackVersionOneEqualityComparer.cs | 2 +- .../VersionOne/Autogenerated/SuppressionStatesVersionOne.cs | 2 +- src/Sarif/VersionOne/Autogenerated/TaintKindVersionOne.cs | 2 +- src/Sarif/VersionOne/Autogenerated/ToolVersionOne.cs | 2 +- .../Autogenerated/ToolVersionOneEqualityComparer.cs | 2 +- src/Sarif/VersionOne/Core/IPropertyBagHolderVersionOne.cs | 2 +- src/Sarif/VersionOne/Core/IRuleVersionOne.cs | 2 +- src/Sarif/VersionOne/Core/PropertyBagHolderVersionOne.cs | 2 +- src/Sarif/VersionOne/Core/TagsCollectionVersionOne.cs | 2 +- src/Sarif/Visitors/AddFileReferencesVisitor.cs | 3 ++- src/Sarif/Visitors/ExtractAllArtifactLocationsVisitor.cs | 4 ++-- src/Sarif/Visitors/RebaseUriVisitor.cs | 4 ++-- src/Sarif/Visitors/SarifTransformerUtilities.cs | 2 +- ...rsionOneLogicalLocationKeyToLogicalLocationDataVisitor.cs | 4 ++-- src/Sarif/Writers/RegionComponents.cs | 4 ++-- src/Sarif/Writers/SarifConsolidator.cs | 4 ++-- src/Shared/CommonAssemblyInfo.cs | 2 +- src/Test.EndToEnd.Baselining/BaseliningDetailEnricher.cs | 4 ++-- src/Test.EndToEnd.Baselining/BaseliningDetailLogger.cs | 4 ++-- src/Test.EndToEnd.Baselining/BaseliningSummary.cs | 4 ++-- src/Test.EndToEnd.Baselining/BaseliningTester.cs | 4 ++-- .../Extensions/ArtifactUriEnumeration.cs | 4 ++-- .../Extensions/DirectResultMatchingComparer.cs | 4 ++-- .../Extensions/IEnumerableStringExtensions.cs | 4 ++-- src/Test.EndToEnd.Baselining/Extensions/ResultEnumeration.cs | 4 ++-- .../Extensions/ResultTextFormatter.cs | 4 ++-- .../Extensions/SarifLogExtensions.cs | 4 ++-- src/Test.EndToEnd.Baselining/Options/DebugOptions.cs | 4 ++-- src/Test.EndToEnd.Baselining/Options/OptionsBase.cs | 4 ++-- .../Options/RebuildDebugLogsOptions.cs | 4 ++-- src/Test.EndToEnd.Baselining/Options/RunOptions.cs | 4 ++-- src/Test.EndToEnd.Baselining/Program.cs | 4 ++-- src/Test.FunctionalTests.Sarif/SarifConverterTests.cs | 4 ++-- .../SarifLogEqualityComparerTests.cs | 2 +- src/Test.UnitTests.Sarif/Core/FileLocationTests.cs | 2 +- src/Test.UnitTests.Sarif/Core/InvocationTests.cs | 5 ++++- src/Test.UnitTests.Sarif/Core/LocationTests.cs | 5 ++++- src/Test.UnitTests.Sarif/Core/PropertyBagHolderTests.cs | 2 +- src/Test.UnitTests.Sarif/Core/RegionTests.cs | 2 +- src/Test.UnitTests.Sarif/Core/ResultTests.cs | 2 +- src/Test.UnitTests.Sarif/Core/RunTests.cs | 2 +- src/Test.UnitTests.Sarif/Core/StackTests.cs | 2 +- src/Test.UnitTests.Sarif/Core/TagsTests.cs | 2 +- src/Test.UnitTests.Sarif/Core/WebMessageUtilitiesTests.cs | 2 +- src/Test.UnitTests.Sarif/Core/WebRequestTests.cs | 2 +- src/Test.UnitTests.Sarif/Core/WebResponseTests.cs | 2 +- src/Test.UnitTests.Sarif/Map/JsonMapBuilderTests.cs | 4 ++-- src/Test.UnitTests.Sarif/Map/LongArrayDeltaConverterTests.cs | 4 ++-- .../Processors/GenericTests/GenericProcessorTests.cs | 5 +++-- .../Processors/GenericTests/TestFoldProcessor.cs | 5 +++-- .../Processors/Log/RebaseUriStageTests.cs | 4 ++-- .../Processors/Log/SarifLogExtensionTests.cs | 5 ++++- src/Test.UnitTests.Sarif/Query/EvaluatorTests.cs | 5 ++++- src/Test.UnitTests.Sarif/Query/ExpressionParserTests.cs | 5 ++++- src/Test.UnitTests.Sarif/Query/StringSliceTests.cs | 5 ++++- .../Readers/PropertyBagConverterTests.cs | 2 +- src/Test.UnitTests.Sarif/RoundTrippingTests.cs | 4 ++-- .../Visitors/InsertOptionalDataVisitorTests.cs | 4 ++-- src/Test.UnitTests.Sarif/Visitors/RebaseUriVisitorTests.cs | 4 ++-- .../Visitors/RemoveOptionalDataVisitorTests.cs | 4 ++-- .../Visitors/SarifCurrentToVersionOneVisitorTests.cs | 4 ++-- .../Visitors/SarifVersionOneToCurrentVisitorTests.cs | 4 ++-- .../Writers/PrereleaseCompatibilityTransformerTests.cs | 4 ++-- .../DeletesOutputsDirectoryOnClassInitializationFixture.cs | 4 ++-- src/Test.Utilities.Sarif/FileDiffingFunctionalTests.cs | 4 ++-- src/Test.Utilities.Sarif/FileDiffingUnitTests.cs | 4 ++-- src/Test.Utilities.Sarif/ResourceExtractor.cs | 4 ++-- src/Test.Utilities.Sarif/TestData.cs | 2 +- src/Test.Utilities.Sarif/TestTraits.cs | 4 ++-- src/WorkItems/Logging/LoggingContext.cs | 5 ++++- 208 files changed, 341 insertions(+), 281 deletions(-) diff --git a/src/.editorconfig b/src/.editorconfig index 5f8e22132..e95d59ec5 100644 --- a/src/.editorconfig +++ b/src/.editorconfig @@ -203,3 +203,8 @@ dotnet_diagnostic.CS1574.severity = silent dotnet_diagnostic.CS1591.severity = silent dotnet_diagnostic.CS1712.severity = silent dotnet_diagnostic.CS1734.severity = silent + +file_header_template = Copyright (c) Microsoft. All rights reserved.\nLicensed under the MIT license. See LICENSE file in the project root for full license information. + +[Autogenerated/**] +file_header_template = unset diff --git a/src/Sarif.Converters/FortifyFprConverter.cs b/src/Sarif.Converters/FortifyFprConverter.cs index ab9b7baa5..6c6df9527 100644 --- a/src/Sarif.Converters/FortifyFprConverter.cs +++ b/src/Sarif.Converters/FortifyFprConverter.cs @@ -1,4 +1,4 @@ -// Copyright (c) Micro soft. All rights reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; diff --git a/src/Sarif.Converters/GlobalSuppressions.cs b/src/Sarif.Converters/GlobalSuppressions.cs index 8d9d96d49..0143fc3de 100644 --- a/src/Sarif.Converters/GlobalSuppressions.cs +++ b/src/Sarif.Converters/GlobalSuppressions.cs @@ -1,4 +1,7 @@ -using System.Diagnostics.CodeAnalysis; +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System.Diagnostics.CodeAnalysis; [module: SuppressMessage("Microsoft.Security.Xml", "CA3053:UseXmlSecureResolver", Scope = "member", Target = "Microsoft.CodeAnalysis.Sarif.Converters.AndroidStudioConverter.#Convert(System.IO.Stream,Microsoft.CodeAnalysis.Sarif.IResultLogWriter,Microsoft.CodeAnalysis.Sarif.Writers.LoggingOptions)")] [module: SuppressMessage("Microsoft.Security.Xml", "CA3053:UseXmlSecureResolver", Scope = "member", Target = "Microsoft.CodeAnalysis.Sarif.Converters.ClangAnalyzerConverter.#Convert(System.IO.Stream,Microsoft.CodeAnalysis.Sarif.IResultLogWriter,Microsoft.CodeAnalysis.Sarif.Writers.LoggingOptions)")] diff --git a/src/Sarif.Converters/PREFastObjectModel/Defect.cs b/src/Sarif.Converters/PREFastObjectModel/Defect.cs index 3c68d54c0..9e2d86626 100644 --- a/src/Sarif.Converters/PREFastObjectModel/Defect.cs +++ b/src/Sarif.Converters/PREFastObjectModel/Defect.cs @@ -1,4 +1,7 @@ -using System.Xml.Serialization; +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System.Xml.Serialization; namespace Microsoft.CodeAnalysis.Sarif.Converters.PREFastObjectModel { diff --git a/src/Sarif.Converters/PREFastObjectModel/DefectList.cs b/src/Sarif.Converters/PREFastObjectModel/DefectList.cs index aef23dcce..bdd33ea99 100644 --- a/src/Sarif.Converters/PREFastObjectModel/DefectList.cs +++ b/src/Sarif.Converters/PREFastObjectModel/DefectList.cs @@ -1,4 +1,7 @@ -using System.Collections.Generic; +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System.Collections.Generic; using System.Xml.Serialization; namespace Microsoft.CodeAnalysis.Sarif.Converters.PREFastObjectModel diff --git a/src/Sarif.Converters/PREFastObjectModel/KeyEvent.cs b/src/Sarif.Converters/PREFastObjectModel/KeyEvent.cs index 78a1f8d26..1e11f95ef 100644 --- a/src/Sarif.Converters/PREFastObjectModel/KeyEvent.cs +++ b/src/Sarif.Converters/PREFastObjectModel/KeyEvent.cs @@ -1,4 +1,7 @@ -using System.Xml.Serialization; +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System.Xml.Serialization; namespace Microsoft.CodeAnalysis.Sarif.Converters.PREFastObjectModel { diff --git a/src/Sarif.Converters/PREFastObjectModel/PREFastPath.cs b/src/Sarif.Converters/PREFastObjectModel/PREFastPath.cs index a05a71485..97350da3e 100644 --- a/src/Sarif.Converters/PREFastObjectModel/PREFastPath.cs +++ b/src/Sarif.Converters/PREFastObjectModel/PREFastPath.cs @@ -1,4 +1,7 @@ -using System.Collections.Generic; +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System.Collections.Generic; using System.Xml.Serialization; namespace Microsoft.CodeAnalysis.Sarif.Converters.PREFastObjectModel diff --git a/src/Sarif.Converters/PREFastObjectModel/SFA.cs b/src/Sarif.Converters/PREFastObjectModel/SFA.cs index cee2f09a4..62a4db921 100644 --- a/src/Sarif.Converters/PREFastObjectModel/SFA.cs +++ b/src/Sarif.Converters/PREFastObjectModel/SFA.cs @@ -1,4 +1,7 @@ -using System.Xml.Serialization; +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System.Xml.Serialization; namespace Microsoft.CodeAnalysis.Sarif.Converters.PREFastObjectModel { diff --git a/src/Sarif.Driver/DriverExtensionMethods.cs b/src/Sarif.Driver/DriverExtensionMethods.cs index b394a122b..bad0b51f3 100644 --- a/src/Sarif.Driver/DriverExtensionMethods.cs +++ b/src/Sarif.Driver/DriverExtensionMethods.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information.using System; +// Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Globalization; diff --git a/src/Sarif.Driver/Sdk/MultifileOptionsBase.cs b/src/Sarif.Driver/Sdk/MultifileOptionsBase.cs index fb0535317..ba97e6622 100644 --- a/src/Sarif.Driver/Sdk/MultifileOptionsBase.cs +++ b/src/Sarif.Driver/Sdk/MultifileOptionsBase.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information.using System; +// Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; diff --git a/src/Sarif.Multitool.Library/Extensions.cs b/src/Sarif.Multitool.Library/Extensions.cs index 190b82dfc..8b68e62be 100644 --- a/src/Sarif.Multitool.Library/Extensions.cs +++ b/src/Sarif.Multitool.Library/Extensions.cs @@ -1,4 +1,7 @@ -using System; +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System; namespace Microsoft.CodeAnalysis.Sarif.Multitool { diff --git a/src/Sarif.Multitool/Properties/AssemblyInfo.cs b/src/Sarif.Multitool/Properties/AssemblyInfo.cs index 511783788..03632c3bd 100644 --- a/src/Sarif.Multitool/Properties/AssemblyInfo.cs +++ b/src/Sarif.Multitool/Properties/AssemblyInfo.cs @@ -1,2 +1,3 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. + diff --git a/src/Sarif/Baseline/V2/ResultMatchingComparer.cs b/src/Sarif/Baseline/V2/ResultMatchingComparer.cs index d94749bca..1d09f4200 100644 --- a/src/Sarif/Baseline/V2/ResultMatchingComparer.cs +++ b/src/Sarif/Baseline/V2/ResultMatchingComparer.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; diff --git a/src/Sarif/Baseline/V2/TrustMap.cs b/src/Sarif/Baseline/V2/TrustMap.cs index cb083adad..e0f2406f1 100644 --- a/src/Sarif/Baseline/V2/TrustMap.cs +++ b/src/Sarif/Baseline/V2/TrustMap.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Collections.Generic; diff --git a/src/Sarif/Baseline/V2/V2ResultMatcher.cs b/src/Sarif/Baseline/V2/V2ResultMatcher.cs index e97cddb36..5e7da706f 100644 --- a/src/Sarif/Baseline/V2/V2ResultMatcher.cs +++ b/src/Sarif/Baseline/V2/V2ResultMatcher.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Collections.Generic; diff --git a/src/Sarif/Baseline/V2/WhatComparer.cs b/src/Sarif/Baseline/V2/WhatComparer.cs index 4daed909d..f791dbc16 100644 --- a/src/Sarif/Baseline/V2/WhatComparer.cs +++ b/src/Sarif/Baseline/V2/WhatComparer.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; using System.Globalization; diff --git a/src/Sarif/Baseline/V2/WhatComponent.cs b/src/Sarif/Baseline/V2/WhatComponent.cs index d9f37cc63..9f28c47cd 100644 --- a/src/Sarif/Baseline/V2/WhatComponent.cs +++ b/src/Sarif/Baseline/V2/WhatComponent.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; diff --git a/src/Sarif/Baseline/V2/WhatMap.cs b/src/Sarif/Baseline/V2/WhatMap.cs index 81b1417f3..24d5b982b 100644 --- a/src/Sarif/Baseline/V2/WhatMap.cs +++ b/src/Sarif/Baseline/V2/WhatMap.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Collections.Generic; diff --git a/src/Sarif/Baseline/V2/WhereComparer.cs b/src/Sarif/Baseline/V2/WhereComparer.cs index 3abf6cb45..a8cc1546f 100644 --- a/src/Sarif/Baseline/V2/WhereComparer.cs +++ b/src/Sarif/Baseline/V2/WhereComparer.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Collections.Generic; diff --git a/src/Sarif/Core/Artifact.cs b/src/Sarif/Core/Artifact.cs index df9bc0ba7..c33b0e188 100644 --- a/src/Sarif/Core/Artifact.cs +++ b/src/Sarif/Core/Artifact.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; diff --git a/src/Sarif/Core/ArtifactLocation.cs b/src/Sarif/Core/ArtifactLocation.cs index 7f4489e49..0088afe2a 100644 --- a/src/Sarif/Core/ArtifactLocation.cs +++ b/src/Sarif/Core/ArtifactLocation.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; diff --git a/src/Sarif/Core/CodeFlow.cs b/src/Sarif/Core/CodeFlow.cs index e64bf5b77..7229f60ee 100644 --- a/src/Sarif/Core/CodeFlow.cs +++ b/src/Sarif/Core/CodeFlow.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Sarif/Core/ExceptionData.cs b/src/Sarif/Core/ExceptionData.cs index 43963bc15..820510b64 100644 --- a/src/Sarif/Core/ExceptionData.cs +++ b/src/Sarif/Core/ExceptionData.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; diff --git a/src/Sarif/Core/IPropertyBagHolder.cs b/src/Sarif/Core/IPropertyBagHolder.cs index 471396af5..d7bba6147 100644 --- a/src/Sarif/Core/IPropertyBagHolder.cs +++ b/src/Sarif/Core/IPropertyBagHolder.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; diff --git a/src/Sarif/Core/Invocation.cs b/src/Sarif/Core/Invocation.cs index 0a2d36eec..a2d30e4e5 100644 --- a/src/Sarif/Core/Invocation.cs +++ b/src/Sarif/Core/Invocation.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; diff --git a/src/Sarif/Core/Location.cs b/src/Sarif/Core/Location.cs index 9a4e56f15..0e41f449b 100644 --- a/src/Sarif/Core/Location.cs +++ b/src/Sarif/Core/Location.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; diff --git a/src/Sarif/Core/LogicalLocation.cs b/src/Sarif/Core/LogicalLocation.cs index dbab67181..f71662b96 100644 --- a/src/Sarif/Core/LogicalLocation.cs +++ b/src/Sarif/Core/LogicalLocation.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Sarif/Core/Message.cs b/src/Sarif/Core/Message.cs index c8c1bdcb4..ecc09ef13 100644 --- a/src/Sarif/Core/Message.cs +++ b/src/Sarif/Core/Message.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Sarif/Core/MultiformatMessageString.cs b/src/Sarif/Core/MultiformatMessageString.cs index af17abf76..9adec9f8b 100644 --- a/src/Sarif/Core/MultiformatMessageString.cs +++ b/src/Sarif/Core/MultiformatMessageString.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Sarif/Core/Notification.cs b/src/Sarif/Core/Notification.cs index 1d0d2e918..e6602128f 100644 --- a/src/Sarif/Core/Notification.cs +++ b/src/Sarif/Core/Notification.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Sarif/Core/PropertyBagHolder.cs b/src/Sarif/Core/PropertyBagHolder.cs index 085bf0369..2ff328b9d 100644 --- a/src/Sarif/Core/PropertyBagHolder.cs +++ b/src/Sarif/Core/PropertyBagHolder.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; diff --git a/src/Sarif/Core/Region.cs b/src/Sarif/Core/Region.cs index 744eb9c76..d2a19a5bb 100644 --- a/src/Sarif/Core/Region.cs +++ b/src/Sarif/Core/Region.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; diff --git a/src/Sarif/Core/ReportingConfiguration.cs b/src/Sarif/Core/ReportingConfiguration.cs index 5cf1894c2..52aafebb1 100644 --- a/src/Sarif/Core/ReportingConfiguration.cs +++ b/src/Sarif/Core/ReportingConfiguration.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Sarif/Core/ReportingDescriptor.cs b/src/Sarif/Core/ReportingDescriptor.cs index a0081c10d..7f998b742 100644 --- a/src/Sarif/Core/ReportingDescriptor.cs +++ b/src/Sarif/Core/ReportingDescriptor.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; diff --git a/src/Sarif/Core/Result.cs b/src/Sarif/Core/Result.cs index f7361764b..50469694f 100644 --- a/src/Sarif/Core/Result.cs +++ b/src/Sarif/Core/Result.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; diff --git a/src/Sarif/Core/Run.cs b/src/Sarif/Core/Run.cs index 9e65a461f..0eff80a93 100644 --- a/src/Sarif/Core/Run.cs +++ b/src/Sarif/Core/Run.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; diff --git a/src/Sarif/Core/SarifLog.cs b/src/Sarif/Core/SarifLog.cs index a6516b5ef..c17a98a29 100644 --- a/src/Sarif/Core/SarifLog.cs +++ b/src/Sarif/Core/SarifLog.cs @@ -1,4 +1,7 @@ -using System.IO; +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System.IO; using Microsoft.CodeAnalysis.Sarif.Readers; diff --git a/src/Sarif/Core/SerializedPropertyInfoEqualityComparer.cs b/src/Sarif/Core/SerializedPropertyInfoEqualityComparer.cs index e39b7b7ed..c9bfbcb59 100644 --- a/src/Sarif/Core/SerializedPropertyInfoEqualityComparer.cs +++ b/src/Sarif/Core/SerializedPropertyInfoEqualityComparer.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; diff --git a/src/Sarif/Core/Stack.cs b/src/Sarif/Core/Stack.cs index 2bbaf77be..6c3a50586 100644 --- a/src/Sarif/Core/Stack.cs +++ b/src/Sarif/Core/Stack.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; diff --git a/src/Sarif/Core/StackFrame.cs b/src/Sarif/Core/StackFrame.cs index 42c2827e7..834f6c406 100644 --- a/src/Sarif/Core/StackFrame.cs +++ b/src/Sarif/Core/StackFrame.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; diff --git a/src/Sarif/Core/Tags.cs b/src/Sarif/Core/Tags.cs index 5e0b203e6..2e2f17334 100644 --- a/src/Sarif/Core/Tags.cs +++ b/src/Sarif/Core/Tags.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; diff --git a/src/Sarif/Core/ThreadFlow.cs b/src/Sarif/Core/ThreadFlow.cs index 7e1ea9ee5..012e54942 100644 --- a/src/Sarif/Core/ThreadFlow.cs +++ b/src/Sarif/Core/ThreadFlow.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Sarif/Core/ThreadflowLocation.cs b/src/Sarif/Core/ThreadflowLocation.cs index 57a234531..a0fd22d76 100644 --- a/src/Sarif/Core/ThreadflowLocation.cs +++ b/src/Sarif/Core/ThreadflowLocation.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Sarif/Core/Tool.cs b/src/Sarif/Core/Tool.cs index dbc070309..ee5c5b175 100644 --- a/src/Sarif/Core/Tool.cs +++ b/src/Sarif/Core/Tool.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; diff --git a/src/Sarif/Core/ToolComponent.cs b/src/Sarif/Core/ToolComponent.cs index fea003fd0..c8a9b2ce4 100644 --- a/src/Sarif/Core/ToolComponent.cs +++ b/src/Sarif/Core/ToolComponent.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; diff --git a/src/Sarif/Core/ToolComponentReference.cs b/src/Sarif/Core/ToolComponentReference.cs index 564e5676b..f51cf3b4c 100644 --- a/src/Sarif/Core/ToolComponentReference.cs +++ b/src/Sarif/Core/ToolComponentReference.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Sarif/Core/WebMessageUtilities.cs b/src/Sarif/Core/WebMessageUtilities.cs index 9cfd0dd35..efb835979 100644 --- a/src/Sarif/Core/WebMessageUtilities.cs +++ b/src/Sarif/Core/WebMessageUtilities.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; diff --git a/src/Sarif/Core/WebRequest.cs b/src/Sarif/Core/WebRequest.cs index 86f3c0fdb..649103400 100644 --- a/src/Sarif/Core/WebRequest.cs +++ b/src/Sarif/Core/WebRequest.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; diff --git a/src/Sarif/Core/WebResponse.cs b/src/Sarif/Core/WebResponse.cs index 1874b0ad4..7ae64fd37 100644 --- a/src/Sarif/Core/WebResponse.cs +++ b/src/Sarif/Core/WebResponse.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; diff --git a/src/Sarif/ExtensionMethods.cs b/src/Sarif/ExtensionMethods.cs index cee132f46..f70bbac5d 100644 --- a/src/Sarif/ExtensionMethods.cs +++ b/src/Sarif/ExtensionMethods.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information.using System; +// Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Collections; diff --git a/src/Sarif/GlobalSuppressions.cs b/src/Sarif/GlobalSuppressions.cs index e5bcc21a4..5521cd7a4 100644 --- a/src/Sarif/GlobalSuppressions.cs +++ b/src/Sarif/GlobalSuppressions.cs @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + using System.Diagnostics.CodeAnalysis; [module: SuppressMessage("Microsoft.Security.Xml", "CA3053:UseXmlSecureResolver", Scope = "member", Target = "Microsoft.CodeAnalysis.Sarif.PropertiesDictionary.#LoadFromXml(System.IO.Stream)")] diff --git a/src/Sarif/IAnalysisContext.cs b/src/Sarif/IAnalysisContext.cs index 381f1785b..5e7c96c44 100644 --- a/src/Sarif/IAnalysisContext.cs +++ b/src/Sarif/IAnalysisContext.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information.using System; +// Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; diff --git a/src/Sarif/Map/JsonMapBuilder.cs b/src/Sarif/Map/JsonMapBuilder.cs index a9ab3a3d5..e7ce763e5 100644 --- a/src/Sarif/Map/JsonMapBuilder.cs +++ b/src/Sarif/Map/JsonMapBuilder.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Collections.Generic; diff --git a/src/Sarif/Map/JsonMapNode.cs b/src/Sarif/Map/JsonMapNode.cs index edbe7e42a..fb4e37b31 100644 --- a/src/Sarif/Map/JsonMapNode.cs +++ b/src/Sarif/Map/JsonMapNode.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Collections.Generic; diff --git a/src/Sarif/Map/JsonMapSettings.cs b/src/Sarif/Map/JsonMapSettings.cs index b8456a9fc..59eabb0d3 100644 --- a/src/Sarif/Map/JsonMapSettings.cs +++ b/src/Sarif/Map/JsonMapSettings.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; diff --git a/src/Sarif/Map/LongArrayDeltaConverter.cs b/src/Sarif/Map/LongArrayDeltaConverter.cs index 1d3864080..0089cb0c7 100644 --- a/src/Sarif/Map/LongArrayDeltaConverter.cs +++ b/src/Sarif/Map/LongArrayDeltaConverter.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Collections.Generic; diff --git a/src/Sarif/Processors/Log/SarifLogActionTuple.cs b/src/Sarif/Processors/Log/SarifLogActionTuple.cs index 841b4822e..3cf1f5583 100644 --- a/src/Sarif/Processors/Log/SarifLogActionTuple.cs +++ b/src/Sarif/Processors/Log/SarifLogActionTuple.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft. All rights reserved. Licensed under the MIT -// license. See LICENSE file in the project root for full license information. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; diff --git a/src/Sarif/Processors/Log/SarifLogActions.cs b/src/Sarif/Processors/Log/SarifLogActions.cs index 3bbf26bd0..77659e32b 100644 --- a/src/Sarif/Processors/Log/SarifLogActions.cs +++ b/src/Sarif/Processors/Log/SarifLogActions.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft. All rights reserved. Licensed under the MIT -// license. See LICENSE file in the project root for full license information. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. namespace Microsoft.CodeAnalysis.Sarif.Processors { diff --git a/src/Sarif/Processors/Log/SarifLogExtensionMethods.cs b/src/Sarif/Processors/Log/SarifLogExtensionMethods.cs index c5da0412f..f924291ed 100644 --- a/src/Sarif/Processors/Log/SarifLogExtensionMethods.cs +++ b/src/Sarif/Processors/Log/SarifLogExtensionMethods.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft. All rights reserved. Licensed under the MIT -// license. See LICENSE file in the project root for full license information. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Collections.Generic; diff --git a/src/Sarif/Processors/Log/SarifLogPipeline.cs b/src/Sarif/Processors/Log/SarifLogPipeline.cs index 0ec7bb986..94fb90c6b 100644 --- a/src/Sarif/Processors/Log/SarifLogPipeline.cs +++ b/src/Sarif/Processors/Log/SarifLogPipeline.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft. All rights reserved. Licensed under the MIT -// license. See LICENSE file in the project root for full license information. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Collections.Generic; diff --git a/src/Sarif/Processors/Log/SarifLogStageFactory.cs b/src/Sarif/Processors/Log/SarifLogStageFactory.cs index c5188a211..a887873a3 100644 --- a/src/Sarif/Processors/Log/SarifLogStageFactory.cs +++ b/src/Sarif/Processors/Log/SarifLogStageFactory.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft. All rights reserved. Licensed under the MIT -// license. See LICENSE file in the project root for full license information. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Collections.Generic; diff --git a/src/Sarif/Query/BitArrayExtensions.cs b/src/Sarif/Query/BitArrayExtensions.cs index 8ca720deb..435618f80 100644 --- a/src/Sarif/Query/BitArrayExtensions.cs +++ b/src/Sarif/Query/BitArrayExtensions.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections; using System.Collections.Generic; diff --git a/src/Sarif/Query/CompareOperator.cs b/src/Sarif/Query/CompareOperator.cs index 324863c69..67b648a4a 100644 --- a/src/Sarif/Query/CompareOperator.cs +++ b/src/Sarif/Query/CompareOperator.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. namespace Microsoft.CodeAnalysis.Sarif.Query { diff --git a/src/Sarif/Query/Evaluators/BoolEvaluator.cs b/src/Sarif/Query/Evaluators/BoolEvaluator.cs index 8807ff865..692a0d39b 100644 --- a/src/Sarif/Query/Evaluators/BoolEvaluator.cs +++ b/src/Sarif/Query/Evaluators/BoolEvaluator.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Collections; diff --git a/src/Sarif/Query/Evaluators/DoubleEvaluator.cs b/src/Sarif/Query/Evaluators/DoubleEvaluator.cs index 6e8d9e260..47cd99227 100644 --- a/src/Sarif/Query/Evaluators/DoubleEvaluator.cs +++ b/src/Sarif/Query/Evaluators/DoubleEvaluator.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Collections; diff --git a/src/Sarif/Query/Evaluators/EnumEvaluator.cs b/src/Sarif/Query/Evaluators/EnumEvaluator.cs index aa3122fa0..8498a32f8 100644 --- a/src/Sarif/Query/Evaluators/EnumEvaluator.cs +++ b/src/Sarif/Query/Evaluators/EnumEvaluator.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Collections; diff --git a/src/Sarif/Query/Evaluators/EvaluatorFactory.cs b/src/Sarif/Query/Evaluators/EvaluatorFactory.cs index e9998fffc..b1f5ce195 100644 --- a/src/Sarif/Query/Evaluators/EvaluatorFactory.cs +++ b/src/Sarif/Query/Evaluators/EvaluatorFactory.cs @@ -1,4 +1,7 @@ -using System; +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System; namespace Microsoft.CodeAnalysis.Sarif.Query.Evaluators { diff --git a/src/Sarif/Query/Evaluators/ExpressionEvaluators.cs b/src/Sarif/Query/Evaluators/ExpressionEvaluators.cs index 0bb1325b7..a2b1f885e 100644 --- a/src/Sarif/Query/Evaluators/ExpressionEvaluators.cs +++ b/src/Sarif/Query/Evaluators/ExpressionEvaluators.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Collections; diff --git a/src/Sarif/Query/Evaluators/IExpressionEvaluator.cs b/src/Sarif/Query/Evaluators/IExpressionEvaluator.cs index e74720a4c..c0c9184dc 100644 --- a/src/Sarif/Query/Evaluators/IExpressionEvaluator.cs +++ b/src/Sarif/Query/Evaluators/IExpressionEvaluator.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections; using System.Collections.Generic; diff --git a/src/Sarif/Query/Evaluators/LongEvaluator.cs b/src/Sarif/Query/Evaluators/LongEvaluator.cs index 37a644eb9..367b2d81a 100644 --- a/src/Sarif/Query/Evaluators/LongEvaluator.cs +++ b/src/Sarif/Query/Evaluators/LongEvaluator.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Collections; diff --git a/src/Sarif/Query/Evaluators/ResultEvaluators.cs b/src/Sarif/Query/Evaluators/ResultEvaluators.cs index 237b297b0..0f71186ae 100644 --- a/src/Sarif/Query/Evaluators/ResultEvaluators.cs +++ b/src/Sarif/Query/Evaluators/ResultEvaluators.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Linq; diff --git a/src/Sarif/Query/Evaluators/SetEvaluator.cs b/src/Sarif/Query/Evaluators/SetEvaluator.cs index 918a5f80b..1974a21ac 100644 --- a/src/Sarif/Query/Evaluators/SetEvaluator.cs +++ b/src/Sarif/Query/Evaluators/SetEvaluator.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Collections; diff --git a/src/Sarif/Query/Evaluators/StringEvaluator.cs b/src/Sarif/Query/Evaluators/StringEvaluator.cs index 87fc76e46..cf567de2a 100644 --- a/src/Sarif/Query/Evaluators/StringEvaluator.cs +++ b/src/Sarif/Query/Evaluators/StringEvaluator.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Collections; diff --git a/src/Sarif/Query/ExpressionParser.cs b/src/Sarif/Query/ExpressionParser.cs index 65b3c80e4..ca04a8f2a 100644 --- a/src/Sarif/Query/ExpressionParser.cs +++ b/src/Sarif/Query/ExpressionParser.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Collections.Generic; diff --git a/src/Sarif/Query/Expressions.cs b/src/Sarif/Query/Expressions.cs index d2b78701b..6979490bf 100644 --- a/src/Sarif/Query/Expressions.cs +++ b/src/Sarif/Query/Expressions.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; using System.Text; diff --git a/src/Sarif/Query/IExpression.cs b/src/Sarif/Query/IExpression.cs index ce352c5a0..a63fcda63 100644 --- a/src/Sarif/Query/IExpression.cs +++ b/src/Sarif/Query/IExpression.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. namespace Microsoft.CodeAnalysis.Sarif.Query { diff --git a/src/Sarif/Query/QueryParseException.cs b/src/Sarif/Query/QueryParseException.cs index 954f708e2..9e3674e18 100644 --- a/src/Sarif/Query/QueryParseException.cs +++ b/src/Sarif/Query/QueryParseException.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Runtime.Serialization; diff --git a/src/Sarif/Query/StringSlice.cs b/src/Sarif/Query/StringSlice.cs index d896ba297..1f46028d0 100644 --- a/src/Sarif/Query/StringSlice.cs +++ b/src/Sarif/Query/StringSlice.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Text; diff --git a/src/Sarif/Readers/DeferredList.cs b/src/Sarif/Readers/DeferredList.cs index b5162e271..794030565 100644 --- a/src/Sarif/Readers/DeferredList.cs +++ b/src/Sarif/Readers/DeferredList.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Collections; diff --git a/src/Sarif/Readers/LineMappingStreamReader.cs b/src/Sarif/Readers/LineMappingStreamReader.cs index 8fcf1691b..bdebdfa94 100644 --- a/src/Sarif/Readers/LineMappingStreamReader.cs +++ b/src/Sarif/Readers/LineMappingStreamReader.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.IO; diff --git a/src/Sarif/Readers/OverflowCorrector.cs b/src/Sarif/Readers/OverflowCorrector.cs index 33a0717a5..ee0c3eb9e 100644 --- a/src/Sarif/Readers/OverflowCorrector.cs +++ b/src/Sarif/Readers/OverflowCorrector.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. namespace Microsoft.CodeAnalysis.Sarif.Readers { diff --git a/src/Sarif/Readers/PropertyBagConverter.cs b/src/Sarif/Readers/PropertyBagConverter.cs index d45aef099..d3e95de43 100644 --- a/src/Sarif/Readers/PropertyBagConverter.cs +++ b/src/Sarif/Readers/PropertyBagConverter.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Collections.Generic; diff --git a/src/Sarif/Readers/SerializedPropertyInfoConverter.cs b/src/Sarif/Readers/SerializedPropertyInfoConverter.cs index 1c9a950dd..cfbaddbde 100644 --- a/src/Sarif/Readers/SerializedPropertyInfoConverter.cs +++ b/src/Sarif/Readers/SerializedPropertyInfoConverter.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.IO; diff --git a/src/Sarif/VersionOne/Autogenerated/AlgorithmKindVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/AlgorithmKindVersionOne.cs index b3c50a5f1..29932f938 100644 --- a/src/Sarif/VersionOne/Autogenerated/AlgorithmKindVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/AlgorithmKindVersionOne.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.CodeDom.Compiler; diff --git a/src/Sarif/VersionOne/Autogenerated/AnnotatedCodeLocationImportanceVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/AnnotatedCodeLocationImportanceVersionOne.cs index 4078446e4..830c4a214 100644 --- a/src/Sarif/VersionOne/Autogenerated/AnnotatedCodeLocationImportanceVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/AnnotatedCodeLocationImportanceVersionOne.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.CodeDom.Compiler; diff --git a/src/Sarif/VersionOne/Autogenerated/AnnotatedCodeLocationKindVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/AnnotatedCodeLocationKindVersionOne.cs index beb4765a2..6090247da 100644 --- a/src/Sarif/VersionOne/Autogenerated/AnnotatedCodeLocationKindVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/AnnotatedCodeLocationKindVersionOne.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.CodeDom.Compiler; diff --git a/src/Sarif/VersionOne/Autogenerated/AnnotatedCodeLocationVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/AnnotatedCodeLocationVersionOne.cs index 973b6027c..74c699a91 100644 --- a/src/Sarif/VersionOne/Autogenerated/AnnotatedCodeLocationVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/AnnotatedCodeLocationVersionOne.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; diff --git a/src/Sarif/VersionOne/Autogenerated/AnnotatedCodeLocationVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/AnnotatedCodeLocationVersionOneEqualityComparer.cs index a72ba1212..19b59db9d 100644 --- a/src/Sarif/VersionOne/Autogenerated/AnnotatedCodeLocationVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/AnnotatedCodeLocationVersionOneEqualityComparer.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.CodeDom.Compiler; diff --git a/src/Sarif/VersionOne/Autogenerated/AnnotationVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/AnnotationVersionOne.cs index 5764a0c96..9cdb88a1f 100644 --- a/src/Sarif/VersionOne/Autogenerated/AnnotationVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/AnnotationVersionOne.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; diff --git a/src/Sarif/VersionOne/Autogenerated/AnnotationVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/AnnotationVersionOneEqualityComparer.cs index cdbfa93e6..9cc223f58 100644 --- a/src/Sarif/VersionOne/Autogenerated/AnnotationVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/AnnotationVersionOneEqualityComparer.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.CodeDom.Compiler; diff --git a/src/Sarif/VersionOne/Autogenerated/BaselineStateVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/BaselineStateVersionOne.cs index 7c47b44d7..3ae7da2f3 100644 --- a/src/Sarif/VersionOne/Autogenerated/BaselineStateVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/BaselineStateVersionOne.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.CodeDom.Compiler; diff --git a/src/Sarif/VersionOne/Autogenerated/CodeFlowVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/CodeFlowVersionOne.cs index 1948cd7e3..f3a89c9fe 100644 --- a/src/Sarif/VersionOne/Autogenerated/CodeFlowVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/CodeFlowVersionOne.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; diff --git a/src/Sarif/VersionOne/Autogenerated/CodeFlowVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/CodeFlowVersionOneEqualityComparer.cs index 04d5580f1..5ed5261c8 100644 --- a/src/Sarif/VersionOne/Autogenerated/CodeFlowVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/CodeFlowVersionOneEqualityComparer.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.CodeDom.Compiler; diff --git a/src/Sarif/VersionOne/Autogenerated/ExceptionDataVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/ExceptionDataVersionOne.cs index 10a8a13c7..e9eff284e 100644 --- a/src/Sarif/VersionOne/Autogenerated/ExceptionDataVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/ExceptionDataVersionOne.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; diff --git a/src/Sarif/VersionOne/Autogenerated/ExceptionDataVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/ExceptionDataVersionOneEqualityComparer.cs index 4b602efc2..9d1889905 100644 --- a/src/Sarif/VersionOne/Autogenerated/ExceptionDataVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/ExceptionDataVersionOneEqualityComparer.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.CodeDom.Compiler; diff --git a/src/Sarif/VersionOne/Autogenerated/FileChangeVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/FileChangeVersionOne.cs index 74e9fb14e..2a960098a 100644 --- a/src/Sarif/VersionOne/Autogenerated/FileChangeVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/FileChangeVersionOne.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; diff --git a/src/Sarif/VersionOne/Autogenerated/FileChangeVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/FileChangeVersionOneEqualityComparer.cs index 00d62d8ff..98ac6d20a 100644 --- a/src/Sarif/VersionOne/Autogenerated/FileChangeVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/FileChangeVersionOneEqualityComparer.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.CodeDom.Compiler; diff --git a/src/Sarif/VersionOne/Autogenerated/FileDataVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/FileDataVersionOne.cs index 50de34622..21b152797 100644 --- a/src/Sarif/VersionOne/Autogenerated/FileDataVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/FileDataVersionOne.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; diff --git a/src/Sarif/VersionOne/Autogenerated/FileDataVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/FileDataVersionOneEqualityComparer.cs index dc646ffa5..9af96bf7f 100644 --- a/src/Sarif/VersionOne/Autogenerated/FileDataVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/FileDataVersionOneEqualityComparer.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.CodeDom.Compiler; diff --git a/src/Sarif/VersionOne/Autogenerated/FixVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/FixVersionOne.cs index 39082544d..26e604e50 100644 --- a/src/Sarif/VersionOne/Autogenerated/FixVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/FixVersionOne.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; diff --git a/src/Sarif/VersionOne/Autogenerated/FixVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/FixVersionOneEqualityComparer.cs index 74216ce1e..07fb8430f 100644 --- a/src/Sarif/VersionOne/Autogenerated/FixVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/FixVersionOneEqualityComparer.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.CodeDom.Compiler; diff --git a/src/Sarif/VersionOne/Autogenerated/FormattedRuleMessageVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/FormattedRuleMessageVersionOne.cs index 0238edd4c..da58283b6 100644 --- a/src/Sarif/VersionOne/Autogenerated/FormattedRuleMessageVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/FormattedRuleMessageVersionOne.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; diff --git a/src/Sarif/VersionOne/Autogenerated/FormattedRuleMessageVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/FormattedRuleMessageVersionOneEqualityComparer.cs index de3ee8208..30d91871a 100644 --- a/src/Sarif/VersionOne/Autogenerated/FormattedRuleMessageVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/FormattedRuleMessageVersionOneEqualityComparer.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.CodeDom.Compiler; diff --git a/src/Sarif/VersionOne/Autogenerated/HashVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/HashVersionOne.cs index a1540c443..abbf3be35 100644 --- a/src/Sarif/VersionOne/Autogenerated/HashVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/HashVersionOne.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; diff --git a/src/Sarif/VersionOne/Autogenerated/HashVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/HashVersionOneEqualityComparer.cs index 0c37a345f..31fc3f58b 100644 --- a/src/Sarif/VersionOne/Autogenerated/HashVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/HashVersionOneEqualityComparer.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.CodeDom.Compiler; diff --git a/src/Sarif/VersionOne/Autogenerated/IRuleVersionOneVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/IRuleVersionOneVersionOne.cs index 9a1192b59..4417b37a3 100644 --- a/src/Sarif/VersionOne/Autogenerated/IRuleVersionOneVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/IRuleVersionOneVersionOne.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; diff --git a/src/Sarif/VersionOne/Autogenerated/ISarifNodeVersionOneVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/ISarifNodeVersionOneVersionOne.cs index 0c96c247e..2703ecb6c 100644 --- a/src/Sarif/VersionOne/Autogenerated/ISarifNodeVersionOneVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/ISarifNodeVersionOneVersionOne.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.CodeDom.Compiler; diff --git a/src/Sarif/VersionOne/Autogenerated/InvocationVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/InvocationVersionOne.cs index c7b9e29e7..80ef2c8b1 100644 --- a/src/Sarif/VersionOne/Autogenerated/InvocationVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/InvocationVersionOne.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; diff --git a/src/Sarif/VersionOne/Autogenerated/InvocationVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/InvocationVersionOneEqualityComparer.cs index 9e3c55bb8..6489c5e30 100644 --- a/src/Sarif/VersionOne/Autogenerated/InvocationVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/InvocationVersionOneEqualityComparer.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.CodeDom.Compiler; diff --git a/src/Sarif/VersionOne/Autogenerated/LocationVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/LocationVersionOne.cs index ef567c23e..5395f4ae0 100644 --- a/src/Sarif/VersionOne/Autogenerated/LocationVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/LocationVersionOne.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; diff --git a/src/Sarif/VersionOne/Autogenerated/LocationVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/LocationVersionOneEqualityComparer.cs index 743238f41..fedc6845a 100644 --- a/src/Sarif/VersionOne/Autogenerated/LocationVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/LocationVersionOneEqualityComparer.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.CodeDom.Compiler; diff --git a/src/Sarif/VersionOne/Autogenerated/LogicalLocationVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/LogicalLocationVersionOne.cs index 90d092b12..a7432b782 100644 --- a/src/Sarif/VersionOne/Autogenerated/LogicalLocationVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/LogicalLocationVersionOne.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; diff --git a/src/Sarif/VersionOne/Autogenerated/LogicalLocationVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/LogicalLocationVersionOneEqualityComparer.cs index 49bd9d121..750cbaebd 100644 --- a/src/Sarif/VersionOne/Autogenerated/LogicalLocationVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/LogicalLocationVersionOneEqualityComparer.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.CodeDom.Compiler; diff --git a/src/Sarif/VersionOne/Autogenerated/NotificationLevelVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/NotificationLevelVersionOne.cs index 0d556e800..d409ec3ff 100644 --- a/src/Sarif/VersionOne/Autogenerated/NotificationLevelVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/NotificationLevelVersionOne.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.CodeDom.Compiler; diff --git a/src/Sarif/VersionOne/Autogenerated/NotificationVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/NotificationVersionOne.cs index 60693930d..8e7f57474 100644 --- a/src/Sarif/VersionOne/Autogenerated/NotificationVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/NotificationVersionOne.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; diff --git a/src/Sarif/VersionOne/Autogenerated/NotificationVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/NotificationVersionOneEqualityComparer.cs index e79bbdd98..59a41a647 100644 --- a/src/Sarif/VersionOne/Autogenerated/NotificationVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/NotificationVersionOneEqualityComparer.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.CodeDom.Compiler; diff --git a/src/Sarif/VersionOne/Autogenerated/PhysicalLocationVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/PhysicalLocationVersionOne.cs index b2fc15ec0..4dd3de40e 100644 --- a/src/Sarif/VersionOne/Autogenerated/PhysicalLocationVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/PhysicalLocationVersionOne.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; diff --git a/src/Sarif/VersionOne/Autogenerated/PhysicalLocationVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/PhysicalLocationVersionOneEqualityComparer.cs index f998a52d8..f9882b975 100644 --- a/src/Sarif/VersionOne/Autogenerated/PhysicalLocationVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/PhysicalLocationVersionOneEqualityComparer.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.CodeDom.Compiler; diff --git a/src/Sarif/VersionOne/Autogenerated/RegionVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/RegionVersionOne.cs index 2abe90097..98a5d8304 100644 --- a/src/Sarif/VersionOne/Autogenerated/RegionVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/RegionVersionOne.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; diff --git a/src/Sarif/VersionOne/Autogenerated/RegionVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/RegionVersionOneEqualityComparer.cs index dccb274c7..02424b9c3 100644 --- a/src/Sarif/VersionOne/Autogenerated/RegionVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/RegionVersionOneEqualityComparer.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.CodeDom.Compiler; diff --git a/src/Sarif/VersionOne/Autogenerated/ReplacementVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/ReplacementVersionOne.cs index 4187ececf..fadaef1d8 100644 --- a/src/Sarif/VersionOne/Autogenerated/ReplacementVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/ReplacementVersionOne.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; diff --git a/src/Sarif/VersionOne/Autogenerated/ReplacementVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/ReplacementVersionOneEqualityComparer.cs index 751842cc8..06b55ad36 100644 --- a/src/Sarif/VersionOne/Autogenerated/ReplacementVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/ReplacementVersionOneEqualityComparer.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.CodeDom.Compiler; diff --git a/src/Sarif/VersionOne/Autogenerated/ResultLevelVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/ResultLevelVersionOne.cs index 5720bb67d..fe7b82fe1 100644 --- a/src/Sarif/VersionOne/Autogenerated/ResultLevelVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/ResultLevelVersionOne.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.CodeDom.Compiler; diff --git a/src/Sarif/VersionOne/Autogenerated/ResultVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/ResultVersionOne.cs index b19473e88..656bceb8d 100644 --- a/src/Sarif/VersionOne/Autogenerated/ResultVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/ResultVersionOne.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; diff --git a/src/Sarif/VersionOne/Autogenerated/ResultVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/ResultVersionOneEqualityComparer.cs index 61ced3a6b..811ce1b5b 100644 --- a/src/Sarif/VersionOne/Autogenerated/ResultVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/ResultVersionOneEqualityComparer.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.CodeDom.Compiler; diff --git a/src/Sarif/VersionOne/Autogenerated/RuleConfigurationVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/RuleConfigurationVersionOne.cs index 7eee570e5..62d672952 100644 --- a/src/Sarif/VersionOne/Autogenerated/RuleConfigurationVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/RuleConfigurationVersionOne.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.CodeDom.Compiler; diff --git a/src/Sarif/VersionOne/Autogenerated/RuleVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/RuleVersionOne.cs index ba73a1dc5..8db619a6f 100644 --- a/src/Sarif/VersionOne/Autogenerated/RuleVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/RuleVersionOne.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; diff --git a/src/Sarif/VersionOne/Autogenerated/RuleVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/RuleVersionOneEqualityComparer.cs index add984d46..8a5d17984 100644 --- a/src/Sarif/VersionOne/Autogenerated/RuleVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/RuleVersionOneEqualityComparer.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.CodeDom.Compiler; diff --git a/src/Sarif/VersionOne/Autogenerated/RunVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/RunVersionOne.cs index cdf91fbc5..c0dd9fdc1 100644 --- a/src/Sarif/VersionOne/Autogenerated/RunVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/RunVersionOne.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; diff --git a/src/Sarif/VersionOne/Autogenerated/RunVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/RunVersionOneEqualityComparer.cs index 30bc62632..387bd7ea9 100644 --- a/src/Sarif/VersionOne/Autogenerated/RunVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/RunVersionOneEqualityComparer.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.CodeDom.Compiler; diff --git a/src/Sarif/VersionOne/Autogenerated/SarifLogVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/SarifLogVersionOne.cs index 428118cae..91fc655ba 100644 --- a/src/Sarif/VersionOne/Autogenerated/SarifLogVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/SarifLogVersionOne.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; diff --git a/src/Sarif/VersionOne/Autogenerated/SarifLogVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/SarifLogVersionOneEqualityComparer.cs index 694e64019..18c4b4622 100644 --- a/src/Sarif/VersionOne/Autogenerated/SarifLogVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/SarifLogVersionOneEqualityComparer.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.CodeDom.Compiler; diff --git a/src/Sarif/VersionOne/Autogenerated/SarifNodeKindVersionOneVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/SarifNodeKindVersionOneVersionOne.cs index 9ce3bfd4d..7ea048226 100644 --- a/src/Sarif/VersionOne/Autogenerated/SarifNodeKindVersionOneVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/SarifNodeKindVersionOneVersionOne.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.CodeDom.Compiler; diff --git a/src/Sarif/VersionOne/Autogenerated/SarifRewritingVisitorVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/SarifRewritingVisitorVersionOne.cs index be36352c4..28e84950c 100644 --- a/src/Sarif/VersionOne/Autogenerated/SarifRewritingVisitorVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/SarifRewritingVisitorVersionOne.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; diff --git a/src/Sarif/VersionOne/Autogenerated/SarifVersionVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/SarifVersionVersionOne.cs index f77c56ddc..78e81c3e3 100644 --- a/src/Sarif/VersionOne/Autogenerated/SarifVersionVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/SarifVersionVersionOne.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.CodeDom.Compiler; diff --git a/src/Sarif/VersionOne/Autogenerated/StackFrameVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/StackFrameVersionOne.cs index 754677f0e..598b14f5a 100644 --- a/src/Sarif/VersionOne/Autogenerated/StackFrameVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/StackFrameVersionOne.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; diff --git a/src/Sarif/VersionOne/Autogenerated/StackFrameVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/StackFrameVersionOneEqualityComparer.cs index 2b7e7227a..5dee181bf 100644 --- a/src/Sarif/VersionOne/Autogenerated/StackFrameVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/StackFrameVersionOneEqualityComparer.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.CodeDom.Compiler; diff --git a/src/Sarif/VersionOne/Autogenerated/StackVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/StackVersionOne.cs index 613242d00..f1ced11ed 100644 --- a/src/Sarif/VersionOne/Autogenerated/StackVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/StackVersionOne.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; diff --git a/src/Sarif/VersionOne/Autogenerated/StackVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/StackVersionOneEqualityComparer.cs index ca4fbfad0..3d3d5ed59 100644 --- a/src/Sarif/VersionOne/Autogenerated/StackVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/StackVersionOneEqualityComparer.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.CodeDom.Compiler; diff --git a/src/Sarif/VersionOne/Autogenerated/SuppressionStatesVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/SuppressionStatesVersionOne.cs index 2d89c482d..7a5bf76a0 100644 --- a/src/Sarif/VersionOne/Autogenerated/SuppressionStatesVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/SuppressionStatesVersionOne.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; diff --git a/src/Sarif/VersionOne/Autogenerated/TaintKindVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/TaintKindVersionOne.cs index 7f45d4076..140a81d6b 100644 --- a/src/Sarif/VersionOne/Autogenerated/TaintKindVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/TaintKindVersionOne.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.CodeDom.Compiler; diff --git a/src/Sarif/VersionOne/Autogenerated/ToolVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/ToolVersionOne.cs index 176a827d5..076143638 100644 --- a/src/Sarif/VersionOne/Autogenerated/ToolVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/ToolVersionOne.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; diff --git a/src/Sarif/VersionOne/Autogenerated/ToolVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/ToolVersionOneEqualityComparer.cs index 90f1662eb..2610f7018 100644 --- a/src/Sarif/VersionOne/Autogenerated/ToolVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/ToolVersionOneEqualityComparer.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.CodeDom.Compiler; diff --git a/src/Sarif/VersionOne/Core/IPropertyBagHolderVersionOne.cs b/src/Sarif/VersionOne/Core/IPropertyBagHolderVersionOne.cs index d6acfc99b..5b1b21211 100644 --- a/src/Sarif/VersionOne/Core/IPropertyBagHolderVersionOne.cs +++ b/src/Sarif/VersionOne/Core/IPropertyBagHolderVersionOne.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; diff --git a/src/Sarif/VersionOne/Core/IRuleVersionOne.cs b/src/Sarif/VersionOne/Core/IRuleVersionOne.cs index ca80ae508..d6ccf3b4d 100644 --- a/src/Sarif/VersionOne/Core/IRuleVersionOne.cs +++ b/src/Sarif/VersionOne/Core/IRuleVersionOne.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. namespace Microsoft.CodeAnalysis.Sarif.VersionOne diff --git a/src/Sarif/VersionOne/Core/PropertyBagHolderVersionOne.cs b/src/Sarif/VersionOne/Core/PropertyBagHolderVersionOne.cs index ebc141897..8fb236092 100644 --- a/src/Sarif/VersionOne/Core/PropertyBagHolderVersionOne.cs +++ b/src/Sarif/VersionOne/Core/PropertyBagHolderVersionOne.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; diff --git a/src/Sarif/VersionOne/Core/TagsCollectionVersionOne.cs b/src/Sarif/VersionOne/Core/TagsCollectionVersionOne.cs index 9fe62bcaf..98de3519e 100644 --- a/src/Sarif/VersionOne/Core/TagsCollectionVersionOne.cs +++ b/src/Sarif/VersionOne/Core/TagsCollectionVersionOne.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; diff --git a/src/Sarif/Visitors/AddFileReferencesVisitor.cs b/src/Sarif/Visitors/AddFileReferencesVisitor.cs index 449db455d..61bd18a98 100644 --- a/src/Sarif/Visitors/AddFileReferencesVisitor.cs +++ b/src/Sarif/Visitors/AddFileReferencesVisitor.cs @@ -1,5 +1,6 @@ // Copyright (c) Microsoft. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information.using System; +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + using System.Collections.Generic; namespace Microsoft.CodeAnalysis.Sarif.Visitors diff --git a/src/Sarif/Visitors/ExtractAllArtifactLocationsVisitor.cs b/src/Sarif/Visitors/ExtractAllArtifactLocationsVisitor.cs index cb1915074..c9433b3e0 100644 --- a/src/Sarif/Visitors/ExtractAllArtifactLocationsVisitor.cs +++ b/src/Sarif/Visitors/ExtractAllArtifactLocationsVisitor.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft. All rights reserved. Licensed under the MIT -// license. See LICENSE file in the project root for full license information. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; diff --git a/src/Sarif/Visitors/RebaseUriVisitor.cs b/src/Sarif/Visitors/RebaseUriVisitor.cs index de7276253..0474d7dca 100644 --- a/src/Sarif/Visitors/RebaseUriVisitor.cs +++ b/src/Sarif/Visitors/RebaseUriVisitor.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft. All rights reserved. Licensed under the MIT -// license. See LICENSE file in the project root for full license information. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Collections.Generic; diff --git a/src/Sarif/Visitors/SarifTransformerUtilities.cs b/src/Sarif/Visitors/SarifTransformerUtilities.cs index 992af2961..ae99d99fe 100644 --- a/src/Sarif/Visitors/SarifTransformerUtilities.cs +++ b/src/Sarif/Visitors/SarifTransformerUtilities.cs @@ -1,4 +1,4 @@ -// Copyright(c) Microsoft.All rights reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; diff --git a/src/Sarif/Visitors/VersionOneLogicalLocationKeyToLogicalLocationDataVisitor.cs b/src/Sarif/Visitors/VersionOneLogicalLocationKeyToLogicalLocationDataVisitor.cs index 741cc815d..a111ba4f3 100644 --- a/src/Sarif/Visitors/VersionOneLogicalLocationKeyToLogicalLocationDataVisitor.cs +++ b/src/Sarif/Visitors/VersionOneLogicalLocationKeyToLogicalLocationDataVisitor.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft. All rights reserved. Licensed under the MIT -// license. See LICENSE file in the project root for full license information. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; diff --git a/src/Sarif/Writers/RegionComponents.cs b/src/Sarif/Writers/RegionComponents.cs index 1beff3ac6..b9cba1cb5 100644 --- a/src/Sarif/Writers/RegionComponents.cs +++ b/src/Sarif/Writers/RegionComponents.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; diff --git a/src/Sarif/Writers/SarifConsolidator.cs b/src/Sarif/Writers/SarifConsolidator.cs index 8d8ac12ff..b1a9dd502 100644 --- a/src/Sarif/Writers/SarifConsolidator.cs +++ b/src/Sarif/Writers/SarifConsolidator.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; using System.Linq; diff --git a/src/Shared/CommonAssemblyInfo.cs b/src/Shared/CommonAssemblyInfo.cs index 76e91b9d8..81bcb1f8c 100644 --- a/src/Shared/CommonAssemblyInfo.cs +++ b/src/Shared/CommonAssemblyInfo.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; diff --git a/src/Test.EndToEnd.Baselining/BaseliningDetailEnricher.cs b/src/Test.EndToEnd.Baselining/BaseliningDetailEnricher.cs index a4ac8ce9e..042cc8c0d 100644 --- a/src/Test.EndToEnd.Baselining/BaseliningDetailEnricher.cs +++ b/src/Test.EndToEnd.Baselining/BaseliningDetailEnricher.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; using System.IO; diff --git a/src/Test.EndToEnd.Baselining/BaseliningDetailLogger.cs b/src/Test.EndToEnd.Baselining/BaseliningDetailLogger.cs index 94a60a565..d233971d7 100644 --- a/src/Test.EndToEnd.Baselining/BaseliningDetailLogger.cs +++ b/src/Test.EndToEnd.Baselining/BaseliningDetailLogger.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Collections.Generic; diff --git a/src/Test.EndToEnd.Baselining/BaseliningSummary.cs b/src/Test.EndToEnd.Baselining/BaseliningSummary.cs index b3953e269..647a27ba9 100644 --- a/src/Test.EndToEnd.Baselining/BaseliningSummary.cs +++ b/src/Test.EndToEnd.Baselining/BaseliningSummary.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Collections.Generic; diff --git a/src/Test.EndToEnd.Baselining/BaseliningTester.cs b/src/Test.EndToEnd.Baselining/BaseliningTester.cs index 625a29118..23321527c 100644 --- a/src/Test.EndToEnd.Baselining/BaseliningTester.cs +++ b/src/Test.EndToEnd.Baselining/BaseliningTester.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Collections.Generic; diff --git a/src/Test.EndToEnd.Baselining/Extensions/ArtifactUriEnumeration.cs b/src/Test.EndToEnd.Baselining/Extensions/ArtifactUriEnumeration.cs index 964ceef36..d77381dba 100644 --- a/src/Test.EndToEnd.Baselining/Extensions/ArtifactUriEnumeration.cs +++ b/src/Test.EndToEnd.Baselining/Extensions/ArtifactUriEnumeration.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Collections.Generic; diff --git a/src/Test.EndToEnd.Baselining/Extensions/DirectResultMatchingComparer.cs b/src/Test.EndToEnd.Baselining/Extensions/DirectResultMatchingComparer.cs index 4923b5a85..cc8ecdee6 100644 --- a/src/Test.EndToEnd.Baselining/Extensions/DirectResultMatchingComparer.cs +++ b/src/Test.EndToEnd.Baselining/Extensions/DirectResultMatchingComparer.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; diff --git a/src/Test.EndToEnd.Baselining/Extensions/IEnumerableStringExtensions.cs b/src/Test.EndToEnd.Baselining/Extensions/IEnumerableStringExtensions.cs index 2d622a1fd..5620b99c5 100644 --- a/src/Test.EndToEnd.Baselining/Extensions/IEnumerableStringExtensions.cs +++ b/src/Test.EndToEnd.Baselining/Extensions/IEnumerableStringExtensions.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Collections.Generic; diff --git a/src/Test.EndToEnd.Baselining/Extensions/ResultEnumeration.cs b/src/Test.EndToEnd.Baselining/Extensions/ResultEnumeration.cs index 9abd8200c..272ccbdc4 100644 --- a/src/Test.EndToEnd.Baselining/Extensions/ResultEnumeration.cs +++ b/src/Test.EndToEnd.Baselining/Extensions/ResultEnumeration.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; diff --git a/src/Test.EndToEnd.Baselining/Extensions/ResultTextFormatter.cs b/src/Test.EndToEnd.Baselining/Extensions/ResultTextFormatter.cs index cd4d81402..c1382ed37 100644 --- a/src/Test.EndToEnd.Baselining/Extensions/ResultTextFormatter.cs +++ b/src/Test.EndToEnd.Baselining/Extensions/ResultTextFormatter.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Linq; diff --git a/src/Test.EndToEnd.Baselining/Extensions/SarifLogExtensions.cs b/src/Test.EndToEnd.Baselining/Extensions/SarifLogExtensions.cs index c7b41349d..f4ad487b1 100644 --- a/src/Test.EndToEnd.Baselining/Extensions/SarifLogExtensions.cs +++ b/src/Test.EndToEnd.Baselining/Extensions/SarifLogExtensions.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Collections.Generic; diff --git a/src/Test.EndToEnd.Baselining/Options/DebugOptions.cs b/src/Test.EndToEnd.Baselining/Options/DebugOptions.cs index 49031cf30..849e36dfc 100644 --- a/src/Test.EndToEnd.Baselining/Options/DebugOptions.cs +++ b/src/Test.EndToEnd.Baselining/Options/DebugOptions.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. using CommandLine; diff --git a/src/Test.EndToEnd.Baselining/Options/OptionsBase.cs b/src/Test.EndToEnd.Baselining/Options/OptionsBase.cs index ff7e45b92..e5528036d 100644 --- a/src/Test.EndToEnd.Baselining/Options/OptionsBase.cs +++ b/src/Test.EndToEnd.Baselining/Options/OptionsBase.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. using CommandLine; diff --git a/src/Test.EndToEnd.Baselining/Options/RebuildDebugLogsOptions.cs b/src/Test.EndToEnd.Baselining/Options/RebuildDebugLogsOptions.cs index 2d2af03c9..e552bf22b 100644 --- a/src/Test.EndToEnd.Baselining/Options/RebuildDebugLogsOptions.cs +++ b/src/Test.EndToEnd.Baselining/Options/RebuildDebugLogsOptions.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. using CommandLine; diff --git a/src/Test.EndToEnd.Baselining/Options/RunOptions.cs b/src/Test.EndToEnd.Baselining/Options/RunOptions.cs index 8aca1858b..0e225f8cd 100644 --- a/src/Test.EndToEnd.Baselining/Options/RunOptions.cs +++ b/src/Test.EndToEnd.Baselining/Options/RunOptions.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. using CommandLine; diff --git a/src/Test.EndToEnd.Baselining/Program.cs b/src/Test.EndToEnd.Baselining/Program.cs index c92e8ba2e..5a58ed4bd 100644 --- a/src/Test.EndToEnd.Baselining/Program.cs +++ b/src/Test.EndToEnd.Baselining/Program.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Diagnostics; diff --git a/src/Test.FunctionalTests.Sarif/SarifConverterTests.cs b/src/Test.FunctionalTests.Sarif/SarifConverterTests.cs index 17e7735f3..0b5380568 100644 --- a/src/Test.FunctionalTests.Sarif/SarifConverterTests.cs +++ b/src/Test.FunctionalTests.Sarif/SarifConverterTests.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft. All rights reserved. Licensed under the MIT -// license. See LICENSE file in the project root for full license information. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Globalization; diff --git a/src/Test.FunctionalTests.Sarif/SarifLogEqualityComparerTests.cs b/src/Test.FunctionalTests.Sarif/SarifLogEqualityComparerTests.cs index c3dce5259..a388c1c87 100644 --- a/src/Test.FunctionalTests.Sarif/SarifLogEqualityComparerTests.cs +++ b/src/Test.FunctionalTests.Sarif/SarifLogEqualityComparerTests.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.IO; diff --git a/src/Test.UnitTests.Sarif/Core/FileLocationTests.cs b/src/Test.UnitTests.Sarif/Core/FileLocationTests.cs index 017ac96d7..6c4f60844 100644 --- a/src/Test.UnitTests.Sarif/Core/FileLocationTests.cs +++ b/src/Test.UnitTests.Sarif/Core/FileLocationTests.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; diff --git a/src/Test.UnitTests.Sarif/Core/InvocationTests.cs b/src/Test.UnitTests.Sarif/Core/InvocationTests.cs index 7c86fa9c8..24ca78512 100644 --- a/src/Test.UnitTests.Sarif/Core/InvocationTests.cs +++ b/src/Test.UnitTests.Sarif/Core/InvocationTests.cs @@ -1,4 +1,7 @@ -using FluentAssertions; +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using FluentAssertions; using Microsoft.CodeAnalysis.Sarif; diff --git a/src/Test.UnitTests.Sarif/Core/LocationTests.cs b/src/Test.UnitTests.Sarif/Core/LocationTests.cs index e73ca8d54..12afd13a9 100644 --- a/src/Test.UnitTests.Sarif/Core/LocationTests.cs +++ b/src/Test.UnitTests.Sarif/Core/LocationTests.cs @@ -1,4 +1,7 @@ -using FluentAssertions; +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using FluentAssertions; using Microsoft.CodeAnalysis.Sarif; diff --git a/src/Test.UnitTests.Sarif/Core/PropertyBagHolderTests.cs b/src/Test.UnitTests.Sarif/Core/PropertyBagHolderTests.cs index 4dd29e9fb..278008d85 100644 --- a/src/Test.UnitTests.Sarif/Core/PropertyBagHolderTests.cs +++ b/src/Test.UnitTests.Sarif/Core/PropertyBagHolderTests.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; diff --git a/src/Test.UnitTests.Sarif/Core/RegionTests.cs b/src/Test.UnitTests.Sarif/Core/RegionTests.cs index bf3e50f56..c7f16112f 100644 --- a/src/Test.UnitTests.Sarif/Core/RegionTests.cs +++ b/src/Test.UnitTests.Sarif/Core/RegionTests.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using FluentAssertions; diff --git a/src/Test.UnitTests.Sarif/Core/ResultTests.cs b/src/Test.UnitTests.Sarif/Core/ResultTests.cs index 0fac934f1..68e52dab2 100644 --- a/src/Test.UnitTests.Sarif/Core/ResultTests.cs +++ b/src/Test.UnitTests.Sarif/Core/ResultTests.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using FluentAssertions; diff --git a/src/Test.UnitTests.Sarif/Core/RunTests.cs b/src/Test.UnitTests.Sarif/Core/RunTests.cs index 6ad3f6b57..9cae5539a 100644 --- a/src/Test.UnitTests.Sarif/Core/RunTests.cs +++ b/src/Test.UnitTests.Sarif/Core/RunTests.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; diff --git a/src/Test.UnitTests.Sarif/Core/StackTests.cs b/src/Test.UnitTests.Sarif/Core/StackTests.cs index edf6bdef8..1cd79d244 100644 --- a/src/Test.UnitTests.Sarif/Core/StackTests.cs +++ b/src/Test.UnitTests.Sarif/Core/StackTests.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; diff --git a/src/Test.UnitTests.Sarif/Core/TagsTests.cs b/src/Test.UnitTests.Sarif/Core/TagsTests.cs index 539221adb..1cf529654 100644 --- a/src/Test.UnitTests.Sarif/Core/TagsTests.cs +++ b/src/Test.UnitTests.Sarif/Core/TagsTests.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; diff --git a/src/Test.UnitTests.Sarif/Core/WebMessageUtilitiesTests.cs b/src/Test.UnitTests.Sarif/Core/WebMessageUtilitiesTests.cs index 22bc4f770..9845b4c66 100644 --- a/src/Test.UnitTests.Sarif/Core/WebMessageUtilitiesTests.cs +++ b/src/Test.UnitTests.Sarif/Core/WebMessageUtilitiesTests.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; diff --git a/src/Test.UnitTests.Sarif/Core/WebRequestTests.cs b/src/Test.UnitTests.Sarif/Core/WebRequestTests.cs index 37e634de1..96ee95401 100644 --- a/src/Test.UnitTests.Sarif/Core/WebRequestTests.cs +++ b/src/Test.UnitTests.Sarif/Core/WebRequestTests.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; diff --git a/src/Test.UnitTests.Sarif/Core/WebResponseTests.cs b/src/Test.UnitTests.Sarif/Core/WebResponseTests.cs index 5c7050d26..e64ad2eca 100644 --- a/src/Test.UnitTests.Sarif/Core/WebResponseTests.cs +++ b/src/Test.UnitTests.Sarif/Core/WebResponseTests.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; diff --git a/src/Test.UnitTests.Sarif/Map/JsonMapBuilderTests.cs b/src/Test.UnitTests.Sarif/Map/JsonMapBuilderTests.cs index baefaa01b..bbad6e8c3 100644 --- a/src/Test.UnitTests.Sarif/Map/JsonMapBuilderTests.cs +++ b/src/Test.UnitTests.Sarif/Map/JsonMapBuilderTests.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.IO; diff --git a/src/Test.UnitTests.Sarif/Map/LongArrayDeltaConverterTests.cs b/src/Test.UnitTests.Sarif/Map/LongArrayDeltaConverterTests.cs index 5470030f0..b39270532 100644 --- a/src/Test.UnitTests.Sarif/Map/LongArrayDeltaConverterTests.cs +++ b/src/Test.UnitTests.Sarif/Map/LongArrayDeltaConverterTests.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; diff --git a/src/Test.UnitTests.Sarif/Processors/GenericTests/GenericProcessorTests.cs b/src/Test.UnitTests.Sarif/Processors/GenericTests/GenericProcessorTests.cs index 6919f123b..bad208176 100644 --- a/src/Test.UnitTests.Sarif/Processors/GenericTests/GenericProcessorTests.cs +++ b/src/Test.UnitTests.Sarif/Processors/GenericTests/GenericProcessorTests.cs @@ -1,5 +1,6 @@ -// Copyright (c) Microsoft. All rights reserved. Licensed under the MIT -// license. See LICENSE file in the project root for full license information. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + using System; using System.Collections.Generic; using System.Linq; diff --git a/src/Test.UnitTests.Sarif/Processors/GenericTests/TestFoldProcessor.cs b/src/Test.UnitTests.Sarif/Processors/GenericTests/TestFoldProcessor.cs index e4424bc77..a71a89155 100644 --- a/src/Test.UnitTests.Sarif/Processors/GenericTests/TestFoldProcessor.cs +++ b/src/Test.UnitTests.Sarif/Processors/GenericTests/TestFoldProcessor.cs @@ -1,5 +1,6 @@ -// Copyright (c) Microsoft. All rights reserved. Licensed under the MIT -// license. See LICENSE file in the project root for full license information. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + using System; namespace Microsoft.CodeAnalysis.Sarif.Processors diff --git a/src/Test.UnitTests.Sarif/Processors/Log/RebaseUriStageTests.cs b/src/Test.UnitTests.Sarif/Processors/Log/RebaseUriStageTests.cs index f92fa8616..373736a69 100644 --- a/src/Test.UnitTests.Sarif/Processors/Log/RebaseUriStageTests.cs +++ b/src/Test.UnitTests.Sarif/Processors/Log/RebaseUriStageTests.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft. All rights reserved. Licensed under the MIT -// license. See LICENSE file in the project root for full license information. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Collections.Generic; diff --git a/src/Test.UnitTests.Sarif/Processors/Log/SarifLogExtensionTests.cs b/src/Test.UnitTests.Sarif/Processors/Log/SarifLogExtensionTests.cs index c564fa302..61c3d8886 100644 --- a/src/Test.UnitTests.Sarif/Processors/Log/SarifLogExtensionTests.cs +++ b/src/Test.UnitTests.Sarif/Processors/Log/SarifLogExtensionTests.cs @@ -1,4 +1,7 @@ -using System; +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System; using System.Collections.Generic; using System.Linq; diff --git a/src/Test.UnitTests.Sarif/Query/EvaluatorTests.cs b/src/Test.UnitTests.Sarif/Query/EvaluatorTests.cs index 5a52c460a..66b605bc1 100644 --- a/src/Test.UnitTests.Sarif/Query/EvaluatorTests.cs +++ b/src/Test.UnitTests.Sarif/Query/EvaluatorTests.cs @@ -1,4 +1,7 @@ -using System; +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System; using System.Collections; using System.Collections.Generic; using System.Linq; diff --git a/src/Test.UnitTests.Sarif/Query/ExpressionParserTests.cs b/src/Test.UnitTests.Sarif/Query/ExpressionParserTests.cs index 48c605d6b..4f48094f8 100644 --- a/src/Test.UnitTests.Sarif/Query/ExpressionParserTests.cs +++ b/src/Test.UnitTests.Sarif/Query/ExpressionParserTests.cs @@ -1,4 +1,7 @@ -using Xunit; +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Query { diff --git a/src/Test.UnitTests.Sarif/Query/StringSliceTests.cs b/src/Test.UnitTests.Sarif/Query/StringSliceTests.cs index 3ac1f7296..09530292f 100644 --- a/src/Test.UnitTests.Sarif/Query/StringSliceTests.cs +++ b/src/Test.UnitTests.Sarif/Query/StringSliceTests.cs @@ -1,4 +1,7 @@ -using System; +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System; using System.Text; using Microsoft.CodeAnalysis.Sarif.Query; diff --git a/src/Test.UnitTests.Sarif/Readers/PropertyBagConverterTests.cs b/src/Test.UnitTests.Sarif/Readers/PropertyBagConverterTests.cs index 2866cd4fd..27a85f190 100644 --- a/src/Test.UnitTests.Sarif/Readers/PropertyBagConverterTests.cs +++ b/src/Test.UnitTests.Sarif/Readers/PropertyBagConverterTests.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; diff --git a/src/Test.UnitTests.Sarif/RoundTrippingTests.cs b/src/Test.UnitTests.Sarif/RoundTrippingTests.cs index a2e987acf..a086865d5 100644 --- a/src/Test.UnitTests.Sarif/RoundTrippingTests.cs +++ b/src/Test.UnitTests.Sarif/RoundTrippingTests.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft. All rights reserved. Licensed under the MIT -// license. See LICENSE file in the project root for full license information. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Globalization; diff --git a/src/Test.UnitTests.Sarif/Visitors/InsertOptionalDataVisitorTests.cs b/src/Test.UnitTests.Sarif/Visitors/InsertOptionalDataVisitorTests.cs index e604a6b2e..4bcefd0c7 100644 --- a/src/Test.UnitTests.Sarif/Visitors/InsertOptionalDataVisitorTests.cs +++ b/src/Test.UnitTests.Sarif/Visitors/InsertOptionalDataVisitorTests.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft. All rights reserved. Licensed under the MIT -// license. See LICENSE file in the project root for full license information. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Collections.Generic; diff --git a/src/Test.UnitTests.Sarif/Visitors/RebaseUriVisitorTests.cs b/src/Test.UnitTests.Sarif/Visitors/RebaseUriVisitorTests.cs index 617becd10..b6d6a9c4a 100644 --- a/src/Test.UnitTests.Sarif/Visitors/RebaseUriVisitorTests.cs +++ b/src/Test.UnitTests.Sarif/Visitors/RebaseUriVisitorTests.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft. All rights reserved. Licensed under the MIT -// license. See LICENSE file in the project root for full license information. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Collections.Generic; diff --git a/src/Test.UnitTests.Sarif/Visitors/RemoveOptionalDataVisitorTests.cs b/src/Test.UnitTests.Sarif/Visitors/RemoveOptionalDataVisitorTests.cs index fb3131e4c..9bcbb03df 100644 --- a/src/Test.UnitTests.Sarif/Visitors/RemoveOptionalDataVisitorTests.cs +++ b/src/Test.UnitTests.Sarif/Visitors/RemoveOptionalDataVisitorTests.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft. All rights reserved. Licensed under the MIT -// license. See LICENSE file in the project root for full license information. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Collections.Generic; diff --git a/src/Test.UnitTests.Sarif/Visitors/SarifCurrentToVersionOneVisitorTests.cs b/src/Test.UnitTests.Sarif/Visitors/SarifCurrentToVersionOneVisitorTests.cs index d40faafa9..716f2da4e 100644 --- a/src/Test.UnitTests.Sarif/Visitors/SarifCurrentToVersionOneVisitorTests.cs +++ b/src/Test.UnitTests.Sarif/Visitors/SarifCurrentToVersionOneVisitorTests.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft. All rights reserved. Licensed under the MIT -// license. See LICENSE file in the project root for full license information. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. using Microsoft.CodeAnalysis.Sarif.VersionOne; using Microsoft.CodeAnalysis.Sarif.Visitors; diff --git a/src/Test.UnitTests.Sarif/Visitors/SarifVersionOneToCurrentVisitorTests.cs b/src/Test.UnitTests.Sarif/Visitors/SarifVersionOneToCurrentVisitorTests.cs index 54d67e380..f90d576a0 100644 --- a/src/Test.UnitTests.Sarif/Visitors/SarifVersionOneToCurrentVisitorTests.cs +++ b/src/Test.UnitTests.Sarif/Visitors/SarifVersionOneToCurrentVisitorTests.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft. All rights reserved. Licensed under the MIT -// license. See LICENSE file in the project root for full license information. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. using Microsoft.CodeAnalysis.Sarif.VersionOne; using Microsoft.CodeAnalysis.Sarif.Visitors; diff --git a/src/Test.UnitTests.Sarif/Writers/PrereleaseCompatibilityTransformerTests.cs b/src/Test.UnitTests.Sarif/Writers/PrereleaseCompatibilityTransformerTests.cs index 1ade8909b..3b93da522 100644 --- a/src/Test.UnitTests.Sarif/Writers/PrereleaseCompatibilityTransformerTests.cs +++ b/src/Test.UnitTests.Sarif/Writers/PrereleaseCompatibilityTransformerTests.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft. All rights reserved. Licensed under the MIT -// license. See LICENSE file in the project root for full license information. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.IO; diff --git a/src/Test.Utilities.Sarif/DeletesOutputsDirectoryOnClassInitializationFixture.cs b/src/Test.Utilities.Sarif/DeletesOutputsDirectoryOnClassInitializationFixture.cs index 1e1982b99..707956c6e 100644 --- a/src/Test.Utilities.Sarif/DeletesOutputsDirectoryOnClassInitializationFixture.cs +++ b/src/Test.Utilities.Sarif/DeletesOutputsDirectoryOnClassInitializationFixture.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft. All rights reserved. Licensed under the MIT -// license. See LICENSE file in the project root for full license information. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.IO; diff --git a/src/Test.Utilities.Sarif/FileDiffingFunctionalTests.cs b/src/Test.Utilities.Sarif/FileDiffingFunctionalTests.cs index 736ce4aec..8d0f543a9 100644 --- a/src/Test.Utilities.Sarif/FileDiffingFunctionalTests.cs +++ b/src/Test.Utilities.Sarif/FileDiffingFunctionalTests.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft. All rights reserved. Licensed under the MIT -// license. See LICENSE file in the project root for full license information. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.IO; diff --git a/src/Test.Utilities.Sarif/FileDiffingUnitTests.cs b/src/Test.Utilities.Sarif/FileDiffingUnitTests.cs index f33a91df4..0f763d45d 100644 --- a/src/Test.Utilities.Sarif/FileDiffingUnitTests.cs +++ b/src/Test.Utilities.Sarif/FileDiffingUnitTests.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft. All rights reserved. Licensed under the MIT -// license. See LICENSE file in the project root for full license information. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Collections.Generic; diff --git a/src/Test.Utilities.Sarif/ResourceExtractor.cs b/src/Test.Utilities.Sarif/ResourceExtractor.cs index 35358773d..9c8956689 100644 --- a/src/Test.Utilities.Sarif/ResourceExtractor.cs +++ b/src/Test.Utilities.Sarif/ResourceExtractor.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.IO; diff --git a/src/Test.Utilities.Sarif/TestData.cs b/src/Test.Utilities.Sarif/TestData.cs index 6e46987d4..a38c196ed 100644 --- a/src/Test.Utilities.Sarif/TestData.cs +++ b/src/Test.Utilities.Sarif/TestData.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All Rights Reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; diff --git a/src/Test.Utilities.Sarif/TestTraits.cs b/src/Test.Utilities.Sarif/TestTraits.cs index 006372e6d..09cbfd5ec 100644 --- a/src/Test.Utilities.Sarif/TestTraits.cs +++ b/src/Test.Utilities.Sarif/TestTraits.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft. All rights reserved. Licensed under the MIT -// license. See LICENSE file in the project root for full license information. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. namespace Microsoft.CodeAnalysis.Sarif { diff --git a/src/WorkItems/Logging/LoggingContext.cs b/src/WorkItems/Logging/LoggingContext.cs index 43b2d69af..e18328874 100644 --- a/src/WorkItems/Logging/LoggingContext.cs +++ b/src/WorkItems/Logging/LoggingContext.cs @@ -1,4 +1,7 @@ -using System; +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System; using System.Collections.Generic; using System.Text; From 4ed1c265debc8cbc17434751716101967decb5bf Mon Sep 17 00:00:00 2001 From: Eddy Nakamura Date: Fri, 16 Oct 2020 08:21:25 -0300 Subject: [PATCH 3/7] reverting --- src/.editorconfig | 6 +++--- src/Samples/Sarif.Sdk.Sample/Program.cs | 3 --- src/Samples/Sarif.WorkItems.Sample/Program.cs | 2 -- src/Samples/SarifDeferredSample/Program.cs | 14 ++++++-------- src/Samples/SarifToCsv/CsvWriter.cs | 2 +- src/Samples/SarifToCsv/Program.cs | 2 +- src/Samples/SarifToCsv/SarifCsvColumnWriters.cs | 3 +-- src/Samples/SarifToCsv/SdkExtensions.cs | 2 +- src/Sarif.Converters/AndroidStudioConverter.cs | 2 +- src/Sarif.Converters/ClangAnalyzerConverter.cs | 2 +- .../ContrastSecurityConverter.cs | 4 +--- src/Sarif.Converters/FlawFinderCsvConverter.cs | 5 ++--- src/Sarif.Converters/FortifyFprConverter.cs | 16 ++++++++-------- src/Sarif.Converters/FortifyIssue.cs | 1 + src/Sarif.Converters/FortifyUtilities.cs | 4 ++-- src/Sarif.Converters/FxCopConverter.cs | 2 +- src/Sarif.Converters/GlobalSuppressions.cs | 2 +- src/Sarif.Converters/LogReader.cs | 2 +- src/Sarif.Converters/MSBuildConverter.cs | 2 +- src/Sarif.Converters/Properties/AssemblyInfo.cs | 2 +- src/Sarif.Converters/PylintConverter.cs | 1 - .../PylintObjectModel/PylintLog.cs | 2 +- .../PylintObjectModel/PylintLogReader.cs | 3 +-- src/Sarif.Converters/SparseReader.cs | 2 +- src/Sarif.Converters/TSLintConverter.cs | 1 - src/Sarif.Converters/TSLintLogReader.cs | 2 -- src/Sarif.Converters/TextFormats/CsvReader.cs | 2 +- src/Sarif.Converters/ToolFileConverterBase.cs | 1 - src/Sarif.Converters/ToolFormatConverter.cs | 2 -- src/Sarif.Driver/DriverExtensionMethods.cs | 1 - src/Sarif.Driver/DriverUtilities.cs | 3 +-- src/Sarif.Driver/PathExtensions.cs | 2 +- src/Sarif.Driver/Properties/AssemblyInfo.cs | 2 +- src/Sarif.Driver/Sdk/AnalysisApplicability.cs | 2 +- src/Sarif.Driver/Sdk/AnalysisContext.cs | 2 +- src/Sarif.Driver/Sdk/AnalyzeCommandBase.cs | 3 +-- src/Sarif.Driver/Sdk/AnalyzeOptionsBase.cs | 2 +- src/Sarif.Driver/Sdk/CommonOptionsBase.cs | 3 +-- .../Sdk/ExportRulesDocumentationCommandBase.cs | 6 +++--- src/Sarif.Driver/Sdk/MultifileOptionsBase.cs | 1 - src/Sarif.Driver/SemanticVersion.cs | 2 +- .../AbsoluteUriCommand.cs | 2 -- .../AbsoluteUriOptions.cs | 1 - src/Sarif.Multitool.Library/CommandBase.cs | 2 -- src/Sarif.Multitool.Library/CommandUtilities.cs | 1 - src/Sarif.Multitool.Library/ConvertCommand.cs | 2 +- src/Sarif.Multitool.Library/ConvertOptions.cs | 3 +-- .../ExportValidationConfigurationCommand.cs | 1 - .../ExportValidationConfigurationOptions.cs | 3 +-- .../ExportValidationDocumentationOptions.cs | 1 - .../ExportValidationRulesMetadataOptions.cs | 1 - .../FileWorkItemsCommand.cs | 4 +--- .../FileWorkItemsOptions.cs | 3 +-- src/Sarif.Multitool.Library/JTokenExtensions.cs | 3 +-- src/Sarif.Multitool.Library/MergeCommand.cs | 2 +- src/Sarif.Multitool.Library/MergeOptions.cs | 7 +++---- src/Sarif.Multitool.Library/PageCommand.cs | 2 -- src/Sarif.Multitool.Library/QueryCommand.cs | 1 - src/Sarif.Multitool.Library/RebaseUriCommand.cs | 1 - src/Sarif.Multitool.Library/RebaseUriOptions.cs | 1 - .../ResultMatchSetCommand.cs | 2 -- .../ResultMatchSetOptions.cs | 1 - .../ResultMatchingCommand.cs | 1 - .../ResultMatchingOptions.cs | 2 -- src/Sarif.Multitool.Library/RewriteCommand.cs | 2 -- src/Sarif.Multitool.Library/RewriteOptions.cs | 3 +-- src/Sarif.Multitool.Library/Rules/RuleId.cs | 2 +- .../Rules/SARIF1005.UriMustBeAbsolute.cs | 4 ++-- .../Rules/SARIF1010.RuleIdMustBeConsistent.cs | 10 +++++----- .../Rules/SARIF1011.ReferenceFinalSchema.cs | 2 +- .../Rules/SARIF2004.OptimizeFileSize.cs | 2 +- .../Rules/SARIF2006.UrisShouldBeReachable.cs | 4 ++-- .../Rules/SARIF2008.ProvideSchema.cs | 2 +- .../Rules/SARIF2010.ProvideCodeSnippets.cs | 1 - .../Rules/SarifValidationSkimmerBase.cs | 2 -- .../SarifValidationContext.cs | 1 - src/Sarif.Multitool.Library/StringExtensions.cs | 1 - src/Sarif.Multitool.Library/TransformCommand.cs | 4 +--- src/Sarif.Multitool.Library/TransformOptions.cs | 3 +-- src/Sarif.Multitool.Library/ValidateCommand.cs | 1 - src/Sarif.Multitool.Library/ValidateOptions.cs | 1 - src/Sarif.WorkItems/SarifWorkItemContext.cs | 8 +++----- src/Sarif.WorkItems/SarifWorkItemFiler.cs | 6 ++---- src/Sarif.WorkItems/SarifWorkItemModel.cs | 8 +++----- src/Sarif.WorkItems/SarifWorkItemsExtensions.cs | 6 +++--- src/Sarif/Autogenerated/Address.cs | 4 +--- .../Autogenerated/AddressEqualityComparer.cs | 3 +-- src/Sarif/Autogenerated/Artifact.cs | 4 +--- src/Sarif/Autogenerated/ArtifactChange.cs | 3 +-- .../ArtifactChangeEqualityComparer.cs | 3 +-- src/Sarif/Autogenerated/ArtifactContent.cs | 3 +-- .../ArtifactContentEqualityComparer.cs | 3 +-- .../Autogenerated/ArtifactEqualityComparer.cs | 3 +-- src/Sarif/Autogenerated/ArtifactLocation.cs | 4 +--- .../ArtifactLocationEqualityComparer.cs | 3 +-- src/Sarif/Autogenerated/ArtifactRoles.cs | 2 +- src/Sarif/Autogenerated/Attachment.cs | 4 +--- .../Autogenerated/AttachmentEqualityComparer.cs | 3 +-- src/Sarif/Autogenerated/BaselineState.cs | 2 +- src/Sarif/Autogenerated/CodeFlow.cs | 3 +-- .../Autogenerated/CodeFlowEqualityComparer.cs | 3 +-- src/Sarif/Autogenerated/ColumnKind.cs | 2 +- .../Autogenerated/ConfigurationOverride.cs | 3 +-- .../ConfigurationOverrideEqualityComparer.cs | 3 +-- src/Sarif/Autogenerated/Conversion.cs | 4 +--- .../Autogenerated/ConversionEqualityComparer.cs | 3 +-- src/Sarif/Autogenerated/Edge.cs | 3 +-- src/Sarif/Autogenerated/EdgeEqualityComparer.cs | 3 +-- src/Sarif/Autogenerated/EdgeTraversal.cs | 3 +-- .../EdgeTraversalEqualityComparer.cs | 3 +-- src/Sarif/Autogenerated/ExceptionData.cs | 4 +--- .../ExceptionDataEqualityComparer.cs | 3 +-- src/Sarif/Autogenerated/ExternalProperties.cs | 4 +--- .../ExternalPropertiesEqualityComparer.cs | 3 +-- .../ExternalPropertyFileReference.cs | 4 +--- ...rnalPropertyFileReferenceEqualityComparer.cs | 3 +-- .../ExternalPropertyFileReferences.cs | 4 +--- ...nalPropertyFileReferencesEqualityComparer.cs | 3 +-- src/Sarif/Autogenerated/FailureLevel.cs | 2 +- src/Sarif/Autogenerated/Fix.cs | 3 +-- src/Sarif/Autogenerated/FixEqualityComparer.cs | 3 +-- src/Sarif/Autogenerated/Graph.cs | 4 +--- .../Autogenerated/GraphEqualityComparer.cs | 3 +-- src/Sarif/Autogenerated/GraphTraversal.cs | 4 +--- .../GraphTraversalEqualityComparer.cs | 3 +-- src/Sarif/Autogenerated/ISarifNode.cs | 2 +- src/Sarif/Autogenerated/Invocation.cs | 4 +--- .../Autogenerated/InvocationEqualityComparer.cs | 3 +-- src/Sarif/Autogenerated/Location.cs | 4 +--- .../Autogenerated/LocationEqualityComparer.cs | 3 +-- src/Sarif/Autogenerated/LocationRelationship.cs | 4 +--- .../LocationRelationshipEqualityComparer.cs | 3 +-- src/Sarif/Autogenerated/LogicalLocation.cs | 4 +--- .../LogicalLocationEqualityComparer.cs | 3 +-- src/Sarif/Autogenerated/Message.cs | 4 +--- .../Autogenerated/MessageEqualityComparer.cs | 3 +-- .../Autogenerated/MultiformatMessageString.cs | 3 +-- .../MultiformatMessageStringEqualityComparer.cs | 3 +-- src/Sarif/Autogenerated/Node.cs | 4 +--- src/Sarif/Autogenerated/NodeEqualityComparer.cs | 3 +-- src/Sarif/Autogenerated/Notification.cs | 4 +--- .../NotificationEqualityComparer.cs | 3 +-- src/Sarif/Autogenerated/PhysicalLocation.cs | 3 +-- .../PhysicalLocationEqualityComparer.cs | 3 +-- src/Sarif/Autogenerated/PropertyBag.cs | 3 +-- .../PropertyBagEqualityComparer.cs | 2 +- src/Sarif/Autogenerated/Rectangle.cs | 3 +-- .../Autogenerated/RectangleEqualityComparer.cs | 3 +-- src/Sarif/Autogenerated/Region.cs | 4 +--- .../Autogenerated/RegionEqualityComparer.cs | 3 +-- src/Sarif/Autogenerated/Replacement.cs | 3 +-- .../ReplacementEqualityComparer.cs | 3 +-- .../Autogenerated/ReportingConfiguration.cs | 4 +--- .../ReportingConfigurationEqualityComparer.cs | 3 +-- src/Sarif/Autogenerated/ReportingDescriptor.cs | 4 +--- .../ReportingDescriptorEqualityComparer.cs | 3 +-- .../ReportingDescriptorReference.cs | 4 +--- ...ortingDescriptorReferenceEqualityComparer.cs | 3 +-- .../ReportingDescriptorRelationship.cs | 4 +--- ...ingDescriptorRelationshipEqualityComparer.cs | 3 +-- src/Sarif/Autogenerated/Result.cs | 4 +--- .../Autogenerated/ResultEqualityComparer.cs | 3 +-- src/Sarif/Autogenerated/ResultKind.cs | 2 +- src/Sarif/Autogenerated/ResultProvenance.cs | 4 +--- .../ResultProvenanceEqualityComparer.cs | 3 +-- src/Sarif/Autogenerated/Run.cs | 4 +--- src/Sarif/Autogenerated/RunAutomationDetails.cs | 3 +-- .../RunAutomationDetailsEqualityComparer.cs | 3 +-- src/Sarif/Autogenerated/RunEqualityComparer.cs | 3 +-- src/Sarif/Autogenerated/SarifLog.cs | 4 +--- .../Autogenerated/SarifLogEqualityComparer.cs | 3 +-- src/Sarif/Autogenerated/SarifNodeKind.cs | 2 +- .../Autogenerated/SarifRewritingVisitor.cs | 2 +- src/Sarif/Autogenerated/SarifVersion.cs | 2 +- src/Sarif/Autogenerated/SpecialLocations.cs | 3 +-- .../SpecialLocationsEqualityComparer.cs | 3 +-- src/Sarif/Autogenerated/Stack.cs | 3 +-- .../Autogenerated/StackEqualityComparer.cs | 3 +-- src/Sarif/Autogenerated/StackFrame.cs | 4 +--- .../Autogenerated/StackFrameEqualityComparer.cs | 3 +-- src/Sarif/Autogenerated/Suppression.cs | 4 +--- .../SuppressionEqualityComparer.cs | 3 +-- src/Sarif/Autogenerated/SuppressionKind.cs | 2 +- src/Sarif/Autogenerated/SuppressionStatus.cs | 2 +- src/Sarif/Autogenerated/ThreadFlow.cs | 3 +-- .../Autogenerated/ThreadFlowEqualityComparer.cs | 3 +-- src/Sarif/Autogenerated/ThreadFlowLocation.cs | 4 +--- .../ThreadFlowLocationEqualityComparer.cs | 3 +-- .../ThreadFlowLocationImportance.cs | 2 +- src/Sarif/Autogenerated/Tool.cs | 4 +--- src/Sarif/Autogenerated/ToolComponent.cs | 4 +--- .../Autogenerated/ToolComponentContents.cs | 2 +- .../ToolComponentEqualityComparer.cs | 3 +-- .../Autogenerated/ToolComponentReference.cs | 4 +--- .../ToolComponentReferenceEqualityComparer.cs | 3 +-- src/Sarif/Autogenerated/ToolEqualityComparer.cs | 3 +-- src/Sarif/Autogenerated/TranslationMetadata.cs | 3 +-- .../TranslationMetadataEqualityComparer.cs | 3 +-- .../Autogenerated/VersionControlDetails.cs | 4 +--- .../VersionControlDetailsEqualityComparer.cs | 3 +-- src/Sarif/Autogenerated/WebRequest.cs | 4 +--- .../Autogenerated/WebRequestEqualityComparer.cs | 3 +-- src/Sarif/Autogenerated/WebResponse.cs | 4 +--- .../WebResponseEqualityComparer.cs | 3 +-- .../DefaultBaseline/CodeFlowBaselineEquals.cs | 2 +- .../DefaultBaseline/ThreadFlowBaselineEquals.cs | 2 +- .../ThreadFlowLocationBaselineEquals.cs | 2 +- .../DataStructures/MatchedResults.cs | 2 +- .../Baseline/ResultMatching/IResultMatcher.cs | 1 - .../IRemappingCalculator.cs | 2 +- .../RemappingCalculators/SarifLogRemapping.cs | 2 +- .../ResultMatchingBaselinerFactory.cs | 1 - src/Sarif/Baseline/V2/WhatComponent.cs | 2 +- src/Sarif/Baseline/V2/WhatMap.cs | 4 ++-- src/Sarif/Baseline/V2/WhereComparer.cs | 2 +- src/Sarif/ConsoleLogger.cs | 2 +- src/Sarif/Core/Artifact.cs | 1 - src/Sarif/Core/CodeFlow.cs | 4 ++-- src/Sarif/Core/IPropertyBagHolder.cs | 2 +- src/Sarif/Core/PropertyBagHolder.cs | 2 -- src/Sarif/Core/SarifLog.cs | 2 -- src/Sarif/Core/SerializedPropertyInfo.cs | 1 - src/Sarif/ExtensionMethods.cs | 6 +++--- src/Sarif/ExternalProcess.cs | 2 +- src/Sarif/FileRegionsCache.cs | 2 +- src/Sarif/GlobalSuppressions.cs | 2 +- src/Sarif/IConsoleCapture.cs | 2 +- src/Sarif/IOption.cs | 1 + src/Sarif/IOptionsProvider.cs | 2 +- src/Sarif/IntegerSet.cs | 1 - src/Sarif/NotYetAutoGenerated/Address.cs | 4 +--- src/Sarif/NotYetAutoGenerated/Invocation.cs | 4 +--- .../ReportingConfiguration.cs | 4 +--- .../NotYetAutoGenerated/ReportingDescriptor.cs | 4 +--- src/Sarif/NotYetAutoGenerated/Result.cs | 4 +--- src/Sarif/NotYetAutoGenerated/Run.cs | 4 +--- src/Sarif/NotYetAutoGenerated/SarifLog.cs | 4 +--- src/Sarif/Notes.cs | 2 +- src/Sarif/PerLanguageOption.cs | 2 +- .../Processors/Log/SarifLogExtensionMethods.cs | 4 ++-- src/Sarif/Processors/Log/SarifLogPipeline.cs | 1 - src/Sarif/Properties/AssemblyInfo.cs | 2 +- src/Sarif/PropertiesDictionary.cs | 1 - src/Sarif/Readers/DateTimeConverter.cs | 1 - .../Readers/DeferredDictionaryConverter.cs | 1 - src/Sarif/Readers/DeferredListConverter.cs | 1 - src/Sarif/Readers/EnumConverter.cs | 1 - src/Sarif/Readers/JsonPositionedTextReader.cs | 1 - src/Sarif/Readers/LineMappingStreamReader.cs | 6 +++--- src/Sarif/Readers/PropertyBagConverter.cs | 2 +- src/Sarif/Readers/SarifContractResolver.cs | 1 - .../Readers/SarifDeferredContractResolver.cs | 1 - src/Sarif/Readers/SarifVersionConverter.cs | 1 - src/Sarif/Readers/UriConverter.cs | 3 +-- src/Sarif/RuleUtilities.cs | 2 +- src/Sarif/SplittingStrategy.cs | 2 +- src/Sarif/StringSet.cs | 1 - src/Sarif/TypedPropertiesDictionary.cs | 1 - src/Sarif/TypedPropertiesDictionaryConverter.cs | 1 - src/Sarif/VersionConstants.cs | 2 +- .../Autogenerated/AlgorithmKindVersionOne.cs | 2 +- ...AnnotatedCodeLocationImportanceVersionOne.cs | 2 +- .../AnnotatedCodeLocationKindVersionOne.cs | 2 +- .../AnnotatedCodeLocationVersionOne.cs | 3 +-- ...tedCodeLocationVersionOneEqualityComparer.cs | 2 +- .../Autogenerated/AnnotationVersionOne.cs | 2 +- .../AnnotationVersionOneEqualityComparer.cs | 2 +- .../Autogenerated/BaselineStateVersionOne.cs | 2 +- .../Autogenerated/CodeFlowVersionOne.cs | 2 +- .../CodeFlowVersionOneEqualityComparer.cs | 2 +- .../Autogenerated/ExceptionDataVersionOne.cs | 2 +- .../ExceptionDataVersionOneEqualityComparer.cs | 2 +- .../Autogenerated/FileChangeVersionOne.cs | 2 +- .../FileChangeVersionOneEqualityComparer.cs | 2 +- .../Autogenerated/FileDataVersionOne.cs | 2 +- .../FileDataVersionOneEqualityComparer.cs | 2 +- .../VersionOne/Autogenerated/FixVersionOne.cs | 2 +- .../FixVersionOneEqualityComparer.cs | 2 +- .../FormattedRuleMessageVersionOne.cs | 2 +- ...ttedRuleMessageVersionOneEqualityComparer.cs | 2 +- .../VersionOne/Autogenerated/HashVersionOne.cs | 2 +- .../HashVersionOneEqualityComparer.cs | 2 +- .../Autogenerated/IRuleVersionOneVersionOne.cs | 2 +- .../ISarifNodeVersionOneVersionOne.cs | 2 +- .../Autogenerated/InvocationVersionOne.cs | 2 +- .../InvocationVersionOneEqualityComparer.cs | 2 +- .../Autogenerated/LocationVersionOne.cs | 2 +- .../LocationVersionOneEqualityComparer.cs | 2 +- .../Autogenerated/LogicalLocationVersionOne.cs | 2 +- ...LogicalLocationVersionOneEqualityComparer.cs | 2 +- .../NotificationLevelVersionOne.cs | 2 +- .../Autogenerated/NotificationVersionOne.cs | 2 +- .../NotificationVersionOneEqualityComparer.cs | 2 +- .../Autogenerated/PhysicalLocationVersionOne.cs | 2 +- ...hysicalLocationVersionOneEqualityComparer.cs | 2 +- .../Autogenerated/RegionVersionOne.cs | 2 +- .../RegionVersionOneEqualityComparer.cs | 2 +- .../Autogenerated/ReplacementVersionOne.cs | 2 +- .../ReplacementVersionOneEqualityComparer.cs | 2 +- .../Autogenerated/ResultLevelVersionOne.cs | 2 +- .../Autogenerated/ResultVersionOne.cs | 2 +- .../ResultVersionOneEqualityComparer.cs | 2 +- .../RuleConfigurationVersionOne.cs | 2 +- .../VersionOne/Autogenerated/RuleVersionOne.cs | 2 +- .../RuleVersionOneEqualityComparer.cs | 2 +- .../VersionOne/Autogenerated/RunVersionOne.cs | 2 +- .../RunVersionOneEqualityComparer.cs | 2 +- .../Autogenerated/SarifLogVersionOne.cs | 2 +- .../SarifLogVersionOneEqualityComparer.cs | 2 +- .../SarifNodeKindVersionOneVersionOne.cs | 2 +- .../SarifRewritingVisitorVersionOne.cs | 2 +- .../Autogenerated/SarifVersionVersionOne.cs | 2 +- .../Autogenerated/StackFrameVersionOne.cs | 2 +- .../StackFrameVersionOneEqualityComparer.cs | 2 +- .../VersionOne/Autogenerated/StackVersionOne.cs | 2 +- .../StackVersionOneEqualityComparer.cs | 2 +- .../SuppressionStatesVersionOne.cs | 2 +- .../Autogenerated/TaintKindVersionOne.cs | 2 +- .../VersionOne/Autogenerated/ToolVersionOne.cs | 2 +- .../ToolVersionOneEqualityComparer.cs | 2 +- .../Core/IPropertyBagHolderVersionOne.cs | 2 +- .../Core/PropertyBagHolderVersionOne.cs | 2 -- .../Readers/AnnotatedCodeLocationIdConverter.cs | 1 - .../Readers/SarifContractResolverVersionOne.cs | 2 -- .../VersionOne/SarifUtilitiesVersionOne.cs | 1 - src/Sarif/Visitors/FilteringVisitor.cs | 1 + src/Sarif/Visitors/PartitioningVisitor.cs | 2 +- .../Visitors/SarifCurrentToVersionOneVisitor.cs | 2 -- src/Sarif/Visitors/SarifTransformerUtilities.cs | 4 +--- .../Visitors/SarifVersionOneToCurrentVisitor.cs | 2 -- src/Sarif/Visitors/UnknownEncodingException.cs | 2 +- .../UpdateIndicesFromLegacyDataVisitor.cs | 2 +- ...alLocationKeyToLogicalLocationDataVisitor.cs | 1 - src/Sarif/Warnings.cs | 2 +- .../PrereleaseCompatibilityTransformer.cs | 4 +--- src/Sarif/Writers/ResultLogJsonWriter.cs | 3 +-- src/Sarif/Writers/SarifLogger.cs | 3 +-- src/Sarif/Writers/SarifOneZeroZeroLogger.cs | 2 -- src/Sarif/Writers/SarifPartitioner.cs | 1 - src/Shared/CommonAssemblyInfo.cs | 1 + .../BaseliningDetailLogger.cs | 2 +- .../Extensions/ResultTextFormatter.cs | 2 +- src/Test.EndToEnd.Baselining/Program.cs | 4 ++-- .../DefaultObjectPopulatingVisitor.cs | 3 +-- .../Multitool/ValidateCommandTests.cs | 4 ++-- .../MultitoolCommandLineTests.cs | 2 -- .../PropertyBagConverterTests.cs | 3 --- .../SarifConverterTests.cs | 3 --- .../SarifLogEqualityComparerTests.cs | 4 ---- .../SarifValidatorTests.cs | 4 ---- .../Writers/FilterByPredicateTests.cs | 3 --- .../Writers/PartitionTests.cs | 4 ---- .../FortifyFpr/src/ContentFileViewModel.cs | 2 +- .../ContentFileHandlingController.cs | 2 +- .../FortifyFpr/src/DocumentValidator.cs | 2 +- .../TestWorkItemModelTransformer.cs | 1 - .../AndroidStudioConverterTests.cs | 2 -- .../AndroidStudioProblemTests.cs | 3 --- .../AndroidStudioStringsTests.cs | 1 - .../BuiltinConverterFactoryTests.cs | 2 -- .../ClangAnalyzerConverterTests.cs | 8 ++++++-- .../ConverterTestsBase.cs | 2 -- .../CppCheckConverterTests.cs | 3 --- .../CppCheckErrorTests.cs | 2 -- .../CppCheckLocationTests.cs | 2 -- .../CppCheckStringsTests.cs | 1 - .../FlawFinderCsvConverterTests.cs | 4 ---- .../FortifyConverterTests.cs | 2 -- .../FortifyFprConverterTests.cs | 2 -- .../FortifyFprStringsTests.cs | 1 - .../FortifyIssueTests.cs | 2 -- .../FortifyPathElementTests.cs | 1 - .../FortifyStringsTests.cs | 1 - .../FxCopConverterTests.cs | 2 -- .../PylintConverterTests.cs | 4 ---- .../TSLintConverterTests.cs | 4 ---- .../TSLintLogReaderTests.cs | 4 ---- .../ToolFileConverterBaseTests.cs | 2 -- .../ToolFormatConverterTests.cs | 3 --- .../DriverExtensionMethodsTests.cs | 3 --- .../DriverUtilitiesTests.cs | 3 --- .../FileSpecifierTests.cs | 2 -- .../FunctionlessTestRule.cs | 1 - .../Sdk/AnalyzeCommandBaseTests.cs | 7 +------ .../Sdk/DriverSdkExtensionsTests.cs | 3 --- .../Sdk/EntryPointUtilitiesTests.cs | 1 - .../Sdk/ExportConfigurationCommandBaseTests.cs | 1 - .../Sdk/FormatForVisualStudioTests.cs | 3 --- .../Sdk/RuleUtilitiesTests.cs | 2 -- .../Sdk/SarifLoggerTests.cs | 3 --- .../Sdk/SkimmerBaseTests.cs | 3 --- .../Sdk/TestSkimmerBase.cs | 1 - .../SkimmerIdComparerTests.cs | 2 -- src/Test.UnitTests.Sarif.Driver/TestRule.cs | 2 -- .../TestRuleBehaviors.cs | 2 +- .../ConvertCommandTests.cs | 6 +----- ...tValidationRulesDocumentationCommandTests.cs | 5 +---- .../GenericCommandTests.cs | 1 - .../MergeCommandTests.cs | 3 --- .../PageCommandTests.cs | 4 ---- .../QueryCommandTests.cs | 2 -- .../RebaseUriCommandTests.cs | 11 +++++------ .../Rules/SarifValidationSkimmerBaseTests.cs | 3 --- .../TransformCommandTests.cs | 5 ----- .../ValidateCommandTests.cs | 4 ---- .../FileWorkItemsCommandTests.cs | 2 -- .../SarifWorkItemExtensionsTests.cs | 11 ++++------- .../SarifWorkItemFilerTests.cs | 16 +++++----------- .../SarifWorkItemFilingContextTests.cs | 3 --- .../SarifWorkItemModelTests.cs | 2 -- .../Baseline/DefaultBaselineUnitTests.cs | 2 -- .../FullFingerprintMatcherTests.cs | 2 -- .../IdenticalResultMatcherTests.cs | 2 -- .../ContextRegionResultMatcherTests.cs | 2 -- .../PartialFingerprintResultMatcherTests.cs | 2 -- .../ResultMatchingBaselinerTests.cs | 2 -- .../SarifLogResultMatcherTests.cs | 2 -- .../Baseline/StrictBaselineUnitTests.cs | 2 -- .../Baseline2/ExtractedResultTests.cs | 3 --- .../Baseline2/OverallBaseliningTests.cs | 1 - .../Baseline2/TrustMapTests.cs | 2 -- .../Baseline2/WhatComparerTests.cs | 3 --- .../Baseline2/WhereComparerTests.cs | 3 --- src/Test.UnitTests.Sarif/CacheTests.cs | 1 - src/Test.UnitTests.Sarif/ConsoleLoggerTests.cs | 3 --- .../Core/ArtifactLocationTests.cs | 3 --- src/Test.UnitTests.Sarif/Core/ArtifactTests.cs | 7 +------ .../Core/FileLocationTests.cs | 2 -- .../Core/InvocationTests.cs | 2 -- src/Test.UnitTests.Sarif/Core/LocationTests.cs | 2 -- .../Core/PropertyBagHolderTests.cs | 4 ---- src/Test.UnitTests.Sarif/Core/RegionTests.cs | 4 +--- src/Test.UnitTests.Sarif/Core/ResultTests.cs | 2 -- src/Test.UnitTests.Sarif/Core/RunTests.cs | 4 ---- src/Test.UnitTests.Sarif/Core/SarifLogTests.cs | 2 -- src/Test.UnitTests.Sarif/Core/StackTests.cs | 3 --- src/Test.UnitTests.Sarif/Core/TagsTests.cs | 2 -- src/Test.UnitTests.Sarif/Core/ToolTests.cs | 2 -- .../Core/WebMessageUtilitiesTests.cs | 3 --- .../Core/WebRequestTests.cs | 5 +---- .../Core/WebResponseTests.cs | 3 --- src/Test.UnitTests.Sarif/ExtensionsTests.cs | 3 --- .../FileRegionsCacheTests.cs | 2 -- src/Test.UnitTests.Sarif/GitHelperTests.cs | 3 --- src/Test.UnitTests.Sarif/JsonTests.cs | 4 +--- .../Map/JsonMapBuilderTests.cs | 1 - .../Map/LongArrayDeltaConverterTests.cs | 2 -- src/Test.UnitTests.Sarif/MockFactory.cs | 1 - .../OrderSensitiveValueComparisonListTests.cs | 4 +--- .../GenericTests/GenericProcessorTests.cs | 2 -- .../Log/LogPipelineSerializationTests.cs | 3 --- .../Processors/Log/MergeStageTests.cs | 2 -- .../Processors/Log/RebaseUriStageTests.cs | 2 -- .../Processors/Log/SarifLogExtensionTests.cs | 3 --- .../PropertiesDictionaryTests.cs | 2 -- .../Query/EvaluatorTests.cs | 2 -- .../Query/StringSliceTests.cs | 2 -- .../RandomSarifLogGenerator.cs | 1 - .../Readers/DeferredCollectionsTests.cs | 3 --- .../Readers/EnumConverterTests.cs | 2 +- .../IsSuppressedInSourceConverterTests.cs | 3 --- .../Readers/LineMappingStreamReaderTests.cs | 3 --- .../Readers/PropertyBagConverterTests.cs | 3 --- .../Readers/ResultDiffingVisitorTests.cs | 1 - .../Readers/SampleModel/LogModel.cs | 1 - src/Test.UnitTests.Sarif/RoundTrippingTests.cs | 3 --- .../SarifExtensionsTests.cs | 3 +-- src/Test.UnitTests.Sarif/SarifUtilitiesTests.cs | 8 ++++---- src/Test.UnitTests.Sarif/ToolFormatTests.cs | 1 - src/Test.UnitTests.Sarif/UriConverterTests.cs | 4 ---- ...xtractAllArtifactionLocationsVisitorTests.cs | 3 --- .../Visitors/GitHubIngestionVisitorTests.cs | 1 - .../Visitors/InsertOptionalDataVisitorTests.cs | 5 +---- .../Visitors/MakeUriAbsoluteVisitorTest.cs | 2 -- .../PerRunPerRuleSplittingVisitorTests.cs | 3 --- .../Visitors/RebaseUriVisitorTests.cs | 4 ---- .../Visitors/RemapIndicesVisitorTests.cs | 12 ++++++------ .../Visitors/RemoveOptionalDataVisitorTests.cs | 6 ++---- .../SarifCurrentToVersionOneVisitorTests.cs | 4 +--- .../SarifVersionOneToCurrentVisitorTests.cs | 2 -- .../UpdateIndicesFromLegacyDataVisitorTests.cs | 2 -- src/Test.UnitTests.Sarif/WarningsTests.cs | 1 - .../Writers/MimeTypeTests.cs | 1 - .../PrereleaseCompatibilityTransformerTests.cs | 2 -- .../Writers/ResultLogJsonWriterTests.cs | 3 --- .../Writers/SarifConsolidatorTests.cs | 2 -- .../Writers/SarifLoggerTests.cs | 4 ---- .../FilingClientFactoryTests.cs | 2 -- ...licationInsightsTelemetryInitializerTests.cs | 3 --- .../Logging/MetricsLogValuesTests.cs | 3 --- .../ServiceProviderFactoryTests.cs | 2 -- src/Test.Utilities.Sarif/AssertionExtensions.cs | 2 -- .../FileDiffingFunctionalTests.cs | 1 - .../FileDiffingUnitTests.cs | 4 ---- src/Test.Utilities.Sarif/TestData.cs | 3 +-- src/Test.Utilities.Sarif/TestMessageLogger.cs | 2 +- src/Test.Utilities.Sarif/Utilities.cs | 2 -- src/WorkItems/AzureDevOpsFilingClient.cs | 2 -- src/WorkItems/FilingClient.cs | 3 +-- src/WorkItems/GitHubClientWrapper.cs | 3 +-- src/WorkItems/GitHubConnectionFacade.cs | 4 +--- src/WorkItems/GitHubFilingClient.cs | 3 +-- src/WorkItems/IGitHubClientWrapper.cs | 5 ++--- src/WorkItems/IGitHubConnection.cs | 5 ++--- src/WorkItems/IVssConnection.cs | 4 ++-- src/WorkItems/IWorkItemModelTransformer.cs | 2 +- src/WorkItems/IWorkItemTrackingHttpClient.cs | 17 ++++++++--------- .../ApplicationInsightsTelemetryInitializer.cs | 1 - src/WorkItems/Logging/AssemblyExtensions.cs | 1 - src/WorkItems/Logging/LoggerExtensions.cs | 13 ++++++------- src/WorkItems/Logging/LoggingContext.cs | 1 - src/WorkItems/Logging/MetricsLogValues.cs | 1 - src/WorkItems/Properties/AssemblyInfo.cs | 2 +- src/WorkItems/ServiceProviderFactory.cs | 1 - src/WorkItems/VssConnectionFacade.cs | 3 +-- .../WorkItemTrackingHttpClientWrapper.cs | 11 +++++------ 516 files changed, 409 insertions(+), 1035 deletions(-) diff --git a/src/.editorconfig b/src/.editorconfig index e95d59ec5..7d068c4b5 100644 --- a/src/.editorconfig +++ b/src/.editorconfig @@ -13,13 +13,13 @@ tab_width = 4 # New line preferences end_of_line = crlf -insert_final_newline = true +insert_final_newline = false #### .NET Coding Conventions #### # Organize usings -dotnet_separate_import_directive_groups = true -dotnet_sort_system_directives_first = true +dotnet_separate_import_directive_groups = true:error +dotnet_sort_system_directives_first = true:error # this. and Me. preferences dotnet_style_qualification_for_field = true:silent diff --git a/src/Samples/Sarif.Sdk.Sample/Program.cs b/src/Samples/Sarif.Sdk.Sample/Program.cs index 815297063..6059af015 100644 --- a/src/Samples/Sarif.Sdk.Sample/Program.cs +++ b/src/Samples/Sarif.Sdk.Sample/Program.cs @@ -5,12 +5,9 @@ using System.Collections.Generic; using System.IO; using System.Text; - using CommandLine; - using Microsoft.CodeAnalysis.Sarif; using Microsoft.CodeAnalysis.Sarif.Writers; - using Newtonsoft.Json; namespace Sarif.Sdk.Sample diff --git a/src/Samples/Sarif.WorkItems.Sample/Program.cs b/src/Samples/Sarif.WorkItems.Sample/Program.cs index 57f98f194..1f156969f 100644 --- a/src/Samples/Sarif.WorkItems.Sample/Program.cs +++ b/src/Samples/Sarif.WorkItems.Sample/Program.cs @@ -5,11 +5,9 @@ using System.Collections.Generic; using System.Diagnostics; using System.IO; - using Microsoft.CodeAnalysis.Sarif; using Microsoft.CodeAnalysis.Sarif.Baseline; using Microsoft.CodeAnalysis.Sarif.WorkItemFiling; - using Newtonsoft.Json; namespace Sarif.WorkItems.Sample diff --git a/src/Samples/SarifDeferredSample/Program.cs b/src/Samples/SarifDeferredSample/Program.cs index 3b2fd3022..549265427 100644 --- a/src/Samples/SarifDeferredSample/Program.cs +++ b/src/Samples/SarifDeferredSample/Program.cs @@ -1,11 +1,9 @@ -using System; -using System.Diagnostics; -using System.IO; - -using Microsoft.CodeAnalysis.Sarif; +using Microsoft.CodeAnalysis.Sarif; using Microsoft.CodeAnalysis.Sarif.Readers; - using Newtonsoft.Json; +using System; +using System.Diagnostics; +using System.IO; namespace SarifDeferredSample { @@ -20,7 +18,7 @@ private static void Main(string[] args) { bool deferred = bool.Parse(args[0]); string filePath = args[1]; - + SarifLog log = null; Console.WriteLine($"Loading {filePath}{(deferred ? " (deferred)" : "")}..."); @@ -87,7 +85,7 @@ private static void Main(string[] args) // uriLengthTotal += file?.ArtifactLocation?.Uri?.OriginalString?.Length ?? 0; // fileCount++; //} - } + } return $"Enumerated {fileCount:n0} Files, URI total {uriLengthTotal / BytesPerMB:n0}MB."; }); diff --git a/src/Samples/SarifToCsv/CsvWriter.cs b/src/Samples/SarifToCsv/CsvWriter.cs index d705910cc..1bb51450a 100644 --- a/src/Samples/SarifToCsv/CsvWriter.cs +++ b/src/Samples/SarifToCsv/CsvWriter.cs @@ -193,4 +193,4 @@ public void Dispose() } } } -} +} \ No newline at end of file diff --git a/src/Samples/SarifToCsv/Program.cs b/src/Samples/SarifToCsv/Program.cs index 40b26b444..57dfe4948 100644 --- a/src/Samples/SarifToCsv/Program.cs +++ b/src/Samples/SarifToCsv/Program.cs @@ -150,4 +150,4 @@ private static string ValueOrDefault(string value, string defaultValue) return String.IsNullOrEmpty(value) ? defaultValue : value; } } -} +} \ No newline at end of file diff --git a/src/Samples/SarifToCsv/SarifCsvColumnWriters.cs b/src/Samples/SarifToCsv/SarifCsvColumnWriters.cs index 9344a33d2..bbd43c48e 100644 --- a/src/Samples/SarifToCsv/SarifCsvColumnWriters.cs +++ b/src/Samples/SarifToCsv/SarifCsvColumnWriters.cs @@ -7,7 +7,6 @@ using System.Text; using Microsoft.CodeAnalysis.Sarif; - using Newtonsoft.Json; namespace SarifToCsv @@ -68,7 +67,7 @@ public static Action GetWriter(string columnName) { value = ""; } - + c.Writer.Write(value); }; } diff --git a/src/Samples/SarifToCsv/SdkExtensions.cs b/src/Samples/SarifToCsv/SdkExtensions.cs index 285c54145..ba85d7bea 100644 --- a/src/Samples/SarifToCsv/SdkExtensions.cs +++ b/src/Samples/SarifToCsv/SdkExtensions.cs @@ -43,4 +43,4 @@ public static string FileUri(this ArtifactLocation artifactLocation, Run run) } } } -} +} \ No newline at end of file diff --git a/src/Sarif.Converters/AndroidStudioConverter.cs b/src/Sarif.Converters/AndroidStudioConverter.cs index cbba397a4..1661f0574 100644 --- a/src/Sarif.Converters/AndroidStudioConverter.cs +++ b/src/Sarif.Converters/AndroidStudioConverter.cs @@ -278,4 +278,4 @@ private static bool RemoveBadRoot(string path, out Uri uri) return removedBadRoot; } } -} +} \ No newline at end of file diff --git a/src/Sarif.Converters/ClangAnalyzerConverter.cs b/src/Sarif.Converters/ClangAnalyzerConverter.cs index e28ef8e53..ddf8581b8 100644 --- a/src/Sarif.Converters/ClangAnalyzerConverter.cs +++ b/src/Sarif.Converters/ClangAnalyzerConverter.cs @@ -443,4 +443,4 @@ private static class ClangSchemaStrings public const string VersionName = "version"; } } -} +} \ No newline at end of file diff --git a/src/Sarif.Converters/ContrastSecurityConverter.cs b/src/Sarif.Converters/ContrastSecurityConverter.cs index d9868d219..05c66b870 100644 --- a/src/Sarif.Converters/ContrastSecurityConverter.cs +++ b/src/Sarif.Converters/ContrastSecurityConverter.cs @@ -11,9 +11,7 @@ using System.Text; using System.Text.RegularExpressions; using System.Xml; - using Microsoft.CodeAnalysis.Sarif.Writers; - using Newtonsoft.Json; using Newtonsoft.Json.Linq; @@ -1686,4 +1684,4 @@ private void ReadProps(SparseReader reader, object parent) _readingProps = false; } } -} +} \ No newline at end of file diff --git a/src/Sarif.Converters/FlawFinderCsvConverter.cs b/src/Sarif.Converters/FlawFinderCsvConverter.cs index 901664f0a..168d652c3 100644 --- a/src/Sarif.Converters/FlawFinderCsvConverter.cs +++ b/src/Sarif.Converters/FlawFinderCsvConverter.cs @@ -6,7 +6,6 @@ using System.Globalization; using System.IO; using System.Linq; - using CsvHelper; namespace Microsoft.CodeAnalysis.Sarif.Converters @@ -27,7 +26,7 @@ public override void Convert(Stream input, IResultLogWriter output, OptionallyEm IList flawFinderCsvResults = csvReader.GetRecords().ToList(); - IList rules = ExtractRules(flawFinderCsvResults); + IList rules = ExtractRules(flawFinderCsvResults); IList results = ExtractResults(flawFinderCsvResults); var run = new Run @@ -135,6 +134,6 @@ private static Region RegionFromFlawFinderCsvResult(FlawFinderCsvResult flawFind }; private static FailureLevel SarifLevelFromFlawFinderLevel(int flawFinderLevel) => - flawFinderLevel < 4 ? FailureLevel.Warning : FailureLevel.Error; + flawFinderLevel< 4 ? FailureLevel.Warning : FailureLevel.Error; } } diff --git a/src/Sarif.Converters/FortifyFprConverter.cs b/src/Sarif.Converters/FortifyFprConverter.cs index 6c6df9527..9804d33f6 100644 --- a/src/Sarif.Converters/FortifyFprConverter.cs +++ b/src/Sarif.Converters/FortifyFprConverter.cs @@ -32,7 +32,7 @@ internal class FortifyFprConverter : ToolFileConverterBase "LastTraceLocation.file", "LastTraceLocation.line", "PrimaryCall.name", - "PrimaryLocation.file", + "PrimaryLocation.file", "PrimaryLocation.line", "PrimaryTransitionFunction.name", "SinkFunction", @@ -600,7 +600,7 @@ private string NormalizeGuid(string guid) private static string RemoveSpaces(string ruleComponent) { - Tuple[] lowercasedTokens = new[] + Tuple[] lowercasedTokens = new [] { new Tuple(" in ", " In "), new Tuple(" true ", " True "), @@ -608,10 +608,10 @@ private static string RemoveSpaces(string ruleComponent) new Tuple(" against ", " Against "), }; - foreach (Tuple lowercasedToken in lowercasedTokens) + foreach(Tuple lowercasedToken in lowercasedTokens) { ruleComponent = ruleComponent.Replace(lowercasedToken.Item1, lowercasedToken.Item2); - } + } return ruleComponent.Replace(" ", ""); } @@ -1009,7 +1009,7 @@ private void ParseRuleDescriptions() private void ParseEngineVersion() { - _engineVersion = _reader.ReadElementContentAsString(); + _engineVersion = _reader.ReadElementContentAsString(); } private void ParseNodes() @@ -1195,7 +1195,7 @@ private void ParseCommandLine() _invocation.CommandLine = sb.ToString(); } - + private void ParseErrors() { // Despite being expressed as XML elements named , these messages @@ -1326,7 +1326,7 @@ private void AddMessagesToResult(Result result) else { // Replace the token with plain text. - messageText = messageText.Replace(string.Format(ReplacementTokenFormat, key), "'" + value + "'"); + messageText = messageText.Replace(string.Format(ReplacementTokenFormat, key), "'"+ value + "'"); } } } @@ -1417,4 +1417,4 @@ public Node(ThreadFlowLocation tfl, string snippetId) } } } -} +} \ No newline at end of file diff --git a/src/Sarif.Converters/FortifyIssue.cs b/src/Sarif.Converters/FortifyIssue.cs index fbc8479b5..3068f8520 100644 --- a/src/Sarif.Converters/FortifyIssue.cs +++ b/src/Sarif.Converters/FortifyIssue.cs @@ -228,3 +228,4 @@ public static ImmutableArray ParseCweIds(string cweIdSource) } } } + diff --git a/src/Sarif.Converters/FortifyUtilities.cs b/src/Sarif.Converters/FortifyUtilities.cs index eb0fece86..08e155960 100644 --- a/src/Sarif.Converters/FortifyUtilities.cs +++ b/src/Sarif.Converters/FortifyUtilities.cs @@ -47,10 +47,10 @@ internal static string ParseFormattedContentText(string content) content = Regex.Replace(content, pattern, FormattedTextReplacements[pattern], RegexOptions.Compiled); } - foreach (Match match in s_replaceKeyRegex.Matches(content)) + foreach(Match match in s_replaceKeyRegex.Matches(content)) { string key = match.Groups[1].Value; - content = content.Replace(string.Format(ReplacementTokenFormat, key), "{" + key + "}"); + content = content.Replace(string.Format(ReplacementTokenFormat, key), "{"+ key + "}"); } return content.Trim(new[] { '\r', '\n', ' ' }); diff --git a/src/Sarif.Converters/FxCopConverter.cs b/src/Sarif.Converters/FxCopConverter.cs index 877b38f20..01864effa 100644 --- a/src/Sarif.Converters/FxCopConverter.cs +++ b/src/Sarif.Converters/FxCopConverter.cs @@ -1083,4 +1083,4 @@ internal static string MakeExceptionMessage(string kind, string checkId, string } } } -} +} \ No newline at end of file diff --git a/src/Sarif.Converters/GlobalSuppressions.cs b/src/Sarif.Converters/GlobalSuppressions.cs index 0143fc3de..2f12d709c 100644 --- a/src/Sarif.Converters/GlobalSuppressions.cs +++ b/src/Sarif.Converters/GlobalSuppressions.cs @@ -10,4 +10,4 @@ [module: SuppressMessage("Microsoft.Security.Xml", "CA3053:UseXmlSecureResolver", Scope = "member", Target = "Microsoft.CodeAnalysis.Sarif.Converters.FortifyFprConverter.#ParseAuditStream(System.IO.Stream)")] [module: SuppressMessage("Microsoft.Security.Xml", "CA3053:UseXmlSecureResolver", Scope = "member", Target = "Microsoft.CodeAnalysis.Sarif.Converters.FxCopLogReader.#Read(Microsoft.CodeAnalysis.Sarif.Converters.FxCopLogReader+Context,System.IO.Stream)")] [module: SuppressMessage("Microsoft.Security.Xml", "CA3053:UseXmlSecureResolver", Scope = "member", Target = "Microsoft.CodeAnalysis.Sarif.Converters.PREfastConverter.#Convert(System.IO.Stream,Microsoft.CodeAnalysis.Sarif.IResultLogWriter,Microsoft.CodeAnalysis.Sarif.Writers.LoggingOptions)")] -[module: SuppressMessage("Microsoft.Security.Xml", "CA3053:UseXmlSecureResolver", Scope = "member", Target = "Microsoft.CodeAnalysis.Sarif.Converters.SparseReader.#CreateFromStream(Microsoft.CodeAnalysis.Sarif.Converters.SparseReaderDispatchTable,System.IO.Stream,System.Xml.Schema.XmlSchemaSet)")] +[module: SuppressMessage("Microsoft.Security.Xml", "CA3053:UseXmlSecureResolver", Scope = "member", Target = "Microsoft.CodeAnalysis.Sarif.Converters.SparseReader.#CreateFromStream(Microsoft.CodeAnalysis.Sarif.Converters.SparseReaderDispatchTable,System.IO.Stream,System.Xml.Schema.XmlSchemaSet)")] \ No newline at end of file diff --git a/src/Sarif.Converters/LogReader.cs b/src/Sarif.Converters/LogReader.cs index cff8d054a..377cdc5ff 100644 --- a/src/Sarif.Converters/LogReader.cs +++ b/src/Sarif.Converters/LogReader.cs @@ -20,4 +20,4 @@ public TLog ReadLog(string input, Encoding encoding) public abstract TLog ReadLog(Stream input); } -} +} \ No newline at end of file diff --git a/src/Sarif.Converters/MSBuildConverter.cs b/src/Sarif.Converters/MSBuildConverter.cs index 63f4b5396..e27b546e7 100644 --- a/src/Sarif.Converters/MSBuildConverter.cs +++ b/src/Sarif.Converters/MSBuildConverter.cs @@ -287,4 +287,4 @@ private static Region GetRegionFrom(string regionString) return region; } } -} +} \ No newline at end of file diff --git a/src/Sarif.Converters/Properties/AssemblyInfo.cs b/src/Sarif.Converters/Properties/AssemblyInfo.cs index 3fd1bec8e..f14fe0b91 100644 --- a/src/Sarif.Converters/Properties/AssemblyInfo.cs +++ b/src/Sarif.Converters/Properties/AssemblyInfo.cs @@ -1,2 +1,2 @@ // Copyright (c) Microsoft. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. \ No newline at end of file diff --git a/src/Sarif.Converters/PylintConverter.cs b/src/Sarif.Converters/PylintConverter.cs index fcca17e42..9d65b4aa0 100644 --- a/src/Sarif.Converters/PylintConverter.cs +++ b/src/Sarif.Converters/PylintConverter.cs @@ -4,7 +4,6 @@ using System; using System.Collections.Generic; using System.IO; - using Microsoft.CodeAnalysis.Sarif.Converters.PylintObjectModel; namespace Microsoft.CodeAnalysis.Sarif.Converters diff --git a/src/Sarif.Converters/PylintObjectModel/PylintLog.cs b/src/Sarif.Converters/PylintObjectModel/PylintLog.cs index 9761a5b9d..48a50b5e8 100644 --- a/src/Sarif.Converters/PylintObjectModel/PylintLog.cs +++ b/src/Sarif.Converters/PylintObjectModel/PylintLog.cs @@ -8,4 +8,4 @@ namespace Microsoft.CodeAnalysis.Sarif.Converters.PylintObjectModel public class PylintLog : List { } -} +} \ No newline at end of file diff --git a/src/Sarif.Converters/PylintObjectModel/PylintLogReader.cs b/src/Sarif.Converters/PylintObjectModel/PylintLogReader.cs index f1c6cd677..c6f36b08a 100644 --- a/src/Sarif.Converters/PylintObjectModel/PylintLogReader.cs +++ b/src/Sarif.Converters/PylintObjectModel/PylintLogReader.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.IO; - using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.Converters.PylintObjectModel @@ -21,4 +20,4 @@ public override PylintLog ReadLog(Stream input) return JsonConvert.DeserializeObject(pylintText); } } -} +} \ No newline at end of file diff --git a/src/Sarif.Converters/SparseReader.cs b/src/Sarif.Converters/SparseReader.cs index a9515d5d7..c3a964eb6 100644 --- a/src/Sarif.Converters/SparseReader.cs +++ b/src/Sarif.Converters/SparseReader.cs @@ -342,4 +342,4 @@ private void ReadEndElement(string expectedTagName) _xmlReader.MoveToContent(); } } -} +} \ No newline at end of file diff --git a/src/Sarif.Converters/TSLintConverter.cs b/src/Sarif.Converters/TSLintConverter.cs index 9d7edfebb..de2ba26f0 100644 --- a/src/Sarif.Converters/TSLintConverter.cs +++ b/src/Sarif.Converters/TSLintConverter.cs @@ -5,7 +5,6 @@ using System.Collections.Generic; using System.IO; using System.Linq; - using Microsoft.CodeAnalysis.Sarif.Converters.TSLintObjectModel; namespace Microsoft.CodeAnalysis.Sarif.Converters diff --git a/src/Sarif.Converters/TSLintLogReader.cs b/src/Sarif.Converters/TSLintLogReader.cs index 8a5d4cd51..f2ae7b471 100644 --- a/src/Sarif.Converters/TSLintLogReader.cs +++ b/src/Sarif.Converters/TSLintLogReader.cs @@ -8,9 +8,7 @@ using System.Runtime.Serialization; using System.Runtime.Serialization.Json; using System.Text; - using Microsoft.CodeAnalysis.Sarif.Converters.TSLintObjectModel; - using Newtonsoft.Json; using Newtonsoft.Json.Linq; diff --git a/src/Sarif.Converters/TextFormats/CsvReader.cs b/src/Sarif.Converters/TextFormats/CsvReader.cs index f615e954c..72e1087fc 100644 --- a/src/Sarif.Converters/TextFormats/CsvReader.cs +++ b/src/Sarif.Converters/TextFormats/CsvReader.cs @@ -145,4 +145,4 @@ private int NextCellEnd(bool quoted, out bool escapedQuotes) return i; } } -} +} \ No newline at end of file diff --git a/src/Sarif.Converters/ToolFileConverterBase.cs b/src/Sarif.Converters/ToolFileConverterBase.cs index e83cabfb4..4a5e98930 100644 --- a/src/Sarif.Converters/ToolFileConverterBase.cs +++ b/src/Sarif.Converters/ToolFileConverterBase.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.IO; - using Microsoft.CodeAnalysis.Sarif.Visitors; namespace Microsoft.CodeAnalysis.Sarif.Converters diff --git a/src/Sarif.Converters/ToolFormatConverter.cs b/src/Sarif.Converters/ToolFormatConverter.cs index 2f4897f7d..2fe7f42f0 100644 --- a/src/Sarif.Converters/ToolFormatConverter.cs +++ b/src/Sarif.Converters/ToolFormatConverter.cs @@ -3,9 +3,7 @@ using System; using System.IO; - using Microsoft.CodeAnalysis.Sarif.Writers; - using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.Converters diff --git a/src/Sarif.Driver/DriverExtensionMethods.cs b/src/Sarif.Driver/DriverExtensionMethods.cs index bad0b51f3..ddb63fd9f 100644 --- a/src/Sarif.Driver/DriverExtensionMethods.cs +++ b/src/Sarif.Driver/DriverExtensionMethods.cs @@ -3,7 +3,6 @@ using System; using System.Globalization; - using Microsoft.CodeAnalysis.Sarif.Writers; namespace Microsoft.CodeAnalysis.Sarif.Driver diff --git a/src/Sarif.Driver/DriverUtilities.cs b/src/Sarif.Driver/DriverUtilities.cs index 454e58422..5062ff78a 100644 --- a/src/Sarif.Driver/DriverUtilities.cs +++ b/src/Sarif.Driver/DriverUtilities.cs @@ -6,7 +6,6 @@ using System.Globalization; using System.Reflection; using System.Text; - using CommandLine; namespace Microsoft.CodeAnalysis.Sarif.Driver @@ -134,4 +133,4 @@ public static string GetOptionDescription(Type optionsType, string optionPropert return builder.ToString(); } } -} +} \ No newline at end of file diff --git a/src/Sarif.Driver/PathExtensions.cs b/src/Sarif.Driver/PathExtensions.cs index 000c9e0e1..030619419 100644 --- a/src/Sarif.Driver/PathExtensions.cs +++ b/src/Sarif.Driver/PathExtensions.cs @@ -166,4 +166,4 @@ private static void AddSlashes(char[] resultTemp, ref int resultIdx, int slashes } } } -} +} \ No newline at end of file diff --git a/src/Sarif.Driver/Properties/AssemblyInfo.cs b/src/Sarif.Driver/Properties/AssemblyInfo.cs index 3fd1bec8e..f14fe0b91 100644 --- a/src/Sarif.Driver/Properties/AssemblyInfo.cs +++ b/src/Sarif.Driver/Properties/AssemblyInfo.cs @@ -1,2 +1,2 @@ // Copyright (c) Microsoft. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. \ No newline at end of file diff --git a/src/Sarif.Driver/Sdk/AnalysisApplicability.cs b/src/Sarif.Driver/Sdk/AnalysisApplicability.cs index f939bef02..ed9d08419 100644 --- a/src/Sarif.Driver/Sdk/AnalysisApplicability.cs +++ b/src/Sarif.Driver/Sdk/AnalysisApplicability.cs @@ -9,4 +9,4 @@ public enum AnalysisApplicability NotApplicableToSpecifiedTarget, ApplicableToSpecifiedTarget } -} +} \ No newline at end of file diff --git a/src/Sarif.Driver/Sdk/AnalysisContext.cs b/src/Sarif.Driver/Sdk/AnalysisContext.cs index 302992530..f6d20eb1f 100644 --- a/src/Sarif.Driver/Sdk/AnalysisContext.cs +++ b/src/Sarif.Driver/Sdk/AnalysisContext.cs @@ -28,4 +28,4 @@ public class AnalysisContext : IAnalysisContext public void Dispose() { } } -} +} \ No newline at end of file diff --git a/src/Sarif.Driver/Sdk/AnalyzeCommandBase.cs b/src/Sarif.Driver/Sdk/AnalyzeCommandBase.cs index 2b4ed0d48..1b45d97b0 100644 --- a/src/Sarif.Driver/Sdk/AnalyzeCommandBase.cs +++ b/src/Sarif.Driver/Sdk/AnalyzeCommandBase.cs @@ -8,7 +8,6 @@ using System.Reflection; using System.Runtime.InteropServices; using System.Security; - using Microsoft.CodeAnalysis.Sarif.Writers; namespace Microsoft.CodeAnalysis.Sarif.Driver @@ -847,4 +846,4 @@ protected static void LogToolNotification( }); } } -} +} \ No newline at end of file diff --git a/src/Sarif.Driver/Sdk/AnalyzeOptionsBase.cs b/src/Sarif.Driver/Sdk/AnalyzeOptionsBase.cs index 7df714a51..2f9e1855f 100644 --- a/src/Sarif.Driver/Sdk/AnalyzeOptionsBase.cs +++ b/src/Sarif.Driver/Sdk/AnalyzeOptionsBase.cs @@ -85,4 +85,4 @@ public abstract class AnalyzeOptionsBase : CommonOptionsBase HelpText = "Omit redundant properties, producing a smaller but non-human-readable log.")] public bool Optimize { get; set; } } -} +} \ No newline at end of file diff --git a/src/Sarif.Driver/Sdk/CommonOptionsBase.cs b/src/Sarif.Driver/Sdk/CommonOptionsBase.cs index 033350b21..b26bbd135 100644 --- a/src/Sarif.Driver/Sdk/CommonOptionsBase.cs +++ b/src/Sarif.Driver/Sdk/CommonOptionsBase.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; - using CommandLine; namespace Microsoft.CodeAnalysis.Sarif.Driver @@ -57,4 +56,4 @@ public class CommonOptionsBase Default = SarifVersion.Current)] public SarifVersion SarifOutputVersion { get; set; } } -} +} \ No newline at end of file diff --git a/src/Sarif.Driver/Sdk/ExportRulesDocumentationCommandBase.cs b/src/Sarif.Driver/Sdk/ExportRulesDocumentationCommandBase.cs index 0ce935b94..f15c2739b 100644 --- a/src/Sarif.Driver/Sdk/ExportRulesDocumentationCommandBase.cs +++ b/src/Sarif.Driver/Sdk/ExportRulesDocumentationCommandBase.cs @@ -49,10 +49,10 @@ internal void BuildRule(Skimmer rule, StringBuilder sb) { sb.AppendLine($"## Rule `{rule.Moniker}`{Environment.NewLine}"); sb.AppendLine($"### Description{Environment.NewLine}"); - sb.AppendLine(@$"{rule.FullDescription?.Markdown - ?? rule.FullDescription?.Text + sb.AppendLine(@$"{rule.FullDescription?.Markdown + ?? rule.FullDescription?.Text ?? rule.ShortDescription?.Markdown - ?? rule.ShortDescription?.Text + ?? rule.ShortDescription?.Text ?? DriverResources.NoRuleDescription}{Environment.NewLine}"); sb.AppendLine($"### Messages{Environment.NewLine}"); diff --git a/src/Sarif.Driver/Sdk/MultifileOptionsBase.cs b/src/Sarif.Driver/Sdk/MultifileOptionsBase.cs index ba97e6622..df597ce5d 100644 --- a/src/Sarif.Driver/Sdk/MultifileOptionsBase.cs +++ b/src/Sarif.Driver/Sdk/MultifileOptionsBase.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; - using CommandLine; namespace Microsoft.CodeAnalysis.Sarif.Driver diff --git a/src/Sarif.Driver/SemanticVersion.cs b/src/Sarif.Driver/SemanticVersion.cs index 89c44547d..2aacfec41 100644 --- a/src/Sarif.Driver/SemanticVersion.cs +++ b/src/Sarif.Driver/SemanticVersion.cs @@ -371,4 +371,4 @@ public static bool TryParse(string version, out SemanticVersion result) return result != null; } } -} +} \ No newline at end of file diff --git a/src/Sarif.Multitool.Library/AbsoluteUriCommand.cs b/src/Sarif.Multitool.Library/AbsoluteUriCommand.cs index 7abe91fe2..b4bf56043 100644 --- a/src/Sarif.Multitool.Library/AbsoluteUriCommand.cs +++ b/src/Sarif.Multitool.Library/AbsoluteUriCommand.cs @@ -5,10 +5,8 @@ using System.Collections.Generic; using System.IO; using System.Linq; - using Microsoft.CodeAnalysis.Sarif.Driver; using Microsoft.CodeAnalysis.Sarif.Processors; - using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Sarif.Multitool.Library/AbsoluteUriOptions.cs b/src/Sarif.Multitool.Library/AbsoluteUriOptions.cs index b0736007f..ad0a63379 100644 --- a/src/Sarif.Multitool.Library/AbsoluteUriOptions.cs +++ b/src/Sarif.Multitool.Library/AbsoluteUriOptions.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using CommandLine; - using Microsoft.CodeAnalysis.Sarif.Driver; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Sarif.Multitool.Library/CommandBase.cs b/src/Sarif.Multitool.Library/CommandBase.cs index 3aad1ef67..0673311a0 100644 --- a/src/Sarif.Multitool.Library/CommandBase.cs +++ b/src/Sarif.Multitool.Library/CommandBase.cs @@ -5,9 +5,7 @@ using System.Collections.Generic; using System.Globalization; using System.IO; - using Microsoft.CodeAnalysis.Sarif.Driver; - using Newtonsoft.Json; using Newtonsoft.Json.Serialization; diff --git a/src/Sarif.Multitool.Library/CommandUtilities.cs b/src/Sarif.Multitool.Library/CommandUtilities.cs index fc819f1cf..c5268a121 100644 --- a/src/Sarif.Multitool.Library/CommandUtilities.cs +++ b/src/Sarif.Multitool.Library/CommandUtilities.cs @@ -3,7 +3,6 @@ using System; using System.IO; - using Microsoft.CodeAnalysis.Sarif.Driver; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Sarif.Multitool.Library/ConvertCommand.cs b/src/Sarif.Multitool.Library/ConvertCommand.cs index 736a8421c..92ec58d70 100644 --- a/src/Sarif.Multitool.Library/ConvertCommand.cs +++ b/src/Sarif.Multitool.Library/ConvertCommand.cs @@ -72,7 +72,7 @@ public int Run(ConvertOptions convertOptions, IFileSystem fileSystem = null) }; using (JsonTextReader reader = new JsonTextReader(new StreamReader(convertOptions.OutputFilePath))) - { + { sarifLog = serializer.Deserialize(reader); } diff --git a/src/Sarif.Multitool.Library/ConvertOptions.cs b/src/Sarif.Multitool.Library/ConvertOptions.cs index 304b6db1a..d41acc104 100644 --- a/src/Sarif.Multitool.Library/ConvertOptions.cs +++ b/src/Sarif.Multitool.Library/ConvertOptions.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using CommandLine; - using Microsoft.CodeAnalysis.Sarif.Driver; namespace Microsoft.CodeAnalysis.Sarif.Multitool @@ -29,4 +28,4 @@ public class ConvertOptions : SingleFileOptionsBase public bool NormalizeForGitHub { get; internal set; } } -} +} \ No newline at end of file diff --git a/src/Sarif.Multitool.Library/ExportValidationConfigurationCommand.cs b/src/Sarif.Multitool.Library/ExportValidationConfigurationCommand.cs index 87ec6a61a..174d1dfd7 100644 --- a/src/Sarif.Multitool.Library/ExportValidationConfigurationCommand.cs +++ b/src/Sarif.Multitool.Library/ExportValidationConfigurationCommand.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using CommandLine; - using Microsoft.CodeAnalysis.Sarif.Driver; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Sarif.Multitool.Library/ExportValidationConfigurationOptions.cs b/src/Sarif.Multitool.Library/ExportValidationConfigurationOptions.cs index 0cb78299b..4b087a442 100644 --- a/src/Sarif.Multitool.Library/ExportValidationConfigurationOptions.cs +++ b/src/Sarif.Multitool.Library/ExportValidationConfigurationOptions.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using CommandLine; - using Microsoft.CodeAnalysis.Sarif.Driver; namespace Microsoft.CodeAnalysis.Sarif.Multitool @@ -11,4 +10,4 @@ namespace Microsoft.CodeAnalysis.Sarif.Multitool public class ExportValidationConfigurationOptions : ExportConfigurationOptions { } -} +} \ No newline at end of file diff --git a/src/Sarif.Multitool.Library/ExportValidationDocumentationOptions.cs b/src/Sarif.Multitool.Library/ExportValidationDocumentationOptions.cs index d51d74037..b8e2013e9 100644 --- a/src/Sarif.Multitool.Library/ExportValidationDocumentationOptions.cs +++ b/src/Sarif.Multitool.Library/ExportValidationDocumentationOptions.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using CommandLine; - using Microsoft.CodeAnalysis.Sarif.Driver; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Sarif.Multitool.Library/ExportValidationRulesMetadataOptions.cs b/src/Sarif.Multitool.Library/ExportValidationRulesMetadataOptions.cs index 3f7851923..e5c4fb5f0 100644 --- a/src/Sarif.Multitool.Library/ExportValidationRulesMetadataOptions.cs +++ b/src/Sarif.Multitool.Library/ExportValidationRulesMetadataOptions.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using CommandLine; - using Microsoft.CodeAnalysis.Sarif.Driver; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Sarif.Multitool.Library/FileWorkItemsCommand.cs b/src/Sarif.Multitool.Library/FileWorkItemsCommand.cs index c2853fc1c..8b65349a4 100644 --- a/src/Sarif.Multitool.Library/FileWorkItemsCommand.cs +++ b/src/Sarif.Multitool.Library/FileWorkItemsCommand.cs @@ -7,12 +7,10 @@ using System.IO; using System.Reflection; using System.Text; - using Microsoft.CodeAnalysis.Sarif.Driver; using Microsoft.CodeAnalysis.Sarif.WorkItems; using Microsoft.Json.Schema; using Microsoft.Json.Schema.Validation; - using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.Multitool @@ -259,4 +257,4 @@ private string FormatSchemaErrors(string path, IEnumerable errors) return sb.ToString(); } } -} +} \ No newline at end of file diff --git a/src/Sarif.Multitool.Library/FileWorkItemsOptions.cs b/src/Sarif.Multitool.Library/FileWorkItemsOptions.cs index be042129c..e7c32e3e3 100644 --- a/src/Sarif.Multitool.Library/FileWorkItemsOptions.cs +++ b/src/Sarif.Multitool.Library/FileWorkItemsOptions.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using CommandLine; - using Microsoft.CodeAnalysis.Sarif.Driver; namespace Microsoft.CodeAnalysis.Sarif.Multitool @@ -31,7 +30,7 @@ public class FileWorkItemsOptions : SingleFileOptionsBase [Option( "file-unchanged", - HelpText = "File work items for both new and unchanged baseline state results. " + + HelpText = "File work items for both new and unchanged baseline state results. " + "If an unchanged result already has an associated work item, a new work item will not be created.", Default = null)] public bool? ShouldFileUnchanged { get; internal set; } diff --git a/src/Sarif.Multitool.Library/JTokenExtensions.cs b/src/Sarif.Multitool.Library/JTokenExtensions.cs index af8e7152d..6eb578513 100644 --- a/src/Sarif.Multitool.Library/JTokenExtensions.cs +++ b/src/Sarif.Multitool.Library/JTokenExtensions.cs @@ -3,7 +3,6 @@ using System; using System.Linq; - using Newtonsoft.Json.Linq; namespace Microsoft.CodeAnalysis.Sarif.Multitool @@ -16,4 +15,4 @@ public static bool HasProperty(this JToken token, string propertyName) .Any(jp => jp.Name.Equals(propertyName, StringComparison.Ordinal)); } } -} +} \ No newline at end of file diff --git a/src/Sarif.Multitool.Library/MergeCommand.cs b/src/Sarif.Multitool.Library/MergeCommand.cs index a310dc476..3c647b80b 100644 --- a/src/Sarif.Multitool.Library/MergeCommand.cs +++ b/src/Sarif.Multitool.Library/MergeCommand.cs @@ -106,7 +106,7 @@ public int Run(MergeOptions mergeOptions) } } } - + foreach (string ruleId in ruleToRunsMap.Keys) { HashSet runs = ruleToRunsMap[ruleId]; diff --git a/src/Sarif.Multitool.Library/MergeOptions.cs b/src/Sarif.Multitool.Library/MergeOptions.cs index f4551c761..cedef28df 100644 --- a/src/Sarif.Multitool.Library/MergeOptions.cs +++ b/src/Sarif.Multitool.Library/MergeOptions.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using CommandLine; - using Microsoft.CodeAnalysis.Sarif.Driver; namespace Microsoft.CodeAnalysis.Sarif.Multitool @@ -24,15 +23,15 @@ public class MergeOptions : MultipleFilesOptionsBase [Option( "split", HelpText = "Apply a splitting strategy to the merged file. " + - "Must be one of None or PerRule. By default ('None'), " + - "no splitting strategy is applied (i.e. all input " + + "Must be one of None or PerRule. By default ('None'), " + + "no splitting strategy is applied (i.e. all input " + "files will be merged into a single log).", Default = SplittingStrategy.None)] public SplittingStrategy SplittingStrategy { get; internal set; } [Option( "merge-runs", - HelpText = "Merge runs of the same tool + verion combination (requires " + + HelpText = "Merge runs of the same tool + verion combination (requires " + "eliding run-specific details such as invocations data.")] public bool MergeRuns { get; internal set; } } diff --git a/src/Sarif.Multitool.Library/PageCommand.cs b/src/Sarif.Multitool.Library/PageCommand.cs index 3184d4554..6ae791576 100644 --- a/src/Sarif.Multitool.Library/PageCommand.cs +++ b/src/Sarif.Multitool.Library/PageCommand.cs @@ -7,10 +7,8 @@ using System.Globalization; using System.IO; using System.Linq; - using Microsoft.CodeAnalysis.Sarif.Driver; using Microsoft.CodeAnalysis.Sarif.Map; - using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Sarif.Multitool.Library/QueryCommand.cs b/src/Sarif.Multitool.Library/QueryCommand.cs index 63df7cf81..0a40c94eb 100644 --- a/src/Sarif.Multitool.Library/QueryCommand.cs +++ b/src/Sarif.Multitool.Library/QueryCommand.cs @@ -5,7 +5,6 @@ using System.Collections; using System.Diagnostics; using System.Linq; - using Microsoft.CodeAnalysis.Sarif.Driver; using Microsoft.CodeAnalysis.Sarif.Query; using Microsoft.CodeAnalysis.Sarif.Query.Evaluators; diff --git a/src/Sarif.Multitool.Library/RebaseUriCommand.cs b/src/Sarif.Multitool.Library/RebaseUriCommand.cs index cda6a1dda..6a6cb8d30 100644 --- a/src/Sarif.Multitool.Library/RebaseUriCommand.cs +++ b/src/Sarif.Multitool.Library/RebaseUriCommand.cs @@ -5,7 +5,6 @@ using System.Collections.Generic; using System.IO; using System.Linq; - using Microsoft.CodeAnalysis.Sarif.Driver; using Microsoft.CodeAnalysis.Sarif.Processors; using Microsoft.CodeAnalysis.Sarif.Visitors; diff --git a/src/Sarif.Multitool.Library/RebaseUriOptions.cs b/src/Sarif.Multitool.Library/RebaseUriOptions.cs index e03b6209d..4e82da62a 100644 --- a/src/Sarif.Multitool.Library/RebaseUriOptions.cs +++ b/src/Sarif.Multitool.Library/RebaseUriOptions.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using CommandLine; - using Microsoft.CodeAnalysis.Sarif.Driver; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Sarif.Multitool.Library/ResultMatchSetCommand.cs b/src/Sarif.Multitool.Library/ResultMatchSetCommand.cs index a585c9b7d..7338ebfaf 100644 --- a/src/Sarif.Multitool.Library/ResultMatchSetCommand.cs +++ b/src/Sarif.Multitool.Library/ResultMatchSetCommand.cs @@ -7,10 +7,8 @@ using System.Globalization; using System.IO; using System.Linq; - using Microsoft.CodeAnalysis.Sarif.Baseline.ResultMatching; using Microsoft.CodeAnalysis.Sarif.Driver; - using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Sarif.Multitool.Library/ResultMatchSetOptions.cs b/src/Sarif.Multitool.Library/ResultMatchSetOptions.cs index e224ba8c0..5b6f24738 100644 --- a/src/Sarif.Multitool.Library/ResultMatchSetOptions.cs +++ b/src/Sarif.Multitool.Library/ResultMatchSetOptions.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using CommandLine; - using Microsoft.CodeAnalysis.Sarif.Driver; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Sarif.Multitool.Library/ResultMatchingCommand.cs b/src/Sarif.Multitool.Library/ResultMatchingCommand.cs index a73e9bc91..5ba4fc729 100644 --- a/src/Sarif.Multitool.Library/ResultMatchingCommand.cs +++ b/src/Sarif.Multitool.Library/ResultMatchingCommand.cs @@ -5,7 +5,6 @@ using System.Collections.Generic; using System.IO; using System.Linq; - using Microsoft.CodeAnalysis.Sarif.Baseline.ResultMatching; using Microsoft.CodeAnalysis.Sarif.Driver; diff --git a/src/Sarif.Multitool.Library/ResultMatchingOptions.cs b/src/Sarif.Multitool.Library/ResultMatchingOptions.cs index 5ea30c19b..885f5bebe 100644 --- a/src/Sarif.Multitool.Library/ResultMatchingOptions.cs +++ b/src/Sarif.Multitool.Library/ResultMatchingOptions.cs @@ -2,9 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; - using CommandLine; - using Microsoft.CodeAnalysis.Sarif.Driver; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Sarif.Multitool.Library/RewriteCommand.cs b/src/Sarif.Multitool.Library/RewriteCommand.cs index 2afa0d9c0..b27872f91 100644 --- a/src/Sarif.Multitool.Library/RewriteCommand.cs +++ b/src/Sarif.Multitool.Library/RewriteCommand.cs @@ -4,11 +4,9 @@ using System; using System.Collections.Generic; using System.Diagnostics; - using Microsoft.CodeAnalysis.Sarif.Driver; using Microsoft.CodeAnalysis.Sarif.Driver.Sdk; using Microsoft.CodeAnalysis.Sarif.Visitors; - using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Sarif.Multitool.Library/RewriteOptions.cs b/src/Sarif.Multitool.Library/RewriteOptions.cs index f701295e5..cc0af9741 100644 --- a/src/Sarif.Multitool.Library/RewriteOptions.cs +++ b/src/Sarif.Multitool.Library/RewriteOptions.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using CommandLine; - using Microsoft.CodeAnalysis.Sarif.Driver; namespace Microsoft.CodeAnalysis.Sarif.Multitool @@ -12,4 +11,4 @@ public class RewriteOptions : SingleFileOptionsBase { } -} +} \ No newline at end of file diff --git a/src/Sarif.Multitool.Library/Rules/RuleId.cs b/src/Sarif.Multitool.Library/Rules/RuleId.cs index 3ce3efc7a..4a4001ccc 100644 --- a/src/Sarif.Multitool.Library/Rules/RuleId.cs +++ b/src/Sarif.Multitool.Library/Rules/RuleId.cs @@ -25,7 +25,7 @@ public static class RuleId public const string OptimizeFileSize = "SARIF2004"; public const string ProvideToolProperties = "SARIF2005"; - public const string UrisShouldBeReachable = "SARIF2006"; + public const string UrisShouldBeReachable = "SARIF2006"; public const string ExpressPathsRelativeToRepoRoot = "SARIF2007"; public const string ProvideSchema = "SARIF2008"; public const string ConsiderConventionalIdentifierValues = "SARIF2009"; diff --git a/src/Sarif.Multitool.Library/Rules/SARIF1005.UriMustBeAbsolute.cs b/src/Sarif.Multitool.Library/Rules/SARIF1005.UriMustBeAbsolute.cs index 173b839a3..7c31c90db 100644 --- a/src/Sarif.Multitool.Library/Rules/SARIF1005.UriMustBeAbsolute.cs +++ b/src/Sarif.Multitool.Library/Rules/SARIF1005.UriMustBeAbsolute.cs @@ -83,8 +83,8 @@ private void AnalyzeUri(string uriString, string pointer) { // {0}: The value of this property is required to be an absolute URI, but '{1}' is a relative URI reference. LogResult( - pointer, - nameof(RuleResources.SARIF1005_UriMustBeAbsolute_Error_Default_Text), + pointer, + nameof(RuleResources.SARIF1005_UriMustBeAbsolute_Error_Default_Text), uriString); } } diff --git a/src/Sarif.Multitool.Library/Rules/SARIF1010.RuleIdMustBeConsistent.cs b/src/Sarif.Multitool.Library/Rules/SARIF1010.RuleIdMustBeConsistent.cs index fe761e723..2bc02af28 100644 --- a/src/Sarif.Multitool.Library/Rules/SARIF1010.RuleIdMustBeConsistent.cs +++ b/src/Sarif.Multitool.Library/Rules/SARIF1010.RuleIdMustBeConsistent.cs @@ -25,7 +25,7 @@ public class RuleIdMustBeConsistent : SarifValidationSkimmerBase nameof(RuleResources.SARIF1010_RuleIdMustBeConsistent_Error_ResultMustSpecifyRuleId_Text) }; public override FailureLevel DefaultLevel => FailureLevel.Error; - + protected override void Analyze(Result result, string resultPointer) { AnalyzeRuleId(result, resultPointer); @@ -40,7 +40,7 @@ private void AnalyzeRuleId(Result result, string pointer) // ([§3.27.5](https://docs.oasis-open.org/sarif/sarif/v2.1.0/os/sarif-v2.1.0-os.html#_Toc34317643)) // requires at least one of these properties to be present. LogResult( - pointer, + pointer, nameof(RuleResources.SARIF1010_RuleIdMustBeConsistent_Error_ResultMustSpecifyRuleId_Text)); } // if both are present, they must be equal. @@ -53,9 +53,9 @@ private void AnalyzeRuleId(Result result, string pointer) // (https://docs.oasis-open.org/sarif/sarif/v2.1.0/os/sarif-v2.1.0-os.html#_Toc34317643)) // requires that if both of these properties are present, they must be equal. LogResult( - pointer, - nameof(RuleResources.SARIF1010_RuleIdMustBeConsistent_Error_ResultRuleIdMustBeConsistent_Text), - result.RuleId, + pointer, + nameof(RuleResources.SARIF1010_RuleIdMustBeConsistent_Error_ResultRuleIdMustBeConsistent_Text), + result.RuleId, result.Rule?.Id); } } diff --git a/src/Sarif.Multitool.Library/Rules/SARIF1011.ReferenceFinalSchema.cs b/src/Sarif.Multitool.Library/Rules/SARIF1011.ReferenceFinalSchema.cs index efb689c6c..c01a44bb4 100644 --- a/src/Sarif.Multitool.Library/Rules/SARIF1011.ReferenceFinalSchema.cs +++ b/src/Sarif.Multitool.Library/Rules/SARIF1011.ReferenceFinalSchema.cs @@ -56,7 +56,7 @@ private void AnalyzeSchema(Uri schemaUri, string schema) // final version of the schema, upgrade the tool to populate the '$schema' property with a URL // that refers to the final version of the schema. LogResult( - schema, + schema, nameof(RuleResources.SARIF1011_ReferenceFinalSchema_Error_Default_Text), schemaUri.OriginalString); } diff --git a/src/Sarif.Multitool.Library/Rules/SARIF2004.OptimizeFileSize.cs b/src/Sarif.Multitool.Library/Rules/SARIF2004.OptimizeFileSize.cs index f2e13da9b..b1a5c5dfb 100644 --- a/src/Sarif.Multitool.Library/Rules/SARIF2004.OptimizeFileSize.cs +++ b/src/Sarif.Multitool.Library/Rules/SARIF2004.OptimizeFileSize.cs @@ -111,7 +111,7 @@ private void ReportRuleDuplication(Result result, string resultPointer) resultPointer, nameof(RuleResources.SARIF2004_OptimizeFileSize_Warning_AvoidDuplicativeResultRuleInformation_Text)); } - } + } } else { diff --git a/src/Sarif.Multitool.Library/Rules/SARIF2006.UrisShouldBeReachable.cs b/src/Sarif.Multitool.Library/Rules/SARIF2006.UrisShouldBeReachable.cs index 0e19763bb..d8a074649 100644 --- a/src/Sarif.Multitool.Library/Rules/SARIF2006.UrisShouldBeReachable.cs +++ b/src/Sarif.Multitool.Library/Rules/SARIF2006.UrisShouldBeReachable.cs @@ -88,8 +88,8 @@ private void AnalyzeUri(string uriString, string pointer) { // {0}: The URI '{1}' was not reachable via an HTTP GET request. LogResult( - pointer, - nameof(RuleResources.SARIF2006_UrisShouldBeReachable_Note_Default_Text), + pointer, + nameof(RuleResources.SARIF2006_UrisShouldBeReachable_Note_Default_Text), uriString); } } diff --git a/src/Sarif.Multitool.Library/Rules/SARIF2008.ProvideSchema.cs b/src/Sarif.Multitool.Library/Rules/SARIF2008.ProvideSchema.cs index ad6703016..d5bebe5f9 100644 --- a/src/Sarif.Multitool.Library/Rules/SARIF2008.ProvideSchema.cs +++ b/src/Sarif.Multitool.Library/Rules/SARIF2008.ProvideSchema.cs @@ -33,7 +33,7 @@ protected override void Analyze(SarifLog log, string logPointer) // property that refers to the final, OASIS standard version of the SARIF 2.1.0 // schema. This enables IDEs to provide Intellisense for SARIF log files. LogResult( - logPointer, + logPointer, nameof(RuleResources.SARIF2008_ProvideSchema_Warning_Default_Text)); } } diff --git a/src/Sarif.Multitool.Library/Rules/SARIF2010.ProvideCodeSnippets.cs b/src/Sarif.Multitool.Library/Rules/SARIF2010.ProvideCodeSnippets.cs index 2e64648d4..1352564ac 100644 --- a/src/Sarif.Multitool.Library/Rules/SARIF2010.ProvideCodeSnippets.cs +++ b/src/Sarif.Multitool.Library/Rules/SARIF2010.ProvideCodeSnippets.cs @@ -4,7 +4,6 @@ using System; using System.Collections.Generic; using System.Linq; - using Microsoft.CodeAnalysis.Sarif.Writers; using Microsoft.Json.Pointer; diff --git a/src/Sarif.Multitool.Library/Rules/SarifValidationSkimmerBase.cs b/src/Sarif.Multitool.Library/Rules/SarifValidationSkimmerBase.cs index ef421ebbe..fd920c010 100644 --- a/src/Sarif.Multitool.Library/Rules/SarifValidationSkimmerBase.cs +++ b/src/Sarif.Multitool.Library/Rules/SarifValidationSkimmerBase.cs @@ -6,10 +6,8 @@ using System.Resources; using System.Text; using System.Text.RegularExpressions; - using Microsoft.CodeAnalysis.Sarif.Driver; using Microsoft.Json.Pointer; - using Newtonsoft.Json; using Newtonsoft.Json.Linq; diff --git a/src/Sarif.Multitool.Library/SarifValidationContext.cs b/src/Sarif.Multitool.Library/SarifValidationContext.cs index 0234315f6..d2b9c4da3 100644 --- a/src/Sarif.Multitool.Library/SarifValidationContext.cs +++ b/src/Sarif.Multitool.Library/SarifValidationContext.cs @@ -3,7 +3,6 @@ using System; using System.IO; - using Newtonsoft.Json.Linq; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Sarif.Multitool.Library/StringExtensions.cs b/src/Sarif.Multitool.Library/StringExtensions.cs index c9fc115d0..f0bbf145f 100644 --- a/src/Sarif.Multitool.Library/StringExtensions.cs +++ b/src/Sarif.Multitool.Library/StringExtensions.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using Microsoft.Json.Pointer; - using Newtonsoft.Json.Linq; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Sarif.Multitool.Library/TransformCommand.cs b/src/Sarif.Multitool.Library/TransformCommand.cs index 21ea9dcac..c4879f866 100644 --- a/src/Sarif.Multitool.Library/TransformCommand.cs +++ b/src/Sarif.Multitool.Library/TransformCommand.cs @@ -3,13 +3,11 @@ using System; using System.IO; - using Microsoft.CodeAnalysis.Sarif.Driver; using Microsoft.CodeAnalysis.Sarif.Readers; using Microsoft.CodeAnalysis.Sarif.VersionOne; using Microsoft.CodeAnalysis.Sarif.Visitors; using Microsoft.CodeAnalysis.Sarif.Writers; - using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.Multitool @@ -153,4 +151,4 @@ private string SniffVersion(string sarifPath) return null; } } -} +} \ No newline at end of file diff --git a/src/Sarif.Multitool.Library/TransformOptions.cs b/src/Sarif.Multitool.Library/TransformOptions.cs index fc9dd6a11..83d93e8ff 100644 --- a/src/Sarif.Multitool.Library/TransformOptions.cs +++ b/src/Sarif.Multitool.Library/TransformOptions.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using CommandLine; - using Microsoft.CodeAnalysis.Sarif.Driver; namespace Microsoft.CodeAnalysis.Sarif.Multitool @@ -11,4 +10,4 @@ namespace Microsoft.CodeAnalysis.Sarif.Multitool public class TransformOptions : SingleFileOptionsBase { } -} +} \ No newline at end of file diff --git a/src/Sarif.Multitool.Library/ValidateCommand.cs b/src/Sarif.Multitool.Library/ValidateCommand.cs index a2f5a8c86..b8339504e 100644 --- a/src/Sarif.Multitool.Library/ValidateCommand.cs +++ b/src/Sarif.Multitool.Library/ValidateCommand.cs @@ -9,7 +9,6 @@ using Microsoft.CodeAnalysis.Sarif.Writers; using Microsoft.Json.Schema; using Microsoft.Json.Schema.Validation; - using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Sarif.Multitool.Library/ValidateOptions.cs b/src/Sarif.Multitool.Library/ValidateOptions.cs index 1f7622333..02c6f7bfa 100644 --- a/src/Sarif.Multitool.Library/ValidateOptions.cs +++ b/src/Sarif.Multitool.Library/ValidateOptions.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using CommandLine; - using Microsoft.CodeAnalysis.Sarif.Driver; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Sarif.WorkItems/SarifWorkItemContext.cs b/src/Sarif.WorkItems/SarifWorkItemContext.cs index df495a283..9bfc87293 100644 --- a/src/Sarif.WorkItems/SarifWorkItemContext.cs +++ b/src/Sarif.WorkItems/SarifWorkItemContext.cs @@ -4,7 +4,6 @@ using System.Collections.Generic; using System.IO; using System.Reflection; - using Microsoft.WorkItems; namespace Microsoft.CodeAnalysis.Sarif.WorkItems @@ -31,9 +30,8 @@ public Uri HostUri public string DescriptionFooter { - get - { - return + get { + return CurrentProvider == FilingClient.SourceControlProvider.AzureDevOps ? AzureDevOpsDescriptionFooter : GitHubDescriptionFooter; @@ -270,4 +268,4 @@ public void Dispose() "Extensibility", nameof(AdditionalTags), defaultValue: () => { return new StringSet(); }); } -} +} \ No newline at end of file diff --git a/src/Sarif.WorkItems/SarifWorkItemFiler.cs b/src/Sarif.WorkItems/SarifWorkItemFiler.cs index e7022d6fc..784b95ef8 100644 --- a/src/Sarif.WorkItems/SarifWorkItemFiler.cs +++ b/src/Sarif.WorkItems/SarifWorkItemFiler.cs @@ -8,7 +8,6 @@ using System.Linq; using System.Reflection; using System.Threading.Tasks; - using Microsoft.ApplicationInsights.Channel; using Microsoft.CodeAnalysis.Sarif.Visitors; using Microsoft.CodeAnalysis.WorkItems; @@ -16,7 +15,6 @@ using Microsoft.Extensions.Logging; using Microsoft.WorkItems; using Microsoft.WorkItems.Logging; - using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.WorkItems @@ -56,7 +54,7 @@ public SarifWorkItemFiler(Uri filingUri = null, SarifWorkItemContext filingConte this.FiledWorkItems = new List(); } - public FilingClient FilingClient + public FilingClient FilingClient { get { @@ -534,4 +532,4 @@ public void Dispose() internal const string PROGRAMMABLE_URIS_PROPERTY_NAME = "programmableWorkItemUris"; internal const string LOGID_PROPERTY_NAME = "logId"; } -} +} \ No newline at end of file diff --git a/src/Sarif.WorkItems/SarifWorkItemModel.cs b/src/Sarif.WorkItems/SarifWorkItemModel.cs index 1c1d20e7a..d9915c231 100644 --- a/src/Sarif.WorkItems/SarifWorkItemModel.cs +++ b/src/Sarif.WorkItems/SarifWorkItemModel.cs @@ -4,10 +4,8 @@ using System; using System.Collections.Generic; using System.Linq; - using Microsoft.CodeAnalysis.Sarif.Visitors; using Microsoft.WorkItems; - using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.WorkItems @@ -77,10 +75,10 @@ public class SarifWorkItemModel : WorkItemModel // this.CommentOrDiscussion = $"Default {nameof(this.CommentOrDiscussion)}"; - string descriptionFooter = this.Context.DescriptionFooter; + string descriptionFooter = this.Context.DescriptionFooter; - this.BodyOrDescription = - Environment.NewLine + + this.BodyOrDescription = + Environment.NewLine + sarifLog.CreateWorkItemDescription(this.Context, LocationUris) + descriptionFooter; diff --git a/src/Sarif.WorkItems/SarifWorkItemsExtensions.cs b/src/Sarif.WorkItems/SarifWorkItemsExtensions.cs index 807033ce0..6316e5666 100644 --- a/src/Sarif.WorkItems/SarifWorkItemsExtensions.cs +++ b/src/Sarif.WorkItems/SarifWorkItemsExtensions.cs @@ -17,7 +17,7 @@ public static bool ShouldBeFiled(this Result result) { return false; } - + if (result.Suppressions?.Count > 0) { return false; } // Fail: an explicit failure occurred. @@ -91,7 +91,7 @@ public static string CreateWorkItemTitle(this Run run) string locationName = "'" + firstResult.Locations?[0].LogicalLocation?.FullyQualifiedName + "'"; if (locationName.Length > remainingChars) - { + { locationName = "'" + Path.GetFileName(firstResult.Locations?[0].LogicalLocation?.FullyQualifiedName) + "'"; if (locationName.Length > remainingChars) @@ -139,7 +139,7 @@ public static int GetAggregateFilableResultsCount(this SarifLog log) .Select(result => result.ShouldBeFiled() ? 1 : 0).Sum()) .Sum() ?? 0; } - + public static string CreateWorkItemDescription(this SarifLog log, SarifWorkItemContext context, IList locationUris) { int totalResults = log.GetAggregateFilableResultsCount(); diff --git a/src/Sarif/Autogenerated/Address.cs b/src/Sarif/Autogenerated/Address.cs index 0538ddc2f..ddaef8100 100644 --- a/src/Sarif/Autogenerated/Address.cs +++ b/src/Sarif/Autogenerated/Address.cs @@ -6,9 +6,7 @@ using System.Collections.Generic; using System.ComponentModel; using System.Runtime.Serialization; - using Microsoft.CodeAnalysis.Sarif.Readers; - using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif @@ -206,4 +204,4 @@ private void Init(int absoluteAddress, int? relativeAddress, int? length, string } } } -} +} \ No newline at end of file diff --git a/src/Sarif/Autogenerated/AddressEqualityComparer.cs b/src/Sarif/Autogenerated/AddressEqualityComparer.cs index 699252a2c..63673aeea 100644 --- a/src/Sarif/Autogenerated/AddressEqualityComparer.cs +++ b/src/Sarif/Autogenerated/AddressEqualityComparer.cs @@ -4,7 +4,6 @@ using System; using System.CodeDom.Compiler; using System.Collections.Generic; - using Microsoft.CodeAnalysis.Sarif.Readers; namespace Microsoft.CodeAnalysis.Sarif @@ -150,4 +149,4 @@ public int GetHashCode(Address obj) return result; } } -} +} \ No newline at end of file diff --git a/src/Sarif/Autogenerated/Artifact.cs b/src/Sarif/Autogenerated/Artifact.cs index 9019657ae..260daa14b 100644 --- a/src/Sarif/Autogenerated/Artifact.cs +++ b/src/Sarif/Autogenerated/Artifact.cs @@ -6,9 +6,7 @@ using System.Collections.Generic; using System.ComponentModel; using System.Runtime.Serialization; - using Microsoft.CodeAnalysis.Sarif.Readers; - using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif @@ -250,4 +248,4 @@ protected virtual void Init(Message description, ArtifactLocation location, int } } } -} +} \ No newline at end of file diff --git a/src/Sarif/Autogenerated/ArtifactChange.cs b/src/Sarif/Autogenerated/ArtifactChange.cs index bcd8b8f4f..0e92d58ee 100644 --- a/src/Sarif/Autogenerated/ArtifactChange.cs +++ b/src/Sarif/Autogenerated/ArtifactChange.cs @@ -5,7 +5,6 @@ using System.CodeDom.Compiler; using System.Collections.Generic; using System.Runtime.Serialization; - using Microsoft.CodeAnalysis.Sarif.Readers; namespace Microsoft.CodeAnalysis.Sarif @@ -143,4 +142,4 @@ protected virtual void Init(ArtifactLocation artifactLocation, IEnumerable threadFlows } } } -} +} \ No newline at end of file diff --git a/src/Sarif/Autogenerated/CodeFlowEqualityComparer.cs b/src/Sarif/Autogenerated/CodeFlowEqualityComparer.cs index c5c06f2b1..48b98cff3 100644 --- a/src/Sarif/Autogenerated/CodeFlowEqualityComparer.cs +++ b/src/Sarif/Autogenerated/CodeFlowEqualityComparer.cs @@ -4,7 +4,6 @@ using System; using System.CodeDom.Compiler; using System.Collections.Generic; - using Microsoft.CodeAnalysis.Sarif.Readers; namespace Microsoft.CodeAnalysis.Sarif @@ -127,4 +126,4 @@ public int GetHashCode(CodeFlow obj) return result; } } -} +} \ No newline at end of file diff --git a/src/Sarif/Autogenerated/ColumnKind.cs b/src/Sarif/Autogenerated/ColumnKind.cs index 6b35770db..ff3e832d9 100644 --- a/src/Sarif/Autogenerated/ColumnKind.cs +++ b/src/Sarif/Autogenerated/ColumnKind.cs @@ -15,4 +15,4 @@ public enum ColumnKind Utf16CodeUnits, UnicodeCodePoints } -} +} \ No newline at end of file diff --git a/src/Sarif/Autogenerated/ConfigurationOverride.cs b/src/Sarif/Autogenerated/ConfigurationOverride.cs index 90ac8bab8..5994ad58a 100644 --- a/src/Sarif/Autogenerated/ConfigurationOverride.cs +++ b/src/Sarif/Autogenerated/ConfigurationOverride.cs @@ -5,7 +5,6 @@ using System.CodeDom.Compiler; using System.Collections.Generic; using System.Runtime.Serialization; - using Microsoft.CodeAnalysis.Sarif.Readers; namespace Microsoft.CodeAnalysis.Sarif @@ -130,4 +129,4 @@ protected virtual void Init(ReportingConfiguration configuration, ReportingDescr } } } -} +} \ No newline at end of file diff --git a/src/Sarif/Autogenerated/ConfigurationOverrideEqualityComparer.cs b/src/Sarif/Autogenerated/ConfigurationOverrideEqualityComparer.cs index 0e1b929fc..d15454df5 100644 --- a/src/Sarif/Autogenerated/ConfigurationOverrideEqualityComparer.cs +++ b/src/Sarif/Autogenerated/ConfigurationOverrideEqualityComparer.cs @@ -4,7 +4,6 @@ using System; using System.CodeDom.Compiler; using System.Collections.Generic; - using Microsoft.CodeAnalysis.Sarif.Readers; namespace Microsoft.CodeAnalysis.Sarif @@ -104,4 +103,4 @@ public int GetHashCode(ConfigurationOverride obj) return result; } } -} +} \ No newline at end of file diff --git a/src/Sarif/Autogenerated/Conversion.cs b/src/Sarif/Autogenerated/Conversion.cs index f388bed48..a27ca6f2f 100644 --- a/src/Sarif/Autogenerated/Conversion.cs +++ b/src/Sarif/Autogenerated/Conversion.cs @@ -5,9 +5,7 @@ using System.CodeDom.Compiler; using System.Collections.Generic; using System.Runtime.Serialization; - using Microsoft.CodeAnalysis.Sarif.Readers; - using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif @@ -160,4 +158,4 @@ protected virtual void Init(Tool tool, Invocation invocation, IEnumerable art } } } -} +} \ No newline at end of file diff --git a/src/Sarif/Autogenerated/FixEqualityComparer.cs b/src/Sarif/Autogenerated/FixEqualityComparer.cs index 9fbdf6320..8efcf20d2 100644 --- a/src/Sarif/Autogenerated/FixEqualityComparer.cs +++ b/src/Sarif/Autogenerated/FixEqualityComparer.cs @@ -4,7 +4,6 @@ using System; using System.CodeDom.Compiler; using System.Collections.Generic; - using Microsoft.CodeAnalysis.Sarif.Readers; namespace Microsoft.CodeAnalysis.Sarif @@ -127,4 +126,4 @@ public int GetHashCode(Fix obj) return result; } } -} +} \ No newline at end of file diff --git a/src/Sarif/Autogenerated/Graph.cs b/src/Sarif/Autogenerated/Graph.cs index 18b8c97a8..af355ba71 100644 --- a/src/Sarif/Autogenerated/Graph.cs +++ b/src/Sarif/Autogenerated/Graph.cs @@ -5,9 +5,7 @@ using System.CodeDom.Compiler; using System.Collections.Generic; using System.Runtime.Serialization; - using Microsoft.CodeAnalysis.Sarif.Readers; - using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif @@ -174,4 +172,4 @@ protected virtual void Init(Message description, IEnumerable nodes, IEnume } } } -} +} \ No newline at end of file diff --git a/src/Sarif/Autogenerated/GraphEqualityComparer.cs b/src/Sarif/Autogenerated/GraphEqualityComparer.cs index df9175b9a..84f83d920 100644 --- a/src/Sarif/Autogenerated/GraphEqualityComparer.cs +++ b/src/Sarif/Autogenerated/GraphEqualityComparer.cs @@ -4,7 +4,6 @@ using System; using System.CodeDom.Compiler; using System.Collections.Generic; - using Microsoft.CodeAnalysis.Sarif.Readers; namespace Microsoft.CodeAnalysis.Sarif @@ -160,4 +159,4 @@ public int GetHashCode(Graph obj) return result; } } -} +} \ No newline at end of file diff --git a/src/Sarif/Autogenerated/GraphTraversal.cs b/src/Sarif/Autogenerated/GraphTraversal.cs index d34457c35..55c547229 100644 --- a/src/Sarif/Autogenerated/GraphTraversal.cs +++ b/src/Sarif/Autogenerated/GraphTraversal.cs @@ -6,9 +6,7 @@ using System.Collections.Generic; using System.ComponentModel; using System.Runtime.Serialization; - using Microsoft.CodeAnalysis.Sarif.Readers; - using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif @@ -201,4 +199,4 @@ protected virtual void Init(int runGraphIndex, int resultGraphIndex, Message des } } } -} +} \ No newline at end of file diff --git a/src/Sarif/Autogenerated/GraphTraversalEqualityComparer.cs b/src/Sarif/Autogenerated/GraphTraversalEqualityComparer.cs index e819633c0..e009a9c24 100644 --- a/src/Sarif/Autogenerated/GraphTraversalEqualityComparer.cs +++ b/src/Sarif/Autogenerated/GraphTraversalEqualityComparer.cs @@ -4,7 +4,6 @@ using System; using System.CodeDom.Compiler; using System.Collections.Generic; - using Microsoft.CodeAnalysis.Sarif.Readers; namespace Microsoft.CodeAnalysis.Sarif @@ -187,4 +186,4 @@ public int GetHashCode(GraphTraversal obj) return result; } } -} +} \ No newline at end of file diff --git a/src/Sarif/Autogenerated/ISarifNode.cs b/src/Sarif/Autogenerated/ISarifNode.cs index 4f9ea2f41..d657455dc 100644 --- a/src/Sarif/Autogenerated/ISarifNode.cs +++ b/src/Sarif/Autogenerated/ISarifNode.cs @@ -21,4 +21,4 @@ public interface ISarifNode /// ISarifNode DeepClone(); } -} +} \ No newline at end of file diff --git a/src/Sarif/Autogenerated/Invocation.cs b/src/Sarif/Autogenerated/Invocation.cs index f877a5e98..b40d01327 100644 --- a/src/Sarif/Autogenerated/Invocation.cs +++ b/src/Sarif/Autogenerated/Invocation.cs @@ -5,9 +5,7 @@ using System.CodeDom.Compiler; using System.Collections.Generic; using System.Runtime.Serialization; - using Microsoft.CodeAnalysis.Sarif.Readers; - using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif @@ -489,4 +487,4 @@ protected virtual void Init(string commandLine, IEnumerable arguments, I } } } -} +} \ No newline at end of file diff --git a/src/Sarif/Autogenerated/InvocationEqualityComparer.cs b/src/Sarif/Autogenerated/InvocationEqualityComparer.cs index a9a96635a..d9024c5a8 100644 --- a/src/Sarif/Autogenerated/InvocationEqualityComparer.cs +++ b/src/Sarif/Autogenerated/InvocationEqualityComparer.cs @@ -4,7 +4,6 @@ using System; using System.CodeDom.Compiler; using System.Collections.Generic; - using Microsoft.CodeAnalysis.Sarif.Readers; namespace Microsoft.CodeAnalysis.Sarif @@ -476,4 +475,4 @@ public int GetHashCode(Invocation obj) return result; } } -} +} \ No newline at end of file diff --git a/src/Sarif/Autogenerated/Location.cs b/src/Sarif/Autogenerated/Location.cs index 2c30eee16..adac3d66f 100644 --- a/src/Sarif/Autogenerated/Location.cs +++ b/src/Sarif/Autogenerated/Location.cs @@ -6,9 +6,7 @@ using System.Collections.Generic; using System.ComponentModel; using System.Runtime.Serialization; - using Microsoft.CodeAnalysis.Sarif.Readers; - using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif @@ -230,4 +228,4 @@ protected virtual void Init(int id, PhysicalLocation physicalLocation, IEnumerab } } } -} +} \ No newline at end of file diff --git a/src/Sarif/Autogenerated/LocationEqualityComparer.cs b/src/Sarif/Autogenerated/LocationEqualityComparer.cs index 2bf8be2e1..18409ea60 100644 --- a/src/Sarif/Autogenerated/LocationEqualityComparer.cs +++ b/src/Sarif/Autogenerated/LocationEqualityComparer.cs @@ -4,7 +4,6 @@ using System; using System.CodeDom.Compiler; using System.Collections.Generic; - using Microsoft.CodeAnalysis.Sarif.Readers; namespace Microsoft.CodeAnalysis.Sarif @@ -209,4 +208,4 @@ public int GetHashCode(Location obj) return result; } } -} +} \ No newline at end of file diff --git a/src/Sarif/Autogenerated/LocationRelationship.cs b/src/Sarif/Autogenerated/LocationRelationship.cs index acc509c56..bb100be10 100644 --- a/src/Sarif/Autogenerated/LocationRelationship.cs +++ b/src/Sarif/Autogenerated/LocationRelationship.cs @@ -5,9 +5,7 @@ using System.CodeDom.Compiler; using System.Collections.Generic; using System.Runtime.Serialization; - using Microsoft.CodeAnalysis.Sarif.Readers; - using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif @@ -149,4 +147,4 @@ protected virtual void Init(int target, IEnumerable kinds, Message descr } } } -} +} \ No newline at end of file diff --git a/src/Sarif/Autogenerated/LocationRelationshipEqualityComparer.cs b/src/Sarif/Autogenerated/LocationRelationshipEqualityComparer.cs index 82de60bef..e13838adf 100644 --- a/src/Sarif/Autogenerated/LocationRelationshipEqualityComparer.cs +++ b/src/Sarif/Autogenerated/LocationRelationshipEqualityComparer.cs @@ -4,7 +4,6 @@ using System; using System.CodeDom.Compiler; using System.Collections.Generic; - using Microsoft.CodeAnalysis.Sarif.Readers; namespace Microsoft.CodeAnalysis.Sarif @@ -133,4 +132,4 @@ public int GetHashCode(LocationRelationship obj) return result; } } -} +} \ No newline at end of file diff --git a/src/Sarif/Autogenerated/LogicalLocation.cs b/src/Sarif/Autogenerated/LogicalLocation.cs index 62bc71a20..99465c33f 100644 --- a/src/Sarif/Autogenerated/LogicalLocation.cs +++ b/src/Sarif/Autogenerated/LogicalLocation.cs @@ -6,9 +6,7 @@ using System.Collections.Generic; using System.ComponentModel; using System.Runtime.Serialization; - using Microsoft.CodeAnalysis.Sarif.Readers; - using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif @@ -171,4 +169,4 @@ protected virtual void Init(string name, int index, string fullyQualifiedName, s } } } -} +} \ No newline at end of file diff --git a/src/Sarif/Autogenerated/LogicalLocationEqualityComparer.cs b/src/Sarif/Autogenerated/LogicalLocationEqualityComparer.cs index c95822681..9db728c66 100644 --- a/src/Sarif/Autogenerated/LogicalLocationEqualityComparer.cs +++ b/src/Sarif/Autogenerated/LogicalLocationEqualityComparer.cs @@ -4,7 +4,6 @@ using System; using System.CodeDom.Compiler; using System.Collections.Generic; - using Microsoft.CodeAnalysis.Sarif.Readers; namespace Microsoft.CodeAnalysis.Sarif @@ -136,4 +135,4 @@ public int GetHashCode(LogicalLocation obj) return result; } } -} +} \ No newline at end of file diff --git a/src/Sarif/Autogenerated/Message.cs b/src/Sarif/Autogenerated/Message.cs index 74fe3ead1..e83232466 100644 --- a/src/Sarif/Autogenerated/Message.cs +++ b/src/Sarif/Autogenerated/Message.cs @@ -5,9 +5,7 @@ using System.CodeDom.Compiler; using System.Collections.Generic; using System.Runtime.Serialization; - using Microsoft.CodeAnalysis.Sarif.Readers; - using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif @@ -155,4 +153,4 @@ protected virtual void Init(string text, string markdown, string id, IEnumerable } } } -} +} \ No newline at end of file diff --git a/src/Sarif/Autogenerated/MessageEqualityComparer.cs b/src/Sarif/Autogenerated/MessageEqualityComparer.cs index 4e9eed930..40142780a 100644 --- a/src/Sarif/Autogenerated/MessageEqualityComparer.cs +++ b/src/Sarif/Autogenerated/MessageEqualityComparer.cs @@ -4,7 +4,6 @@ using System; using System.CodeDom.Compiler; using System.Collections.Generic; - using Microsoft.CodeAnalysis.Sarif.Readers; namespace Microsoft.CodeAnalysis.Sarif @@ -147,4 +146,4 @@ public int GetHashCode(Message obj) return result; } } -} +} \ No newline at end of file diff --git a/src/Sarif/Autogenerated/MultiformatMessageString.cs b/src/Sarif/Autogenerated/MultiformatMessageString.cs index b5aa3d8de..a80121d84 100644 --- a/src/Sarif/Autogenerated/MultiformatMessageString.cs +++ b/src/Sarif/Autogenerated/MultiformatMessageString.cs @@ -5,7 +5,6 @@ using System.CodeDom.Compiler; using System.Collections.Generic; using System.Runtime.Serialization; - using Microsoft.CodeAnalysis.Sarif.Readers; namespace Microsoft.CodeAnalysis.Sarif @@ -122,4 +121,4 @@ protected virtual void Init(string text, string markdown, IDictionary locations, Message message, Fa } } } -} +} \ No newline at end of file diff --git a/src/Sarif/Autogenerated/NotificationEqualityComparer.cs b/src/Sarif/Autogenerated/NotificationEqualityComparer.cs index 746a5e6e3..f1de1de91 100644 --- a/src/Sarif/Autogenerated/NotificationEqualityComparer.cs +++ b/src/Sarif/Autogenerated/NotificationEqualityComparer.cs @@ -4,7 +4,6 @@ using System; using System.CodeDom.Compiler; using System.Collections.Generic; - using Microsoft.CodeAnalysis.Sarif.Readers; namespace Microsoft.CodeAnalysis.Sarif @@ -175,4 +174,4 @@ public int GetHashCode(Notification obj) return result; } } -} +} \ No newline at end of file diff --git a/src/Sarif/Autogenerated/PhysicalLocation.cs b/src/Sarif/Autogenerated/PhysicalLocation.cs index a56e4f2f7..8e6a63f2c 100644 --- a/src/Sarif/Autogenerated/PhysicalLocation.cs +++ b/src/Sarif/Autogenerated/PhysicalLocation.cs @@ -5,7 +5,6 @@ using System.CodeDom.Compiler; using System.Collections.Generic; using System.Runtime.Serialization; - using Microsoft.CodeAnalysis.Sarif.Readers; namespace Microsoft.CodeAnalysis.Sarif @@ -158,4 +157,4 @@ protected virtual void Init(Address address, ArtifactLocation artifactLocation, } } } -} +} \ No newline at end of file diff --git a/src/Sarif/Autogenerated/PhysicalLocationEqualityComparer.cs b/src/Sarif/Autogenerated/PhysicalLocationEqualityComparer.cs index f27de1451..46e94bf02 100644 --- a/src/Sarif/Autogenerated/PhysicalLocationEqualityComparer.cs +++ b/src/Sarif/Autogenerated/PhysicalLocationEqualityComparer.cs @@ -4,7 +4,6 @@ using System; using System.CodeDom.Compiler; using System.Collections.Generic; - using Microsoft.CodeAnalysis.Sarif.Readers; namespace Microsoft.CodeAnalysis.Sarif @@ -124,4 +123,4 @@ public int GetHashCode(PhysicalLocation obj) return result; } } -} +} \ No newline at end of file diff --git a/src/Sarif/Autogenerated/PropertyBag.cs b/src/Sarif/Autogenerated/PropertyBag.cs index cf2067b6a..7497e9f76 100644 --- a/src/Sarif/Autogenerated/PropertyBag.cs +++ b/src/Sarif/Autogenerated/PropertyBag.cs @@ -5,7 +5,6 @@ using System.CodeDom.Compiler; using System.Collections.Generic; using System.Runtime.Serialization; - using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif @@ -109,4 +108,4 @@ protected virtual void Init(IEnumerable tags) } } } -} +} \ No newline at end of file diff --git a/src/Sarif/Autogenerated/PropertyBagEqualityComparer.cs b/src/Sarif/Autogenerated/PropertyBagEqualityComparer.cs index 3fb2770a8..7b15c55ac 100644 --- a/src/Sarif/Autogenerated/PropertyBagEqualityComparer.cs +++ b/src/Sarif/Autogenerated/PropertyBagEqualityComparer.cs @@ -77,4 +77,4 @@ public int GetHashCode(PropertyBag obj) return result; } } -} +} \ No newline at end of file diff --git a/src/Sarif/Autogenerated/Rectangle.cs b/src/Sarif/Autogenerated/Rectangle.cs index 146303071..6a53f2764 100644 --- a/src/Sarif/Autogenerated/Rectangle.cs +++ b/src/Sarif/Autogenerated/Rectangle.cs @@ -5,7 +5,6 @@ using System.CodeDom.Compiler; using System.Collections.Generic; using System.Runtime.Serialization; - using Microsoft.CodeAnalysis.Sarif.Readers; namespace Microsoft.CodeAnalysis.Sarif @@ -156,4 +155,4 @@ protected virtual void Init(double top, double left, double bottom, double right } } } -} +} \ No newline at end of file diff --git a/src/Sarif/Autogenerated/RectangleEqualityComparer.cs b/src/Sarif/Autogenerated/RectangleEqualityComparer.cs index 088b3c706..99edb3356 100644 --- a/src/Sarif/Autogenerated/RectangleEqualityComparer.cs +++ b/src/Sarif/Autogenerated/RectangleEqualityComparer.cs @@ -4,7 +4,6 @@ using System; using System.CodeDom.Compiler; using System.Collections.Generic; - using Microsoft.CodeAnalysis.Sarif.Readers; namespace Microsoft.CodeAnalysis.Sarif @@ -118,4 +117,4 @@ public int GetHashCode(Rectangle obj) return result; } } -} +} \ No newline at end of file diff --git a/src/Sarif/Autogenerated/Region.cs b/src/Sarif/Autogenerated/Region.cs index a5cb00f87..5d8a694ec 100644 --- a/src/Sarif/Autogenerated/Region.cs +++ b/src/Sarif/Autogenerated/Region.cs @@ -6,9 +6,7 @@ using System.Collections.Generic; using System.ComponentModel; using System.Runtime.Serialization; - using Microsoft.CodeAnalysis.Sarif.Readers; - using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif @@ -229,4 +227,4 @@ protected virtual void Init(int startLine, int startColumn, int endLine, int end } } } -} +} \ No newline at end of file diff --git a/src/Sarif/Autogenerated/RegionEqualityComparer.cs b/src/Sarif/Autogenerated/RegionEqualityComparer.cs index 6fa4b871e..04cd93c74 100644 --- a/src/Sarif/Autogenerated/RegionEqualityComparer.cs +++ b/src/Sarif/Autogenerated/RegionEqualityComparer.cs @@ -4,7 +4,6 @@ using System; using System.CodeDom.Compiler; using System.Collections.Generic; - using Microsoft.CodeAnalysis.Sarif.Readers; namespace Microsoft.CodeAnalysis.Sarif @@ -162,4 +161,4 @@ public int GetHashCode(Region obj) return result; } } -} +} \ No newline at end of file diff --git a/src/Sarif/Autogenerated/Replacement.cs b/src/Sarif/Autogenerated/Replacement.cs index 318d47bbc..a402966c1 100644 --- a/src/Sarif/Autogenerated/Replacement.cs +++ b/src/Sarif/Autogenerated/Replacement.cs @@ -5,7 +5,6 @@ using System.CodeDom.Compiler; using System.Collections.Generic; using System.Runtime.Serialization; - using Microsoft.CodeAnalysis.Sarif.Readers; namespace Microsoft.CodeAnalysis.Sarif @@ -130,4 +129,4 @@ protected virtual void Init(Region deletedRegion, ArtifactContent insertedConten } } } -} +} \ No newline at end of file diff --git a/src/Sarif/Autogenerated/ReplacementEqualityComparer.cs b/src/Sarif/Autogenerated/ReplacementEqualityComparer.cs index ae552f94f..1e8ae8fa2 100644 --- a/src/Sarif/Autogenerated/ReplacementEqualityComparer.cs +++ b/src/Sarif/Autogenerated/ReplacementEqualityComparer.cs @@ -4,7 +4,6 @@ using System; using System.CodeDom.Compiler; using System.Collections.Generic; - using Microsoft.CodeAnalysis.Sarif.Readers; namespace Microsoft.CodeAnalysis.Sarif @@ -104,4 +103,4 @@ public int GetHashCode(Replacement obj) return result; } } -} +} \ No newline at end of file diff --git a/src/Sarif/Autogenerated/ReportingConfiguration.cs b/src/Sarif/Autogenerated/ReportingConfiguration.cs index 320ca9201..a560cbffa 100644 --- a/src/Sarif/Autogenerated/ReportingConfiguration.cs +++ b/src/Sarif/Autogenerated/ReportingConfiguration.cs @@ -6,9 +6,7 @@ using System.Collections.Generic; using System.ComponentModel; using System.Runtime.Serialization; - using Microsoft.CodeAnalysis.Sarif.Readers; - using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif @@ -159,4 +157,4 @@ private void Init(bool enabled, FailureLevel level, double rank, IDictionary deprecatedIds, string guid, IEn } } } -} +} \ No newline at end of file diff --git a/src/Sarif/Autogenerated/ReportingDescriptorEqualityComparer.cs b/src/Sarif/Autogenerated/ReportingDescriptorEqualityComparer.cs index b8c3eecc0..2bf840718 100644 --- a/src/Sarif/Autogenerated/ReportingDescriptorEqualityComparer.cs +++ b/src/Sarif/Autogenerated/ReportingDescriptorEqualityComparer.cs @@ -4,7 +4,6 @@ using System; using System.CodeDom.Compiler; using System.Collections.Generic; - using Microsoft.CodeAnalysis.Sarif.Readers; namespace Microsoft.CodeAnalysis.Sarif @@ -334,4 +333,4 @@ public int GetHashCode(ReportingDescriptor obj) return result; } } -} +} \ No newline at end of file diff --git a/src/Sarif/Autogenerated/ReportingDescriptorReference.cs b/src/Sarif/Autogenerated/ReportingDescriptorReference.cs index cef235cb0..abeef5827 100644 --- a/src/Sarif/Autogenerated/ReportingDescriptorReference.cs +++ b/src/Sarif/Autogenerated/ReportingDescriptorReference.cs @@ -6,9 +6,7 @@ using System.Collections.Generic; using System.ComponentModel; using System.Runtime.Serialization; - using Microsoft.CodeAnalysis.Sarif.Readers; - using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif @@ -152,4 +150,4 @@ protected virtual void Init(string id, int index, string guid, ToolComponentRefe } } } -} +} \ No newline at end of file diff --git a/src/Sarif/Autogenerated/ReportingDescriptorReferenceEqualityComparer.cs b/src/Sarif/Autogenerated/ReportingDescriptorReferenceEqualityComparer.cs index 6db9aa15f..903723a9f 100644 --- a/src/Sarif/Autogenerated/ReportingDescriptorReferenceEqualityComparer.cs +++ b/src/Sarif/Autogenerated/ReportingDescriptorReferenceEqualityComparer.cs @@ -4,7 +4,6 @@ using System; using System.CodeDom.Compiler; using System.Collections.Generic; - using Microsoft.CodeAnalysis.Sarif.Readers; namespace Microsoft.CodeAnalysis.Sarif @@ -120,4 +119,4 @@ public int GetHashCode(ReportingDescriptorReference obj) return result; } } -} +} \ No newline at end of file diff --git a/src/Sarif/Autogenerated/ReportingDescriptorRelationship.cs b/src/Sarif/Autogenerated/ReportingDescriptorRelationship.cs index a6a927548..9d448f5ea 100644 --- a/src/Sarif/Autogenerated/ReportingDescriptorRelationship.cs +++ b/src/Sarif/Autogenerated/ReportingDescriptorRelationship.cs @@ -5,9 +5,7 @@ using System.CodeDom.Compiler; using System.Collections.Generic; using System.Runtime.Serialization; - using Microsoft.CodeAnalysis.Sarif.Readers; - using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif @@ -153,4 +151,4 @@ protected virtual void Init(ReportingDescriptorReference target, IEnumerable invocations, Conversion con } } } -} +} \ No newline at end of file diff --git a/src/Sarif/Autogenerated/RunAutomationDetails.cs b/src/Sarif/Autogenerated/RunAutomationDetails.cs index 35bcd573a..6a159930e 100644 --- a/src/Sarif/Autogenerated/RunAutomationDetails.cs +++ b/src/Sarif/Autogenerated/RunAutomationDetails.cs @@ -5,7 +5,6 @@ using System.CodeDom.Compiler; using System.Collections.Generic; using System.Runtime.Serialization; - using Microsoft.CodeAnalysis.Sarif.Readers; namespace Microsoft.CodeAnalysis.Sarif @@ -146,4 +145,4 @@ protected virtual void Init(Message description, string id, string guid, string } } } -} +} \ No newline at end of file diff --git a/src/Sarif/Autogenerated/RunAutomationDetailsEqualityComparer.cs b/src/Sarif/Autogenerated/RunAutomationDetailsEqualityComparer.cs index 4b28e068c..84b68b10b 100644 --- a/src/Sarif/Autogenerated/RunAutomationDetailsEqualityComparer.cs +++ b/src/Sarif/Autogenerated/RunAutomationDetailsEqualityComparer.cs @@ -4,7 +4,6 @@ using System; using System.CodeDom.Compiler; using System.Collections.Generic; - using Microsoft.CodeAnalysis.Sarif.Readers; namespace Microsoft.CodeAnalysis.Sarif @@ -124,4 +123,4 @@ public int GetHashCode(RunAutomationDetails obj) return result; } } -} +} \ No newline at end of file diff --git a/src/Sarif/Autogenerated/RunEqualityComparer.cs b/src/Sarif/Autogenerated/RunEqualityComparer.cs index eb7c7e528..5996c311a 100644 --- a/src/Sarif/Autogenerated/RunEqualityComparer.cs +++ b/src/Sarif/Autogenerated/RunEqualityComparer.cs @@ -4,7 +4,6 @@ using System; using System.CodeDom.Compiler; using System.Collections.Generic; - using Microsoft.CodeAnalysis.Sarif.Readers; namespace Microsoft.CodeAnalysis.Sarif @@ -746,4 +745,4 @@ public int GetHashCode(Run obj) return result; } } -} +} \ No newline at end of file diff --git a/src/Sarif/Autogenerated/SarifLog.cs b/src/Sarif/Autogenerated/SarifLog.cs index 97611a7e2..9a94b3602 100644 --- a/src/Sarif/Autogenerated/SarifLog.cs +++ b/src/Sarif/Autogenerated/SarifLog.cs @@ -5,9 +5,7 @@ using System.CodeDom.Compiler; using System.Collections.Generic; using System.Runtime.Serialization; - using Microsoft.CodeAnalysis.Sarif.Readers; - using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif @@ -188,4 +186,4 @@ private void Init(Uri schemaUri, SarifVersion version, IEnumerable runs, IE } } } -} +} \ No newline at end of file diff --git a/src/Sarif/Autogenerated/SarifLogEqualityComparer.cs b/src/Sarif/Autogenerated/SarifLogEqualityComparer.cs index b66850f8a..5d31b393d 100644 --- a/src/Sarif/Autogenerated/SarifLogEqualityComparer.cs +++ b/src/Sarif/Autogenerated/SarifLogEqualityComparer.cs @@ -4,7 +4,6 @@ using System; using System.CodeDom.Compiler; using System.Collections.Generic; - using Microsoft.CodeAnalysis.Sarif.Readers; namespace Microsoft.CodeAnalysis.Sarif @@ -166,4 +165,4 @@ public int GetHashCode(SarifLog obj) return result; } } -} +} \ No newline at end of file diff --git a/src/Sarif/Autogenerated/SarifNodeKind.cs b/src/Sarif/Autogenerated/SarifNodeKind.cs index f2b495e87..c3a1abaab 100644 --- a/src/Sarif/Autogenerated/SarifNodeKind.cs +++ b/src/Sarif/Autogenerated/SarifNodeKind.cs @@ -228,4 +228,4 @@ public enum SarifNodeKind /// WebResponse } -} +} \ No newline at end of file diff --git a/src/Sarif/Autogenerated/SarifRewritingVisitor.cs b/src/Sarif/Autogenerated/SarifRewritingVisitor.cs index f0d843f28..378e77e82 100644 --- a/src/Sarif/Autogenerated/SarifRewritingVisitor.cs +++ b/src/Sarif/Autogenerated/SarifRewritingVisitor.cs @@ -1454,4 +1454,4 @@ public virtual WebResponse VisitWebResponse(WebResponse node) return node; } } -} +} \ No newline at end of file diff --git a/src/Sarif/Autogenerated/SarifVersion.cs b/src/Sarif/Autogenerated/SarifVersion.cs index cbee06635..0587d68ae 100644 --- a/src/Sarif/Autogenerated/SarifVersion.cs +++ b/src/Sarif/Autogenerated/SarifVersion.cs @@ -15,4 +15,4 @@ public enum SarifVersion OneZeroZero, Current } -} +} \ No newline at end of file diff --git a/src/Sarif/Autogenerated/SpecialLocations.cs b/src/Sarif/Autogenerated/SpecialLocations.cs index f174fb943..65add4482 100644 --- a/src/Sarif/Autogenerated/SpecialLocations.cs +++ b/src/Sarif/Autogenerated/SpecialLocations.cs @@ -5,7 +5,6 @@ using System.CodeDom.Compiler; using System.Collections.Generic; using System.Runtime.Serialization; - using Microsoft.CodeAnalysis.Sarif.Readers; namespace Microsoft.CodeAnalysis.Sarif @@ -116,4 +115,4 @@ protected virtual void Init(ArtifactLocation displayBase, IDictionary frames, IDi } } } -} +} \ No newline at end of file diff --git a/src/Sarif/Autogenerated/StackEqualityComparer.cs b/src/Sarif/Autogenerated/StackEqualityComparer.cs index 24881a6c0..4d6fe53ee 100644 --- a/src/Sarif/Autogenerated/StackEqualityComparer.cs +++ b/src/Sarif/Autogenerated/StackEqualityComparer.cs @@ -4,7 +4,6 @@ using System; using System.CodeDom.Compiler; using System.Collections.Generic; - using Microsoft.CodeAnalysis.Sarif.Readers; namespace Microsoft.CodeAnalysis.Sarif @@ -127,4 +126,4 @@ public int GetHashCode(Stack obj) return result; } } -} +} \ No newline at end of file diff --git a/src/Sarif/Autogenerated/StackFrame.cs b/src/Sarif/Autogenerated/StackFrame.cs index 411e1c73f..b24be34cb 100644 --- a/src/Sarif/Autogenerated/StackFrame.cs +++ b/src/Sarif/Autogenerated/StackFrame.cs @@ -5,9 +5,7 @@ using System.CodeDom.Compiler; using System.Collections.Generic; using System.Runtime.Serialization; - using Microsoft.CodeAnalysis.Sarif.Readers; - using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif @@ -159,4 +157,4 @@ protected virtual void Init(Location location, string module, int threadId, IEnu } } } -} +} \ No newline at end of file diff --git a/src/Sarif/Autogenerated/StackFrameEqualityComparer.cs b/src/Sarif/Autogenerated/StackFrameEqualityComparer.cs index a35c753ef..780dfb645 100644 --- a/src/Sarif/Autogenerated/StackFrameEqualityComparer.cs +++ b/src/Sarif/Autogenerated/StackFrameEqualityComparer.cs @@ -4,7 +4,6 @@ using System; using System.CodeDom.Compiler; using System.Collections.Generic; - using Microsoft.CodeAnalysis.Sarif.Readers; namespace Microsoft.CodeAnalysis.Sarif @@ -143,4 +142,4 @@ public int GetHashCode(StackFrame obj) return result; } } -} +} \ No newline at end of file diff --git a/src/Sarif/Autogenerated/Suppression.cs b/src/Sarif/Autogenerated/Suppression.cs index b3119970c..4ad18f219 100644 --- a/src/Sarif/Autogenerated/Suppression.cs +++ b/src/Sarif/Autogenerated/Suppression.cs @@ -5,9 +5,7 @@ using System.CodeDom.Compiler; using System.Collections.Generic; using System.Runtime.Serialization; - using Microsoft.CodeAnalysis.Sarif.Readers; - using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif @@ -160,4 +158,4 @@ protected virtual void Init(string guid, SuppressionKind kind, SuppressionStatus } } } -} +} \ No newline at end of file diff --git a/src/Sarif/Autogenerated/SuppressionEqualityComparer.cs b/src/Sarif/Autogenerated/SuppressionEqualityComparer.cs index c99a8b08a..ecd37a5f0 100644 --- a/src/Sarif/Autogenerated/SuppressionEqualityComparer.cs +++ b/src/Sarif/Autogenerated/SuppressionEqualityComparer.cs @@ -4,7 +4,6 @@ using System; using System.CodeDom.Compiler; using System.Collections.Generic; - using Microsoft.CodeAnalysis.Sarif.Readers; namespace Microsoft.CodeAnalysis.Sarif @@ -126,4 +125,4 @@ public int GetHashCode(Suppression obj) return result; } } -} +} \ No newline at end of file diff --git a/src/Sarif/Autogenerated/SuppressionKind.cs b/src/Sarif/Autogenerated/SuppressionKind.cs index fd4d8d7e5..bf683f471 100644 --- a/src/Sarif/Autogenerated/SuppressionKind.cs +++ b/src/Sarif/Autogenerated/SuppressionKind.cs @@ -15,4 +15,4 @@ public enum SuppressionKind InSource, External } -} +} \ No newline at end of file diff --git a/src/Sarif/Autogenerated/SuppressionStatus.cs b/src/Sarif/Autogenerated/SuppressionStatus.cs index da6580912..3bedd5775 100644 --- a/src/Sarif/Autogenerated/SuppressionStatus.cs +++ b/src/Sarif/Autogenerated/SuppressionStatus.cs @@ -16,4 +16,4 @@ public enum SuppressionStatus UnderReview, Rejected } -} +} \ No newline at end of file diff --git a/src/Sarif/Autogenerated/ThreadFlow.cs b/src/Sarif/Autogenerated/ThreadFlow.cs index 169af2062..aabe20ada 100644 --- a/src/Sarif/Autogenerated/ThreadFlow.cs +++ b/src/Sarif/Autogenerated/ThreadFlow.cs @@ -5,7 +5,6 @@ using System.CodeDom.Compiler; using System.Collections.Generic; using System.Runtime.Serialization; - using Microsoft.CodeAnalysis.Sarif.Readers; namespace Microsoft.CodeAnalysis.Sarif @@ -173,4 +172,4 @@ protected virtual void Init(string id, Message message, object initialState, obj } } } -} +} \ No newline at end of file diff --git a/src/Sarif/Autogenerated/ThreadFlowEqualityComparer.cs b/src/Sarif/Autogenerated/ThreadFlowEqualityComparer.cs index 0e2095b7c..482fd51e6 100644 --- a/src/Sarif/Autogenerated/ThreadFlowEqualityComparer.cs +++ b/src/Sarif/Autogenerated/ThreadFlowEqualityComparer.cs @@ -4,7 +4,6 @@ using System; using System.CodeDom.Compiler; using System.Collections.Generic; - using Microsoft.CodeAnalysis.Sarif.Readers; namespace Microsoft.CodeAnalysis.Sarif @@ -157,4 +156,4 @@ public int GetHashCode(ThreadFlow obj) return result; } } -} +} \ No newline at end of file diff --git a/src/Sarif/Autogenerated/ThreadFlowLocation.cs b/src/Sarif/Autogenerated/ThreadFlowLocation.cs index 21aa1e4ef..02d02a7cd 100644 --- a/src/Sarif/Autogenerated/ThreadFlowLocation.cs +++ b/src/Sarif/Autogenerated/ThreadFlowLocation.cs @@ -6,9 +6,7 @@ using System.Collections.Generic; using System.ComponentModel; using System.Runtime.Serialization; - using Microsoft.CodeAnalysis.Sarif.Readers; - using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif @@ -299,4 +297,4 @@ protected virtual void Init(int index, Location location, Stack stack, IEnumerab } } } -} +} \ No newline at end of file diff --git a/src/Sarif/Autogenerated/ThreadFlowLocationEqualityComparer.cs b/src/Sarif/Autogenerated/ThreadFlowLocationEqualityComparer.cs index 61d2a91f9..9d2f9b38e 100644 --- a/src/Sarif/Autogenerated/ThreadFlowLocationEqualityComparer.cs +++ b/src/Sarif/Autogenerated/ThreadFlowLocationEqualityComparer.cs @@ -4,7 +4,6 @@ using System; using System.CodeDom.Compiler; using System.Collections.Generic; - using Microsoft.CodeAnalysis.Sarif.Readers; namespace Microsoft.CodeAnalysis.Sarif @@ -268,4 +267,4 @@ public int GetHashCode(ThreadFlowLocation obj) return result; } } -} +} \ No newline at end of file diff --git a/src/Sarif/Autogenerated/ThreadFlowLocationImportance.cs b/src/Sarif/Autogenerated/ThreadFlowLocationImportance.cs index bdaec34cd..586eacea3 100644 --- a/src/Sarif/Autogenerated/ThreadFlowLocationImportance.cs +++ b/src/Sarif/Autogenerated/ThreadFlowLocationImportance.cs @@ -15,4 +15,4 @@ public enum ThreadFlowLocationImportance Essential, Unimportant } -} +} \ No newline at end of file diff --git a/src/Sarif/Autogenerated/Tool.cs b/src/Sarif/Autogenerated/Tool.cs index 42592f8e5..2992dae86 100644 --- a/src/Sarif/Autogenerated/Tool.cs +++ b/src/Sarif/Autogenerated/Tool.cs @@ -5,9 +5,7 @@ using System.CodeDom.Compiler; using System.Collections.Generic; using System.Runtime.Serialization; - using Microsoft.CodeAnalysis.Sarif.Readers; - using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif @@ -146,4 +144,4 @@ protected virtual void Init(ToolComponent driver, IEnumerable ext } } } -} +} \ No newline at end of file diff --git a/src/Sarif/Autogenerated/ToolComponent.cs b/src/Sarif/Autogenerated/ToolComponent.cs index e45299c9e..5a424ae20 100644 --- a/src/Sarif/Autogenerated/ToolComponent.cs +++ b/src/Sarif/Autogenerated/ToolComponent.cs @@ -6,9 +6,7 @@ using System.Collections.Generic; using System.ComponentModel; using System.Runtime.Serialization; - using Microsoft.CodeAnalysis.Sarif.Readers; - using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif @@ -505,4 +503,4 @@ protected virtual void Init(string guid, string name, string organization, strin } } } -} +} \ No newline at end of file diff --git a/src/Sarif/Autogenerated/ToolComponentContents.cs b/src/Sarif/Autogenerated/ToolComponentContents.cs index f08aecf1b..8c3e8af3e 100644 --- a/src/Sarif/Autogenerated/ToolComponentContents.cs +++ b/src/Sarif/Autogenerated/ToolComponentContents.cs @@ -17,4 +17,4 @@ public enum ToolComponentContents LocalizedData = 1, NonLocalizedData = 2 } -} +} \ No newline at end of file diff --git a/src/Sarif/Autogenerated/ToolComponentEqualityComparer.cs b/src/Sarif/Autogenerated/ToolComponentEqualityComparer.cs index a9a38c60a..90254b3a6 100644 --- a/src/Sarif/Autogenerated/ToolComponentEqualityComparer.cs +++ b/src/Sarif/Autogenerated/ToolComponentEqualityComparer.cs @@ -4,7 +4,6 @@ using System; using System.CodeDom.Compiler; using System.Collections.Generic; - using Microsoft.CodeAnalysis.Sarif.Readers; namespace Microsoft.CodeAnalysis.Sarif @@ -489,4 +488,4 @@ public int GetHashCode(ToolComponent obj) return result; } } -} +} \ No newline at end of file diff --git a/src/Sarif/Autogenerated/ToolComponentReference.cs b/src/Sarif/Autogenerated/ToolComponentReference.cs index 752586bcc..d653e3600 100644 --- a/src/Sarif/Autogenerated/ToolComponentReference.cs +++ b/src/Sarif/Autogenerated/ToolComponentReference.cs @@ -6,9 +6,7 @@ using System.Collections.Generic; using System.ComponentModel; using System.Runtime.Serialization; - using Microsoft.CodeAnalysis.Sarif.Readers; - using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif @@ -138,4 +136,4 @@ protected virtual void Init(string name, int index, string guid, IDictionary CalculatePossibleRemappings(IEnumerable baseline, IEnumerable current); } -} +} \ No newline at end of file diff --git a/src/Sarif/Baseline/ResultMatching/RemappingCalculators/SarifLogRemapping.cs b/src/Sarif/Baseline/ResultMatching/RemappingCalculators/SarifLogRemapping.cs index e66ee52a3..ab905c47d 100644 --- a/src/Sarif/Baseline/ResultMatching/RemappingCalculators/SarifLogRemapping.cs +++ b/src/Sarif/Baseline/ResultMatching/RemappingCalculators/SarifLogRemapping.cs @@ -11,4 +11,4 @@ public class SarifLogRemapping public Func RemapResult { get; private set; } } -} +} \ No newline at end of file diff --git a/src/Sarif/Baseline/ResultMatching/ResultMatchingBaselinerFactory.cs b/src/Sarif/Baseline/ResultMatching/ResultMatchingBaselinerFactory.cs index 0fcd82a57..8ad23b138 100644 --- a/src/Sarif/Baseline/ResultMatching/ResultMatchingBaselinerFactory.cs +++ b/src/Sarif/Baseline/ResultMatching/ResultMatchingBaselinerFactory.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; - using Microsoft.CodeAnalysis.Sarif.Baseline.ResultMatching.ExactMatchers; using Microsoft.CodeAnalysis.Sarif.Baseline.ResultMatching.HeuristicMatchers; diff --git a/src/Sarif/Baseline/V2/WhatComponent.cs b/src/Sarif/Baseline/V2/WhatComponent.cs index 9f28c47cd..cb284dc0f 100644 --- a/src/Sarif/Baseline/V2/WhatComponent.cs +++ b/src/Sarif/Baseline/V2/WhatComponent.cs @@ -38,7 +38,7 @@ public bool Equals(WhatComponent other) public override bool Equals(object obj) { - if (obj is WhatComponent) + if(obj is WhatComponent) { return Equals((WhatComponent)obj); } diff --git a/src/Sarif/Baseline/V2/WhatMap.cs b/src/Sarif/Baseline/V2/WhatMap.cs index 24d5b982b..a36cbeb28 100644 --- a/src/Sarif/Baseline/V2/WhatMap.cs +++ b/src/Sarif/Baseline/V2/WhatMap.cs @@ -19,7 +19,7 @@ internal class WhatMap // This dictionary tracks which WhatComponents are unique. // The value is the index of the result with that value, if unique, or -1 if in several. private readonly Dictionary _map; - + public WhatMap() { _map = new Dictionary(); @@ -31,7 +31,7 @@ private void Add(ExtractedResult result, HashSet otherRunLocations, int string locationSpecifier = WhereComparer.LocationSpecifier(result, otherRunLocations); // Add Result attributes used as matching hints in a "bucket" for the Rule x LocationSpecifier x AttributeName - foreach (WhatComponent component in result.WhatProperties(locationSpecifier)) + foreach(WhatComponent component in result.WhatProperties(locationSpecifier)) { Add(component, index); } diff --git a/src/Sarif/Baseline/V2/WhereComparer.cs b/src/Sarif/Baseline/V2/WhereComparer.cs index a8cc1546f..d1ddb6bdd 100644 --- a/src/Sarif/Baseline/V2/WhereComparer.cs +++ b/src/Sarif/Baseline/V2/WhereComparer.cs @@ -218,7 +218,7 @@ public static void AddLocationIdentifiers(ExtractedResult result, HashSet public partial class CodeFlow { - public bool ShouldSerializeThreadFlows() + public bool ShouldSerializeThreadFlows() { - return this.ThreadFlows.HasAtLeastOneNonDefaultValue(ThreadFlow.ValueComparer); + return this.ThreadFlows.HasAtLeastOneNonDefaultValue(ThreadFlow.ValueComparer); } } } diff --git a/src/Sarif/Core/IPropertyBagHolder.cs b/src/Sarif/Core/IPropertyBagHolder.cs index d7bba6147..d9a235983 100644 --- a/src/Sarif/Core/IPropertyBagHolder.cs +++ b/src/Sarif/Core/IPropertyBagHolder.cs @@ -19,4 +19,4 @@ public interface IPropertyBagHolder void SetPropertiesFrom(IPropertyBagHolder other); void RemoveProperty(string propertyName); } -} +} \ No newline at end of file diff --git a/src/Sarif/Core/PropertyBagHolder.cs b/src/Sarif/Core/PropertyBagHolder.cs index 2ff328b9d..dc57239a2 100644 --- a/src/Sarif/Core/PropertyBagHolder.cs +++ b/src/Sarif/Core/PropertyBagHolder.cs @@ -6,10 +6,8 @@ using System.Diagnostics; using System.Globalization; using System.Linq; - using Microsoft.CodeAnalysis.Sarif.Readers; using Microsoft.CodeAnalysis.Sarif.Visitors; - using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Sarif/Core/SarifLog.cs b/src/Sarif/Core/SarifLog.cs index c17a98a29..8c87adb75 100644 --- a/src/Sarif/Core/SarifLog.cs +++ b/src/Sarif/Core/SarifLog.cs @@ -2,9 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.IO; - using Microsoft.CodeAnalysis.Sarif.Readers; - using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Sarif/Core/SerializedPropertyInfo.cs b/src/Sarif/Core/SerializedPropertyInfo.cs index e3ea41298..5470e679a 100644 --- a/src/Sarif/Core/SerializedPropertyInfo.cs +++ b/src/Sarif/Core/SerializedPropertyInfo.cs @@ -3,7 +3,6 @@ using Microsoft.CodeAnalysis.Sarif.Readers; - using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Sarif/ExtensionMethods.cs b/src/Sarif/ExtensionMethods.cs index f70bbac5d..ff97e7a9b 100644 --- a/src/Sarif/ExtensionMethods.cs +++ b/src/Sarif/ExtensionMethods.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +using Microsoft.CodeAnalysis.Sarif.Visitors; + using System; using System.Collections; using System.Collections.Generic; @@ -11,8 +13,6 @@ using System.Text.RegularExpressions; using System.Xml; -using Microsoft.CodeAnalysis.Sarif.Visitors; - namespace Microsoft.CodeAnalysis.Sarif { public static class ExtensionMethods @@ -552,4 +552,4 @@ internal static void ConsumeElementOfDepth(this XmlReader xmlReader, int endElem } } } -} +} \ No newline at end of file diff --git a/src/Sarif/ExternalProcess.cs b/src/Sarif/ExternalProcess.cs index dbf408926..dc742c820 100644 --- a/src/Sarif/ExternalProcess.cs +++ b/src/Sarif/ExternalProcess.cs @@ -67,4 +67,4 @@ public ExternalProcess( } } } -} +} \ No newline at end of file diff --git a/src/Sarif/FileRegionsCache.cs b/src/Sarif/FileRegionsCache.cs index 88bf7ade1..201eaac95 100644 --- a/src/Sarif/FileRegionsCache.cs +++ b/src/Sarif/FileRegionsCache.cs @@ -326,4 +326,4 @@ private static void Assert(bool condition) //Debug.Assert(condition); } } -} +} \ No newline at end of file diff --git a/src/Sarif/GlobalSuppressions.cs b/src/Sarif/GlobalSuppressions.cs index 5521cd7a4..b017c3b4d 100644 --- a/src/Sarif/GlobalSuppressions.cs +++ b/src/Sarif/GlobalSuppressions.cs @@ -3,4 +3,4 @@ using System.Diagnostics.CodeAnalysis; -[module: SuppressMessage("Microsoft.Security.Xml", "CA3053:UseXmlSecureResolver", Scope = "member", Target = "Microsoft.CodeAnalysis.Sarif.PropertiesDictionary.#LoadFromXml(System.IO.Stream)")] +[module: SuppressMessage("Microsoft.Security.Xml", "CA3053:UseXmlSecureResolver", Scope = "member", Target = "Microsoft.CodeAnalysis.Sarif.PropertiesDictionary.#LoadFromXml(System.IO.Stream)")] \ No newline at end of file diff --git a/src/Sarif/IConsoleCapture.cs b/src/Sarif/IConsoleCapture.cs index 0abdcf528..f7ce2d69f 100644 --- a/src/Sarif/IConsoleCapture.cs +++ b/src/Sarif/IConsoleCapture.cs @@ -12,4 +12,4 @@ public interface IConsoleCapture string Text { get; } Task Capture(StreamReader reader, CancellationToken cancellationToken); } -} +} \ No newline at end of file diff --git a/src/Sarif/IOption.cs b/src/Sarif/IOption.cs index da2767336..beb09646d 100644 --- a/src/Sarif/IOption.cs +++ b/src/Sarif/IOption.cs @@ -15,3 +15,4 @@ public interface IOption bool IsPerLanguage { get; } } } + diff --git a/src/Sarif/IOptionsProvider.cs b/src/Sarif/IOptionsProvider.cs index 157c6b4f9..cbc143004 100644 --- a/src/Sarif/IOptionsProvider.cs +++ b/src/Sarif/IOptionsProvider.cs @@ -10,4 +10,4 @@ public interface IOptionsProvider [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate", Justification = "This method is expensive and so should not be a property")] IEnumerable GetOptions(); } -} +} \ No newline at end of file diff --git a/src/Sarif/IntegerSet.cs b/src/Sarif/IntegerSet.cs index 4418b4b38..0d2ad6aca 100644 --- a/src/Sarif/IntegerSet.cs +++ b/src/Sarif/IntegerSet.cs @@ -4,7 +4,6 @@ using System; using System.Collections.Generic; using System.Runtime.Serialization; - using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Sarif/NotYetAutoGenerated/Address.cs b/src/Sarif/NotYetAutoGenerated/Address.cs index 0538ddc2f..ddaef8100 100644 --- a/src/Sarif/NotYetAutoGenerated/Address.cs +++ b/src/Sarif/NotYetAutoGenerated/Address.cs @@ -6,9 +6,7 @@ using System.Collections.Generic; using System.ComponentModel; using System.Runtime.Serialization; - using Microsoft.CodeAnalysis.Sarif.Readers; - using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif @@ -206,4 +204,4 @@ private void Init(int absoluteAddress, int? relativeAddress, int? length, string } } } -} +} \ No newline at end of file diff --git a/src/Sarif/NotYetAutoGenerated/Invocation.cs b/src/Sarif/NotYetAutoGenerated/Invocation.cs index f877a5e98..b40d01327 100644 --- a/src/Sarif/NotYetAutoGenerated/Invocation.cs +++ b/src/Sarif/NotYetAutoGenerated/Invocation.cs @@ -5,9 +5,7 @@ using System.CodeDom.Compiler; using System.Collections.Generic; using System.Runtime.Serialization; - using Microsoft.CodeAnalysis.Sarif.Readers; - using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif @@ -489,4 +487,4 @@ protected virtual void Init(string commandLine, IEnumerable arguments, I } } } -} +} \ No newline at end of file diff --git a/src/Sarif/NotYetAutoGenerated/ReportingConfiguration.cs b/src/Sarif/NotYetAutoGenerated/ReportingConfiguration.cs index 320ca9201..a560cbffa 100644 --- a/src/Sarif/NotYetAutoGenerated/ReportingConfiguration.cs +++ b/src/Sarif/NotYetAutoGenerated/ReportingConfiguration.cs @@ -6,9 +6,7 @@ using System.Collections.Generic; using System.ComponentModel; using System.Runtime.Serialization; - using Microsoft.CodeAnalysis.Sarif.Readers; - using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif @@ -159,4 +157,4 @@ private void Init(bool enabled, FailureLevel level, double rank, IDictionary deprecatedIds, string guid, IEn } } } -} +} \ No newline at end of file diff --git a/src/Sarif/NotYetAutoGenerated/Result.cs b/src/Sarif/NotYetAutoGenerated/Result.cs index 451e10051..cae285333 100644 --- a/src/Sarif/NotYetAutoGenerated/Result.cs +++ b/src/Sarif/NotYetAutoGenerated/Result.cs @@ -6,9 +6,7 @@ using System.Collections.Generic; using System.ComponentModel; using System.Runtime.Serialization; - using Microsoft.CodeAnalysis.Sarif.Readers; - using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif @@ -668,4 +666,4 @@ private void Init(string ruleId, int ruleIndex, ReportingDescriptorReference rul } } } -} +} \ No newline at end of file diff --git a/src/Sarif/NotYetAutoGenerated/Run.cs b/src/Sarif/NotYetAutoGenerated/Run.cs index e6e75f668..424ef49f0 100644 --- a/src/Sarif/NotYetAutoGenerated/Run.cs +++ b/src/Sarif/NotYetAutoGenerated/Run.cs @@ -6,9 +6,7 @@ using System.Collections.Generic; using System.ComponentModel; using System.Runtime.Serialization; - using Microsoft.CodeAnalysis.Sarif.Readers; - using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif @@ -684,4 +682,4 @@ private void Init(Tool tool, IEnumerable invocations, Conversion con } } } -} +} \ No newline at end of file diff --git a/src/Sarif/NotYetAutoGenerated/SarifLog.cs b/src/Sarif/NotYetAutoGenerated/SarifLog.cs index 97611a7e2..9a94b3602 100644 --- a/src/Sarif/NotYetAutoGenerated/SarifLog.cs +++ b/src/Sarif/NotYetAutoGenerated/SarifLog.cs @@ -5,9 +5,7 @@ using System.CodeDom.Compiler; using System.Collections.Generic; using System.Runtime.Serialization; - using Microsoft.CodeAnalysis.Sarif.Readers; - using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif @@ -188,4 +186,4 @@ private void Init(Uri schemaUri, SarifVersion version, IEnumerable runs, IE } } } -} +} \ No newline at end of file diff --git a/src/Sarif/Notes.cs b/src/Sarif/Notes.cs index 48529a550..10595d30c 100644 --- a/src/Sarif/Notes.cs +++ b/src/Sarif/Notes.cs @@ -31,4 +31,4 @@ public static void LogNotApplicableToSpecifiedTarget(IAnalysisContext context, s context.RuntimeErrors |= RuntimeConditions.RuleNotApplicableToTarget; } } -} +} \ No newline at end of file diff --git a/src/Sarif/PerLanguageOption.cs b/src/Sarif/PerLanguageOption.cs index ca055917c..7f81a6fef 100644 --- a/src/Sarif/PerLanguageOption.cs +++ b/src/Sarif/PerLanguageOption.cs @@ -83,4 +83,4 @@ public override string ToString() return string.Format(CultureInfo.InvariantCulture, "{0} - {1}", this.Feature, this.Name); } } -} +} \ No newline at end of file diff --git a/src/Sarif/Processors/Log/SarifLogExtensionMethods.cs b/src/Sarif/Processors/Log/SarifLogExtensionMethods.cs index f924291ed..d5ec66d07 100644 --- a/src/Sarif/Processors/Log/SarifLogExtensionMethods.cs +++ b/src/Sarif/Processors/Log/SarifLogExtensionMethods.cs @@ -1,12 +1,12 @@ // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +using Microsoft.CodeAnalysis.Sarif.Visitors; + using System; using System.Collections.Generic; using System.Linq; -using Microsoft.CodeAnalysis.Sarif.Visitors; - namespace Microsoft.CodeAnalysis.Sarif.Processors { /// diff --git a/src/Sarif/Processors/Log/SarifLogPipeline.cs b/src/Sarif/Processors/Log/SarifLogPipeline.cs index 94fb90c6b..6e59d9ba7 100644 --- a/src/Sarif/Processors/Log/SarifLogPipeline.cs +++ b/src/Sarif/Processors/Log/SarifLogPipeline.cs @@ -4,7 +4,6 @@ using System; using System.Collections.Generic; using System.Linq; - using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.Processors diff --git a/src/Sarif/Properties/AssemblyInfo.cs b/src/Sarif/Properties/AssemblyInfo.cs index 3fd1bec8e..f14fe0b91 100644 --- a/src/Sarif/Properties/AssemblyInfo.cs +++ b/src/Sarif/Properties/AssemblyInfo.cs @@ -1,2 +1,2 @@ // Copyright (c) Microsoft. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. \ No newline at end of file diff --git a/src/Sarif/PropertiesDictionary.cs b/src/Sarif/PropertiesDictionary.cs index 7cbbe9f19..8fb66d339 100644 --- a/src/Sarif/PropertiesDictionary.cs +++ b/src/Sarif/PropertiesDictionary.cs @@ -8,7 +8,6 @@ using System.IO; using System.Runtime.Serialization; using System.Xml; - using Newtonsoft.Json; using Newtonsoft.Json.Linq; diff --git a/src/Sarif/Readers/DateTimeConverter.cs b/src/Sarif/Readers/DateTimeConverter.cs index cd3280caa..add0e22e4 100644 --- a/src/Sarif/Readers/DateTimeConverter.cs +++ b/src/Sarif/Readers/DateTimeConverter.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Globalization; - using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.Readers diff --git a/src/Sarif/Readers/DeferredDictionaryConverter.cs b/src/Sarif/Readers/DeferredDictionaryConverter.cs index 26ff7f943..ff1993d1e 100644 --- a/src/Sarif/Readers/DeferredDictionaryConverter.cs +++ b/src/Sarif/Readers/DeferredDictionaryConverter.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Collections.Generic; - using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.Readers diff --git a/src/Sarif/Readers/DeferredListConverter.cs b/src/Sarif/Readers/DeferredListConverter.cs index 1bb0be419..ab2199aec 100644 --- a/src/Sarif/Readers/DeferredListConverter.cs +++ b/src/Sarif/Readers/DeferredListConverter.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Collections.Generic; - using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.Readers diff --git a/src/Sarif/Readers/EnumConverter.cs b/src/Sarif/Readers/EnumConverter.cs index a5ea956d4..4a7f570c5 100644 --- a/src/Sarif/Readers/EnumConverter.cs +++ b/src/Sarif/Readers/EnumConverter.cs @@ -3,7 +3,6 @@ using System; using System.Collections.Generic; - using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.Readers diff --git a/src/Sarif/Readers/JsonPositionedTextReader.cs b/src/Sarif/Readers/JsonPositionedTextReader.cs index df2432564..75b766e0e 100644 --- a/src/Sarif/Readers/JsonPositionedTextReader.cs +++ b/src/Sarif/Readers/JsonPositionedTextReader.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.IO; - using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.Readers diff --git a/src/Sarif/Readers/LineMappingStreamReader.cs b/src/Sarif/Readers/LineMappingStreamReader.cs index bdebdfa94..40374ac66 100644 --- a/src/Sarif/Readers/LineMappingStreamReader.cs +++ b/src/Sarif/Readers/LineMappingStreamReader.cs @@ -67,15 +67,15 @@ private static Stream FindBomWidth(Stream stream, out int bomWidth) { bomWidth = 2; } - else if (buffer[0] == 0xFF && buffer[1] == 0xFE) + else if(buffer[0] == 0xFF && buffer[1] == 0xFE) { bomWidth = 2; } - else if (buffer[0] == 0xEF && buffer[1] == 0xBB && buffer[2] == 0xBF) + else if(buffer[0] == 0xEF && buffer[1] == 0xBB && buffer[2] == 0xBF) { bomWidth = 3; } - else if (buffer[0] == 0x00 && buffer[1] == 0x00 && buffer[2] == 0xFE && buffer[3] == 0xFF) + else if(buffer[0] == 0x00 && buffer[1] == 0x00 && buffer[2] == 0xFE && buffer[3] == 0xFF) { bomWidth = 4; } diff --git a/src/Sarif/Readers/PropertyBagConverter.cs b/src/Sarif/Readers/PropertyBagConverter.cs index d3e95de43..e96baab23 100644 --- a/src/Sarif/Readers/PropertyBagConverter.cs +++ b/src/Sarif/Readers/PropertyBagConverter.cs @@ -28,7 +28,7 @@ public override object ReadJson(JsonReader reader, Type objectType, object exist reader.Read(); - while (reader.TokenType == JsonToken.PropertyName) + while(reader.TokenType == JsonToken.PropertyName) { string name = (string)reader.Value; reader.Read(); diff --git a/src/Sarif/Readers/SarifContractResolver.cs b/src/Sarif/Readers/SarifContractResolver.cs index 93fa65dc3..99c62a0fb 100644 --- a/src/Sarif/Readers/SarifContractResolver.cs +++ b/src/Sarif/Readers/SarifContractResolver.cs @@ -3,7 +3,6 @@ using System; using System.Collections.Generic; - using Newtonsoft.Json.Serialization; namespace Microsoft.CodeAnalysis.Sarif.Readers diff --git a/src/Sarif/Readers/SarifDeferredContractResolver.cs b/src/Sarif/Readers/SarifDeferredContractResolver.cs index af80c1147..afd776a72 100644 --- a/src/Sarif/Readers/SarifDeferredContractResolver.cs +++ b/src/Sarif/Readers/SarifDeferredContractResolver.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Collections.Generic; - using Newtonsoft.Json.Serialization; namespace Microsoft.CodeAnalysis.Sarif.Readers diff --git a/src/Sarif/Readers/SarifVersionConverter.cs b/src/Sarif/Readers/SarifVersionConverter.cs index 4ef3f101b..66eddbc59 100644 --- a/src/Sarif/Readers/SarifVersionConverter.cs +++ b/src/Sarif/Readers/SarifVersionConverter.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; - using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.Readers diff --git a/src/Sarif/Readers/UriConverter.cs b/src/Sarif/Readers/UriConverter.cs index 1b2128235..047a69555 100644 --- a/src/Sarif/Readers/UriConverter.cs +++ b/src/Sarif/Readers/UriConverter.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Collections.Generic; - using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.Readers @@ -59,7 +58,7 @@ public override void WriteJson(JsonWriter writer, object value, JsonSerializer s uri.IsAbsoluteUri && uri.Scheme.Equals(UriUtilities.FileScheme, StringComparison.Ordinal) && !uri.OriginalString.StartsWith(UriUtilities.FileScheme.WithColon(), StringComparison.Ordinal); - + string serializedValue = useAbsoluteUri ? uri.AbsoluteUri : uri.OriginalString; writer.WriteValue(serializedValue); diff --git a/src/Sarif/RuleUtilities.cs b/src/Sarif/RuleUtilities.cs index c0c40a37a..8fa2c425d 100644 --- a/src/Sarif/RuleUtilities.cs +++ b/src/Sarif/RuleUtilities.cs @@ -164,4 +164,4 @@ public static string NormalizeRuleMessageId(string ruleMessageId, string ruleId, return ruleMessageId; } } -} +} \ No newline at end of file diff --git a/src/Sarif/SplittingStrategy.cs b/src/Sarif/SplittingStrategy.cs index 09292ed16..ae36aa07b 100644 --- a/src/Sarif/SplittingStrategy.cs +++ b/src/Sarif/SplittingStrategy.cs @@ -64,4 +64,4 @@ public enum SplittingStrategy /// PerRunPerOrgPerEntityTypePerRepositoryPerPartialFingerprint, } -} +} \ No newline at end of file diff --git a/src/Sarif/StringSet.cs b/src/Sarif/StringSet.cs index d90c88795..e0fa9d1be 100644 --- a/src/Sarif/StringSet.cs +++ b/src/Sarif/StringSet.cs @@ -4,7 +4,6 @@ using System; using System.Collections.Generic; using System.Runtime.Serialization; - using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Sarif/TypedPropertiesDictionary.cs b/src/Sarif/TypedPropertiesDictionary.cs index 5e8360c23..1b4705748 100644 --- a/src/Sarif/TypedPropertiesDictionary.cs +++ b/src/Sarif/TypedPropertiesDictionary.cs @@ -4,7 +4,6 @@ using System; using System.Collections.Generic; using System.Runtime.Serialization; - using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Sarif/TypedPropertiesDictionaryConverter.cs b/src/Sarif/TypedPropertiesDictionaryConverter.cs index 37a81fe7e..322332116 100644 --- a/src/Sarif/TypedPropertiesDictionaryConverter.cs +++ b/src/Sarif/TypedPropertiesDictionaryConverter.cs @@ -5,7 +5,6 @@ using System.Collections; using System.Diagnostics; using System.Linq; - using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; diff --git a/src/Sarif/VersionConstants.cs b/src/Sarif/VersionConstants.cs index a548b060a..c65777505 100644 --- a/src/Sarif/VersionConstants.cs +++ b/src/Sarif/VersionConstants.cs @@ -8,4 +8,4 @@ public static class VersionConstants public const string SchemaVersionAsPublishedToSchemaStoreOrg = "2.1.0-rtm.5"; public const string StableSarifVersion = "2.1.0"; } -} +} \ No newline at end of file diff --git a/src/Sarif/VersionOne/Autogenerated/AlgorithmKindVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/AlgorithmKindVersionOne.cs index 29932f938..1573a87c4 100644 --- a/src/Sarif/VersionOne/Autogenerated/AlgorithmKindVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/AlgorithmKindVersionOne.cs @@ -47,4 +47,4 @@ public enum AlgorithmKindVersionOne Tlsh, Whirlpool } -} +} \ No newline at end of file diff --git a/src/Sarif/VersionOne/Autogenerated/AnnotatedCodeLocationImportanceVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/AnnotatedCodeLocationImportanceVersionOne.cs index 830c4a214..da735066f 100644 --- a/src/Sarif/VersionOne/Autogenerated/AnnotatedCodeLocationImportanceVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/AnnotatedCodeLocationImportanceVersionOne.cs @@ -15,4 +15,4 @@ public enum AnnotatedCodeLocationImportanceVersionOne Essential, Unimportant } -} +} \ No newline at end of file diff --git a/src/Sarif/VersionOne/Autogenerated/AnnotatedCodeLocationKindVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/AnnotatedCodeLocationKindVersionOne.cs index 6090247da..871a34966 100644 --- a/src/Sarif/VersionOne/Autogenerated/AnnotatedCodeLocationKindVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/AnnotatedCodeLocationKindVersionOne.cs @@ -24,4 +24,4 @@ public enum AnnotatedCodeLocationKindVersionOne FunctionReturn, Usage } -} +} \ No newline at end of file diff --git a/src/Sarif/VersionOne/Autogenerated/AnnotatedCodeLocationVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/AnnotatedCodeLocationVersionOne.cs index 74c699a91..70ad5d8e5 100644 --- a/src/Sarif/VersionOne/Autogenerated/AnnotatedCodeLocationVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/AnnotatedCodeLocationVersionOne.cs @@ -5,7 +5,6 @@ using System.CodeDom.Compiler; using System.Collections.Generic; using System.Runtime.Serialization; - using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.VersionOne @@ -319,4 +318,4 @@ private void Init(int id, int step, PhysicalLocationVersionOne physicalLocation, } } } -} +} \ No newline at end of file diff --git a/src/Sarif/VersionOne/Autogenerated/AnnotatedCodeLocationVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/AnnotatedCodeLocationVersionOneEqualityComparer.cs index 19b59db9d..bb9c850c2 100644 --- a/src/Sarif/VersionOne/Autogenerated/AnnotatedCodeLocationVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/AnnotatedCodeLocationVersionOneEqualityComparer.cs @@ -307,4 +307,4 @@ public int GetHashCode(AnnotatedCodeLocationVersionOne obj) return result; } } -} +} \ No newline at end of file diff --git a/src/Sarif/VersionOne/Autogenerated/AnnotationVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/AnnotationVersionOne.cs index 9cdb88a1f..84060bc5c 100644 --- a/src/Sarif/VersionOne/Autogenerated/AnnotationVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/AnnotationVersionOne.cs @@ -120,4 +120,4 @@ private void Init(string message, IEnumerable locati } } } -} +} \ No newline at end of file diff --git a/src/Sarif/VersionOne/Autogenerated/AnnotationVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/AnnotationVersionOneEqualityComparer.cs index 9cc223f58..b0df81fc7 100644 --- a/src/Sarif/VersionOne/Autogenerated/AnnotationVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/AnnotationVersionOneEqualityComparer.cs @@ -86,4 +86,4 @@ public int GetHashCode(AnnotationVersionOne obj) return result; } } -} +} \ No newline at end of file diff --git a/src/Sarif/VersionOne/Autogenerated/BaselineStateVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/BaselineStateVersionOne.cs index 3ae7da2f3..e774b04ba 100644 --- a/src/Sarif/VersionOne/Autogenerated/BaselineStateVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/BaselineStateVersionOne.cs @@ -16,4 +16,4 @@ public enum BaselineStateVersionOne New, Absent } -} +} \ No newline at end of file diff --git a/src/Sarif/VersionOne/Autogenerated/CodeFlowVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/CodeFlowVersionOne.cs index f3a89c9fe..d7bf1b86c 100644 --- a/src/Sarif/VersionOne/Autogenerated/CodeFlowVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/CodeFlowVersionOne.cs @@ -134,4 +134,4 @@ private void Init(string message, IEnumerable l } } } -} +} \ No newline at end of file diff --git a/src/Sarif/VersionOne/Autogenerated/CodeFlowVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/CodeFlowVersionOneEqualityComparer.cs index 5ed5261c8..35c1184df 100644 --- a/src/Sarif/VersionOne/Autogenerated/CodeFlowVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/CodeFlowVersionOneEqualityComparer.cs @@ -124,4 +124,4 @@ public int GetHashCode(CodeFlowVersionOne obj) return result; } } -} +} \ No newline at end of file diff --git a/src/Sarif/VersionOne/Autogenerated/ExceptionDataVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/ExceptionDataVersionOne.cs index e9eff284e..0bcc22af1 100644 --- a/src/Sarif/VersionOne/Autogenerated/ExceptionDataVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/ExceptionDataVersionOne.cs @@ -144,4 +144,4 @@ private void Init(string kind, string message, StackVersionOne stack, IEnumerabl } } } -} +} \ No newline at end of file diff --git a/src/Sarif/VersionOne/Autogenerated/ExceptionDataVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/ExceptionDataVersionOneEqualityComparer.cs index 9d1889905..780fc5730 100644 --- a/src/Sarif/VersionOne/Autogenerated/ExceptionDataVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/ExceptionDataVersionOneEqualityComparer.cs @@ -106,4 +106,4 @@ public int GetHashCode(ExceptionDataVersionOne obj) return result; } } -} +} \ No newline at end of file diff --git a/src/Sarif/VersionOne/Autogenerated/FileChangeVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/FileChangeVersionOne.cs index 2a960098a..b738fee2b 100644 --- a/src/Sarif/VersionOne/Autogenerated/FileChangeVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/FileChangeVersionOne.cs @@ -137,4 +137,4 @@ private void Init(Uri uri, string uriBaseId, IEnumerable } } } -} +} \ No newline at end of file diff --git a/src/Sarif/VersionOne/Autogenerated/FileChangeVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/FileChangeVersionOneEqualityComparer.cs index 98ac6d20a..a7eb5ee67 100644 --- a/src/Sarif/VersionOne/Autogenerated/FileChangeVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/FileChangeVersionOneEqualityComparer.cs @@ -96,4 +96,4 @@ public int GetHashCode(FileChangeVersionOne obj) return result; } } -} +} \ No newline at end of file diff --git a/src/Sarif/VersionOne/Autogenerated/FileDataVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/FileDataVersionOne.cs index 21b152797..d7a6e53a7 100644 --- a/src/Sarif/VersionOne/Autogenerated/FileDataVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/FileDataVersionOne.cs @@ -201,4 +201,4 @@ private void Init(Uri uri, string uriBaseId, string parentKey, int offset, int l } } } -} +} \ No newline at end of file diff --git a/src/Sarif/VersionOne/Autogenerated/FileDataVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/FileDataVersionOneEqualityComparer.cs index 9af96bf7f..7765b1ff6 100644 --- a/src/Sarif/VersionOne/Autogenerated/FileDataVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/FileDataVersionOneEqualityComparer.cs @@ -176,4 +176,4 @@ public int GetHashCode(FileDataVersionOne obj) return result; } } -} +} \ No newline at end of file diff --git a/src/Sarif/VersionOne/Autogenerated/FixVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/FixVersionOne.cs index 26e604e50..0bfd0e8f0 100644 --- a/src/Sarif/VersionOne/Autogenerated/FixVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/FixVersionOne.cs @@ -123,4 +123,4 @@ private void Init(string description, IEnumerable fileChan } } } -} +} \ No newline at end of file diff --git a/src/Sarif/VersionOne/Autogenerated/FixVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/FixVersionOneEqualityComparer.cs index 07fb8430f..f65c644a9 100644 --- a/src/Sarif/VersionOne/Autogenerated/FixVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/FixVersionOneEqualityComparer.cs @@ -86,4 +86,4 @@ public int GetHashCode(FixVersionOne obj) return result; } } -} +} \ No newline at end of file diff --git a/src/Sarif/VersionOne/Autogenerated/FormattedRuleMessageVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/FormattedRuleMessageVersionOne.cs index da58283b6..6ee19bbe5 100644 --- a/src/Sarif/VersionOne/Autogenerated/FormattedRuleMessageVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/FormattedRuleMessageVersionOne.cs @@ -116,4 +116,4 @@ private void Init(string formatId, IEnumerable arguments) } } } -} +} \ No newline at end of file diff --git a/src/Sarif/VersionOne/Autogenerated/FormattedRuleMessageVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/FormattedRuleMessageVersionOneEqualityComparer.cs index 30d91871a..366ef508c 100644 --- a/src/Sarif/VersionOne/Autogenerated/FormattedRuleMessageVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/FormattedRuleMessageVersionOneEqualityComparer.cs @@ -86,4 +86,4 @@ public int GetHashCode(FormattedRuleMessageVersionOne obj) return result; } } -} +} \ No newline at end of file diff --git a/src/Sarif/VersionOne/Autogenerated/HashVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/HashVersionOne.cs index abbf3be35..ddddf352d 100644 --- a/src/Sarif/VersionOne/Autogenerated/HashVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/HashVersionOne.cs @@ -107,4 +107,4 @@ private void Init(string value, AlgorithmKindVersionOne algorithm) Algorithm = algorithm; } } -} +} \ No newline at end of file diff --git a/src/Sarif/VersionOne/Autogenerated/HashVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/HashVersionOneEqualityComparer.cs index 31fc3f58b..dd0822cb6 100644 --- a/src/Sarif/VersionOne/Autogenerated/HashVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/HashVersionOneEqualityComparer.cs @@ -60,4 +60,4 @@ public int GetHashCode(HashVersionOne obj) return result; } } -} +} \ No newline at end of file diff --git a/src/Sarif/VersionOne/Autogenerated/IRuleVersionOneVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/IRuleVersionOneVersionOne.cs index 4417b37a3..98b7fc28d 100644 --- a/src/Sarif/VersionOne/Autogenerated/IRuleVersionOneVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/IRuleVersionOneVersionOne.cs @@ -53,4 +53,4 @@ public partial interface IRuleVersionOneVersionOne /// Uri HelpUri { get; } } -} +} \ No newline at end of file diff --git a/src/Sarif/VersionOne/Autogenerated/ISarifNodeVersionOneVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/ISarifNodeVersionOneVersionOne.cs index 2703ecb6c..8295b065f 100644 --- a/src/Sarif/VersionOne/Autogenerated/ISarifNodeVersionOneVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/ISarifNodeVersionOneVersionOne.cs @@ -21,4 +21,4 @@ public interface ISarifNodeVersionOne /// ISarifNodeVersionOne DeepClone(); } -} +} \ No newline at end of file diff --git a/src/Sarif/VersionOne/Autogenerated/InvocationVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/InvocationVersionOne.cs index 80ef2c8b1..40660738e 100644 --- a/src/Sarif/VersionOne/Autogenerated/InvocationVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/InvocationVersionOne.cs @@ -208,4 +208,4 @@ private void Init(string commandLine, IDictionary responseFiles, } } } -} +} \ No newline at end of file diff --git a/src/Sarif/VersionOne/Autogenerated/InvocationVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/InvocationVersionOneEqualityComparer.cs index 6489c5e30..a1d2a4412 100644 --- a/src/Sarif/VersionOne/Autogenerated/InvocationVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/InvocationVersionOneEqualityComparer.cs @@ -225,4 +225,4 @@ public int GetHashCode(InvocationVersionOne obj) return result; } } -} +} \ No newline at end of file diff --git a/src/Sarif/VersionOne/Autogenerated/LocationVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/LocationVersionOne.cs index 5395f4ae0..ecf642b12 100644 --- a/src/Sarif/VersionOne/Autogenerated/LocationVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/LocationVersionOne.cs @@ -158,4 +158,4 @@ private void Init(PhysicalLocationVersionOne analysisTarget, PhysicalLocationVer } } } -} +} \ No newline at end of file diff --git a/src/Sarif/VersionOne/Autogenerated/LocationVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/LocationVersionOneEqualityComparer.cs index fedc6845a..cd3431753 100644 --- a/src/Sarif/VersionOne/Autogenerated/LocationVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/LocationVersionOneEqualityComparer.cs @@ -131,4 +131,4 @@ public int GetHashCode(LocationVersionOne obj) return result; } } -} +} \ No newline at end of file diff --git a/src/Sarif/VersionOne/Autogenerated/LogicalLocationVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/LogicalLocationVersionOne.cs index a7432b782..dfdb52b22 100644 --- a/src/Sarif/VersionOne/Autogenerated/LogicalLocationVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/LogicalLocationVersionOne.cs @@ -117,4 +117,4 @@ private void Init(string name, string parentKey, string kind) Kind = kind; } } -} +} \ No newline at end of file diff --git a/src/Sarif/VersionOne/Autogenerated/LogicalLocationVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/LogicalLocationVersionOneEqualityComparer.cs index 750cbaebd..a6d92aaf5 100644 --- a/src/Sarif/VersionOne/Autogenerated/LogicalLocationVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/LogicalLocationVersionOneEqualityComparer.cs @@ -73,4 +73,4 @@ public int GetHashCode(LogicalLocationVersionOne obj) return result; } } -} +} \ No newline at end of file diff --git a/src/Sarif/VersionOne/Autogenerated/NotificationLevelVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/NotificationLevelVersionOne.cs index d409ec3ff..d1f943999 100644 --- a/src/Sarif/VersionOne/Autogenerated/NotificationLevelVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/NotificationLevelVersionOne.cs @@ -15,4 +15,4 @@ public enum NotificationLevelVersionOne Note, Error } -} +} \ No newline at end of file diff --git a/src/Sarif/VersionOne/Autogenerated/NotificationVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/NotificationVersionOne.cs index 8e7f57474..ed1a52247 100644 --- a/src/Sarif/VersionOne/Autogenerated/NotificationVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/NotificationVersionOne.cs @@ -198,4 +198,4 @@ private void Init(string id, string ruleId, string ruleKey, PhysicalLocationVers } } } -} +} \ No newline at end of file diff --git a/src/Sarif/VersionOne/Autogenerated/NotificationVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/NotificationVersionOneEqualityComparer.cs index 59a41a647..e57aa5ae9 100644 --- a/src/Sarif/VersionOne/Autogenerated/NotificationVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/NotificationVersionOneEqualityComparer.cs @@ -159,4 +159,4 @@ public int GetHashCode(NotificationVersionOne obj) return result; } } -} +} \ No newline at end of file diff --git a/src/Sarif/VersionOne/Autogenerated/PhysicalLocationVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/PhysicalLocationVersionOne.cs index 4dd3de40e..ad4975291 100644 --- a/src/Sarif/VersionOne/Autogenerated/PhysicalLocationVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/PhysicalLocationVersionOne.cs @@ -124,4 +124,4 @@ private void Init(Uri uri, string uriBaseId, RegionVersionOne region) } } } -} +} \ No newline at end of file diff --git a/src/Sarif/VersionOne/Autogenerated/PhysicalLocationVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/PhysicalLocationVersionOneEqualityComparer.cs index f9882b975..d44761929 100644 --- a/src/Sarif/VersionOne/Autogenerated/PhysicalLocationVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/PhysicalLocationVersionOneEqualityComparer.cs @@ -73,4 +73,4 @@ public int GetHashCode(PhysicalLocationVersionOne obj) return result; } } -} +} \ No newline at end of file diff --git a/src/Sarif/VersionOne/Autogenerated/RegionVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/RegionVersionOne.cs index 98a5d8304..ea2ceee12 100644 --- a/src/Sarif/VersionOne/Autogenerated/RegionVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/RegionVersionOne.cs @@ -147,4 +147,4 @@ private void Init(int startLine, int startColumn, int endLine, int endColumn, in Length = length; } } -} +} \ No newline at end of file diff --git a/src/Sarif/VersionOne/Autogenerated/RegionVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/RegionVersionOneEqualityComparer.cs index 02424b9c3..12c58789e 100644 --- a/src/Sarif/VersionOne/Autogenerated/RegionVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/RegionVersionOneEqualityComparer.cs @@ -80,4 +80,4 @@ public int GetHashCode(RegionVersionOne obj) return result; } } -} +} \ No newline at end of file diff --git a/src/Sarif/VersionOne/Autogenerated/ReplacementVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/ReplacementVersionOne.cs index fadaef1d8..80d9c671b 100644 --- a/src/Sarif/VersionOne/Autogenerated/ReplacementVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/ReplacementVersionOne.cs @@ -117,4 +117,4 @@ private void Init(int offset, int deletedLength, string insertedBytes) InsertedBytes = insertedBytes; } } -} +} \ No newline at end of file diff --git a/src/Sarif/VersionOne/Autogenerated/ReplacementVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/ReplacementVersionOneEqualityComparer.cs index 06b55ad36..569287048 100644 --- a/src/Sarif/VersionOne/Autogenerated/ReplacementVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/ReplacementVersionOneEqualityComparer.cs @@ -65,4 +65,4 @@ public int GetHashCode(ReplacementVersionOne obj) return result; } } -} +} \ No newline at end of file diff --git a/src/Sarif/VersionOne/Autogenerated/ResultLevelVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/ResultLevelVersionOne.cs index fe7b82fe1..1e1638f59 100644 --- a/src/Sarif/VersionOne/Autogenerated/ResultLevelVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/ResultLevelVersionOne.cs @@ -18,4 +18,4 @@ public enum ResultLevelVersionOne Warning, Error } -} +} \ No newline at end of file diff --git a/src/Sarif/VersionOne/Autogenerated/ResultVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/ResultVersionOne.cs index 656bceb8d..1df918f85 100644 --- a/src/Sarif/VersionOne/Autogenerated/ResultVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/ResultVersionOne.cs @@ -337,4 +337,4 @@ private void Init(string ruleId, string ruleKey, ResultLevelVersionOne level, st public bool ShouldSerializeLevel() { return this.Level != ResultLevelVersionOne.Warning; } } -} +} \ No newline at end of file diff --git a/src/Sarif/VersionOne/Autogenerated/ResultVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/ResultVersionOneEqualityComparer.cs index 811ce1b5b..782077c8e 100644 --- a/src/Sarif/VersionOne/Autogenerated/ResultVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/ResultVersionOneEqualityComparer.cs @@ -334,4 +334,4 @@ public int GetHashCode(ResultVersionOne obj) return result; } } -} +} \ No newline at end of file diff --git a/src/Sarif/VersionOne/Autogenerated/RuleConfigurationVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/RuleConfigurationVersionOne.cs index 62d672952..5ebed7aa7 100644 --- a/src/Sarif/VersionOne/Autogenerated/RuleConfigurationVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/RuleConfigurationVersionOne.cs @@ -15,4 +15,4 @@ public enum RuleConfigurationVersionOne Enabled, Disabled } -} +} \ No newline at end of file diff --git a/src/Sarif/VersionOne/Autogenerated/RuleVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/RuleVersionOne.cs index 8db619a6f..dcc061e27 100644 --- a/src/Sarif/VersionOne/Autogenerated/RuleVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/RuleVersionOne.cs @@ -188,4 +188,4 @@ private void Init(string id, string name, string shortDescription, string fullDe } } } -} +} \ No newline at end of file diff --git a/src/Sarif/VersionOne/Autogenerated/RuleVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/RuleVersionOneEqualityComparer.cs index 8a5d17984..d186f1cc9 100644 --- a/src/Sarif/VersionOne/Autogenerated/RuleVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/RuleVersionOneEqualityComparer.cs @@ -181,4 +181,4 @@ public int GetHashCode(RuleVersionOne obj) return result; } } -} +} \ No newline at end of file diff --git a/src/Sarif/VersionOne/Autogenerated/RunVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/RunVersionOne.cs index c0dd9fdc1..bb7fa9ada 100644 --- a/src/Sarif/VersionOne/Autogenerated/RunVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/RunVersionOne.cs @@ -313,4 +313,4 @@ private void Init(ToolVersionOne tool, InvocationVersionOne invocation, IDiction } } } -} +} \ No newline at end of file diff --git a/src/Sarif/VersionOne/Autogenerated/RunVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/RunVersionOneEqualityComparer.cs index 387bd7ea9..1747f2095 100644 --- a/src/Sarif/VersionOne/Autogenerated/RunVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/RunVersionOneEqualityComparer.cs @@ -364,4 +364,4 @@ public int GetHashCode(RunVersionOne obj) return result; } } -} +} \ No newline at end of file diff --git a/src/Sarif/VersionOne/Autogenerated/SarifLogVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/SarifLogVersionOne.cs index 91fc655ba..06b32a047 100644 --- a/src/Sarif/VersionOne/Autogenerated/SarifLogVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/SarifLogVersionOne.cs @@ -137,4 +137,4 @@ private void Init(Uri schemaUri, SarifVersionVersionOne version, IEnumerable ToolVersionOne } -} +} \ No newline at end of file diff --git a/src/Sarif/VersionOne/Autogenerated/SarifRewritingVisitorVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/SarifRewritingVisitorVersionOne.cs index 28e84950c..14ea2de84 100644 --- a/src/Sarif/VersionOne/Autogenerated/SarifRewritingVisitorVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/SarifRewritingVisitorVersionOne.cs @@ -487,4 +487,4 @@ public virtual ToolVersionOne VisitToolVersionOne(ToolVersionOne node) return node; } } -} +} \ No newline at end of file diff --git a/src/Sarif/VersionOne/Autogenerated/SarifVersionVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/SarifVersionVersionOne.cs index 78e81c3e3..ce8923a4c 100644 --- a/src/Sarif/VersionOne/Autogenerated/SarifVersionVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/SarifVersionVersionOne.cs @@ -14,4 +14,4 @@ public enum SarifVersionVersionOne Unknown, OneZeroZero } -} +} \ No newline at end of file diff --git a/src/Sarif/VersionOne/Autogenerated/StackFrameVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/StackFrameVersionOne.cs index 598b14f5a..057c74a0e 100644 --- a/src/Sarif/VersionOne/Autogenerated/StackFrameVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/StackFrameVersionOne.cs @@ -234,4 +234,4 @@ private void Init(string message, Uri uri, string uriBaseId, int line, int colum } } } -} +} \ No newline at end of file diff --git a/src/Sarif/VersionOne/Autogenerated/StackFrameVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/StackFrameVersionOneEqualityComparer.cs index 5dee181bf..fd9c92f07 100644 --- a/src/Sarif/VersionOne/Autogenerated/StackFrameVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/StackFrameVersionOneEqualityComparer.cs @@ -204,4 +204,4 @@ public int GetHashCode(StackFrameVersionOne obj) return result; } } -} +} \ No newline at end of file diff --git a/src/Sarif/VersionOne/Autogenerated/StackVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/StackVersionOne.cs index f1ced11ed..898f4c17c 100644 --- a/src/Sarif/VersionOne/Autogenerated/StackVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/StackVersionOne.cs @@ -137,4 +137,4 @@ private void Init(string message, IEnumerable frames, IDic } } } -} +} \ No newline at end of file diff --git a/src/Sarif/VersionOne/Autogenerated/StackVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/StackVersionOneEqualityComparer.cs index 3d3d5ed59..362b78f4b 100644 --- a/src/Sarif/VersionOne/Autogenerated/StackVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/StackVersionOneEqualityComparer.cs @@ -124,4 +124,4 @@ public int GetHashCode(StackVersionOne obj) return result; } } -} +} \ No newline at end of file diff --git a/src/Sarif/VersionOne/Autogenerated/SuppressionStatesVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/SuppressionStatesVersionOne.cs index 7a5bf76a0..79d52ec03 100644 --- a/src/Sarif/VersionOne/Autogenerated/SuppressionStatesVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/SuppressionStatesVersionOne.cs @@ -17,4 +17,4 @@ public enum SuppressionStatesVersionOne SuppressedInSource, SuppressedExternally } -} +} \ No newline at end of file diff --git a/src/Sarif/VersionOne/Autogenerated/TaintKindVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/TaintKindVersionOne.cs index 140a81d6b..f92fe044e 100644 --- a/src/Sarif/VersionOne/Autogenerated/TaintKindVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/TaintKindVersionOne.cs @@ -16,4 +16,4 @@ public enum TaintKindVersionOne Source, Sanitizer } -} +} \ No newline at end of file diff --git a/src/Sarif/VersionOne/Autogenerated/ToolVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/ToolVersionOne.cs index 076143638..b0830c61b 100644 --- a/src/Sarif/VersionOne/Autogenerated/ToolVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/ToolVersionOne.cs @@ -170,4 +170,4 @@ private void Init(string name, string fullName, string version, string semanticV } } } -} +} \ No newline at end of file diff --git a/src/Sarif/VersionOne/Autogenerated/ToolVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/ToolVersionOneEqualityComparer.cs index 2610f7018..0b0a86cd2 100644 --- a/src/Sarif/VersionOne/Autogenerated/ToolVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/ToolVersionOneEqualityComparer.cs @@ -151,4 +151,4 @@ public int GetHashCode(ToolVersionOne obj) return result; } } -} +} \ No newline at end of file diff --git a/src/Sarif/VersionOne/Core/IPropertyBagHolderVersionOne.cs b/src/Sarif/VersionOne/Core/IPropertyBagHolderVersionOne.cs index 5b1b21211..50e8eace5 100644 --- a/src/Sarif/VersionOne/Core/IPropertyBagHolderVersionOne.cs +++ b/src/Sarif/VersionOne/Core/IPropertyBagHolderVersionOne.cs @@ -19,4 +19,4 @@ public interface IPropertyBagHolderVersionOne void SetPropertiesFrom(IPropertyBagHolderVersionOne other); void RemoveProperty(string propertyName); } -} +} \ No newline at end of file diff --git a/src/Sarif/VersionOne/Core/PropertyBagHolderVersionOne.cs b/src/Sarif/VersionOne/Core/PropertyBagHolderVersionOne.cs index 8fb236092..dc7622434 100644 --- a/src/Sarif/VersionOne/Core/PropertyBagHolderVersionOne.cs +++ b/src/Sarif/VersionOne/Core/PropertyBagHolderVersionOne.cs @@ -6,9 +6,7 @@ using System.Diagnostics; using System.Globalization; using System.Linq; - using Microsoft.CodeAnalysis.Sarif.Readers; - using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.VersionOne diff --git a/src/Sarif/VersionOne/Readers/AnnotatedCodeLocationIdConverter.cs b/src/Sarif/VersionOne/Readers/AnnotatedCodeLocationIdConverter.cs index ca52b7d17..da75839ab 100644 --- a/src/Sarif/VersionOne/Readers/AnnotatedCodeLocationIdConverter.cs +++ b/src/Sarif/VersionOne/Readers/AnnotatedCodeLocationIdConverter.cs @@ -3,7 +3,6 @@ using System; using System.Globalization; - using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.VersionOne.Readers diff --git a/src/Sarif/VersionOne/Readers/SarifContractResolverVersionOne.cs b/src/Sarif/VersionOne/Readers/SarifContractResolverVersionOne.cs index ec3045a6d..8de697f98 100644 --- a/src/Sarif/VersionOne/Readers/SarifContractResolverVersionOne.cs +++ b/src/Sarif/VersionOne/Readers/SarifContractResolverVersionOne.cs @@ -3,9 +3,7 @@ using System; using System.Collections.Generic; - using Microsoft.CodeAnalysis.Sarif.VersionOne; - using Newtonsoft.Json.Serialization; namespace Microsoft.CodeAnalysis.Sarif.Readers diff --git a/src/Sarif/VersionOne/SarifUtilitiesVersionOne.cs b/src/Sarif/VersionOne/SarifUtilitiesVersionOne.cs index 2839582b0..0946745cc 100644 --- a/src/Sarif/VersionOne/SarifUtilitiesVersionOne.cs +++ b/src/Sarif/VersionOne/SarifUtilitiesVersionOne.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; - using Microsoft.CodeAnalysis.Sarif.VersionOne; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Sarif/Visitors/FilteringVisitor.cs b/src/Sarif/Visitors/FilteringVisitor.cs index c8e9aee24..125aa239c 100644 --- a/src/Sarif/Visitors/FilteringVisitor.cs +++ b/src/Sarif/Visitors/FilteringVisitor.cs @@ -90,3 +90,4 @@ public override ArtifactLocation VisitArtifactLocation(ArtifactLocation node) } } } + diff --git a/src/Sarif/Visitors/PartitioningVisitor.cs b/src/Sarif/Visitors/PartitioningVisitor.cs index 3321145b1..739738ecd 100644 --- a/src/Sarif/Visitors/PartitioningVisitor.cs +++ b/src/Sarif/Visitors/PartitioningVisitor.cs @@ -490,4 +490,4 @@ public override Artifact VisitArtifact(Artifact node) } } } -} +} \ No newline at end of file diff --git a/src/Sarif/Visitors/SarifCurrentToVersionOneVisitor.cs b/src/Sarif/Visitors/SarifCurrentToVersionOneVisitor.cs index 21168da5e..6d5dc5fcf 100644 --- a/src/Sarif/Visitors/SarifCurrentToVersionOneVisitor.cs +++ b/src/Sarif/Visitors/SarifCurrentToVersionOneVisitor.cs @@ -7,10 +7,8 @@ using System.Linq; using System.Security; using System.Text; - using Microsoft.CodeAnalysis.Sarif.VersionOne; using Microsoft.CodeAnalysis.Sarif.Writers; - using Utilities = Microsoft.CodeAnalysis.Sarif.Visitors.SarifTransformerUtilities; namespace Microsoft.CodeAnalysis.Sarif.Visitors diff --git a/src/Sarif/Visitors/SarifTransformerUtilities.cs b/src/Sarif/Visitors/SarifTransformerUtilities.cs index ae99d99fe..519e814ab 100644 --- a/src/Sarif/Visitors/SarifTransformerUtilities.cs +++ b/src/Sarif/Visitors/SarifTransformerUtilities.cs @@ -3,10 +3,8 @@ using System.Collections.Generic; using System.Globalization; - using Microsoft.CodeAnalysis.Sarif.Readers; using Microsoft.CodeAnalysis.Sarif.VersionOne; - using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.Visitors @@ -312,4 +310,4 @@ public static AnnotatedCodeLocationImportanceVersionOne CreateAnnotatedCodeLocat } } } -} +} \ No newline at end of file diff --git a/src/Sarif/Visitors/SarifVersionOneToCurrentVisitor.cs b/src/Sarif/Visitors/SarifVersionOneToCurrentVisitor.cs index 6e39dede7..7ef6ae15c 100644 --- a/src/Sarif/Visitors/SarifVersionOneToCurrentVisitor.cs +++ b/src/Sarif/Visitors/SarifVersionOneToCurrentVisitor.cs @@ -6,10 +6,8 @@ using System.Globalization; using System.Linq; using System.Text.RegularExpressions; - using Microsoft.CodeAnalysis.Sarif.VersionOne; using Microsoft.CodeAnalysis.Sarif.Writers; - using Utilities = Microsoft.CodeAnalysis.Sarif.Visitors.SarifTransformerUtilities; namespace Microsoft.CodeAnalysis.Sarif.Visitors diff --git a/src/Sarif/Visitors/UnknownEncodingException.cs b/src/Sarif/Visitors/UnknownEncodingException.cs index ebe5397ff..32bb3b598 100644 --- a/src/Sarif/Visitors/UnknownEncodingException.cs +++ b/src/Sarif/Visitors/UnknownEncodingException.cs @@ -16,4 +16,4 @@ public UnknownEncodingException(string encodingName) EncodingName = encodingName; } } -} +} \ No newline at end of file diff --git a/src/Sarif/Visitors/UpdateIndicesFromLegacyDataVisitor.cs b/src/Sarif/Visitors/UpdateIndicesFromLegacyDataVisitor.cs index e839da046..9bb20bbd8 100644 --- a/src/Sarif/Visitors/UpdateIndicesFromLegacyDataVisitor.cs +++ b/src/Sarif/Visitors/UpdateIndicesFromLegacyDataVisitor.cs @@ -89,4 +89,4 @@ public override ArtifactLocation VisitArtifactLocation(ArtifactLocation node) return base.VisitArtifactLocation(node); } } -} +} \ No newline at end of file diff --git a/src/Sarif/Visitors/VersionOneLogicalLocationKeyToLogicalLocationDataVisitor.cs b/src/Sarif/Visitors/VersionOneLogicalLocationKeyToLogicalLocationDataVisitor.cs index a111ba4f3..2e02f25a8 100644 --- a/src/Sarif/Visitors/VersionOneLogicalLocationKeyToLogicalLocationDataVisitor.cs +++ b/src/Sarif/Visitors/VersionOneLogicalLocationKeyToLogicalLocationDataVisitor.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; - using Microsoft.CodeAnalysis.Sarif.VersionOne; namespace Microsoft.CodeAnalysis.Sarif.Visitors diff --git a/src/Sarif/Warnings.cs b/src/Sarif/Warnings.cs index d0e36baac..ee22e217c 100644 --- a/src/Sarif/Warnings.cs +++ b/src/Sarif/Warnings.cs @@ -123,4 +123,4 @@ public static void LogRuleExplicitlyDisabled(IAnalysisContext context, string ru context.RuntimeErrors |= RuntimeConditions.RuleWasExplicitlyDisabled; } } -} +} \ No newline at end of file diff --git a/src/Sarif/Writers/PrereleaseCompatibilityTransformer.cs b/src/Sarif/Writers/PrereleaseCompatibilityTransformer.cs index 375e719de..4684761db 100644 --- a/src/Sarif/Writers/PrereleaseCompatibilityTransformer.cs +++ b/src/Sarif/Writers/PrereleaseCompatibilityTransformer.cs @@ -2,10 +2,8 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Collections.Generic; - using Microsoft.CodeAnalysis.Sarif.VersionOne; using Microsoft.CodeAnalysis.Sarif.Visitors; - using Newtonsoft.Json; using Newtonsoft.Json.Linq; @@ -2692,4 +2690,4 @@ private static void SplitCurrentNodeNameAndRemainingLeafNodePath(string fullPath } } } -} +} \ No newline at end of file diff --git a/src/Sarif/Writers/ResultLogJsonWriter.cs b/src/Sarif/Writers/ResultLogJsonWriter.cs index a5e0ab0fc..73071fbb7 100644 --- a/src/Sarif/Writers/ResultLogJsonWriter.cs +++ b/src/Sarif/Writers/ResultLogJsonWriter.cs @@ -5,7 +5,6 @@ using System.Collections.Generic; using System.Globalization; using System.Linq; - using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.Writers @@ -259,7 +258,7 @@ public void WriteResults(IEnumerable results) { OpenResults(); } - } + } } public void CloseResults() diff --git a/src/Sarif/Writers/SarifLogger.cs b/src/Sarif/Writers/SarifLogger.cs index dee791303..345b8608d 100644 --- a/src/Sarif/Writers/SarifLogger.cs +++ b/src/Sarif/Writers/SarifLogger.cs @@ -7,7 +7,6 @@ using System.IO; using System.Linq; using System.Text; - using Microsoft.CodeAnalysis.Sarif.Readers; using Microsoft.CodeAnalysis.Sarif.Visitors; @@ -577,4 +576,4 @@ private static Uri Redact(Uri uri, IEnumerable tokensToRedact) return new Uri(uriText, UriKind.RelativeOrAbsolute); } } -} +} \ No newline at end of file diff --git a/src/Sarif/Writers/SarifOneZeroZeroLogger.cs b/src/Sarif/Writers/SarifOneZeroZeroLogger.cs index 859b3f441..71f645b51 100644 --- a/src/Sarif/Writers/SarifOneZeroZeroLogger.cs +++ b/src/Sarif/Writers/SarifOneZeroZeroLogger.cs @@ -3,10 +3,8 @@ using System.Collections.Generic; using System.IO; - using Microsoft.CodeAnalysis.Sarif.Readers; using Microsoft.CodeAnalysis.Sarif.Visitors; - using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.Writers diff --git a/src/Sarif/Writers/SarifPartitioner.cs b/src/Sarif/Writers/SarifPartitioner.cs index 5a623fa36..243539c58 100644 --- a/src/Sarif/Writers/SarifPartitioner.cs +++ b/src/Sarif/Writers/SarifPartitioner.cs @@ -3,7 +3,6 @@ using System; using System.Collections.Generic; - using Microsoft.CodeAnalysis.Sarif.Visitors; namespace Microsoft.CodeAnalysis.Sarif.Writers diff --git a/src/Shared/CommonAssemblyInfo.cs b/src/Shared/CommonAssemblyInfo.cs index 81bcb1f8c..270cdb3e7 100644 --- a/src/Shared/CommonAssemblyInfo.cs +++ b/src/Shared/CommonAssemblyInfo.cs @@ -27,3 +27,4 @@ [assembly: InternalsVisibleTo("Test.UnitTests.Sarif.WorkItems, PublicKey=0024000004800000940000000602000000240000525341310004000001000100433fbf156abe9718142bdbd48a440e779a1b708fd21486ee0ae536f4c548edf8a7185c1e3ac89ceef76c15b8cc2497906798779a59402f9b9e27281fb15e7111566cdc9a9f8326301d45320623c5222089cf4d0013f365ae729fb0a9c9d15138042825cd511a0f3d4887a7b92f4c2749f81b410813d297b73244cf64995effb1")] [assembly: InternalsVisibleTo("Test.Utilities.Sarif, PublicKey=0024000004800000940000000602000000240000525341310004000001000100433fbf156abe9718142bdbd48a440e779a1b708fd21486ee0ae536f4c548edf8a7185c1e3ac89ceef76c15b8cc2497906798779a59402f9b9e27281fb15e7111566cdc9a9f8326301d45320623c5222089cf4d0013f365ae729fb0a9c9d15138042825cd511a0f3d4887a7b92f4c2749f81b410813d297b73244cf64995effb1")] [assembly: InternalsVisibleTo("Test.UnitTests.WorkItems, PublicKey=0024000004800000940000000602000000240000525341310004000001000100433fbf156abe9718142bdbd48a440e779a1b708fd21486ee0ae536f4c548edf8a7185c1e3ac89ceef76c15b8cc2497906798779a59402f9b9e27281fb15e7111566cdc9a9f8326301d45320623c5222089cf4d0013f365ae729fb0a9c9d15138042825cd511a0f3d4887a7b92f4c2749f81b410813d297b73244cf64995effb1")] + diff --git a/src/Test.EndToEnd.Baselining/BaseliningDetailLogger.cs b/src/Test.EndToEnd.Baselining/BaseliningDetailLogger.cs index d233971d7..39872fd2c 100644 --- a/src/Test.EndToEnd.Baselining/BaseliningDetailLogger.cs +++ b/src/Test.EndToEnd.Baselining/BaseliningDetailLogger.cs @@ -48,7 +48,7 @@ private static string RelativeSeriesPath(string seriesPath) public void Write(SarifLog newBaselineLog, SarifLog baselineLog, BaseliningSummary summary) { Dictionary baselineResultsByGuid = new Dictionary(); - foreach (Result result in baselineLog.EnumerateResults()) + foreach(Result result in baselineLog.EnumerateResults()) { baselineResultsByGuid[result.CorrelationGuid ?? result.Guid] = result; } diff --git a/src/Test.EndToEnd.Baselining/Extensions/ResultTextFormatter.cs b/src/Test.EndToEnd.Baselining/Extensions/ResultTextFormatter.cs index c1382ed37..82c106309 100644 --- a/src/Test.EndToEnd.Baselining/Extensions/ResultTextFormatter.cs +++ b/src/Test.EndToEnd.Baselining/Extensions/ResultTextFormatter.cs @@ -42,7 +42,7 @@ public static string Snippet(this Result result, int lengthLimit = -1) { string value = result?.EnumeratePhysicalLocations().FirstOrDefault()?.Region?.Snippet?.Text ?? ""; value = value.Replace("\n", "").Replace("\r", "").TrimStart(); - + if (lengthLimit > 0 && value.Length > lengthLimit) { value = value.Substring(0, lengthLimit); } return value; } diff --git a/src/Test.EndToEnd.Baselining/Program.cs b/src/Test.EndToEnd.Baselining/Program.cs index 5a58ed4bd..5e8082681 100644 --- a/src/Test.EndToEnd.Baselining/Program.cs +++ b/src/Test.EndToEnd.Baselining/Program.cs @@ -104,7 +104,7 @@ private static int Run(RunOptions options) { BaseliningTester tester = new BaseliningTester(); BaseliningSummary overallSummary = tester.RunAll(options.TestRootPath); - + return 0; } @@ -124,4 +124,4 @@ private static int CreateDebugLogs(RebuildDebugLogsOptions options) return 0; } } -} +} \ No newline at end of file diff --git a/src/Test.FunctionalTests.Sarif/DefaultObjectPopulatingVisitor.cs b/src/Test.FunctionalTests.Sarif/DefaultObjectPopulatingVisitor.cs index bf7612bfb..712e1ad82 100644 --- a/src/Test.FunctionalTests.Sarif/DefaultObjectPopulatingVisitor.cs +++ b/src/Test.FunctionalTests.Sarif/DefaultObjectPopulatingVisitor.cs @@ -4,7 +4,6 @@ using System; using System.Collections.Generic; using System.Reflection; - using Microsoft.Json.Schema; namespace Microsoft.CodeAnalysis.Sarif @@ -492,4 +491,4 @@ private string GetPropertyFormatPattern(string objectTypeName, string propertyNa return propertySchema.Properties.ContainsKey(jsonPropertyName) ? propertySchema.Properties[jsonPropertyName].Pattern : null; } } -} +} \ No newline at end of file diff --git a/src/Test.FunctionalTests.Sarif/Multitool/ValidateCommandTests.cs b/src/Test.FunctionalTests.Sarif/Multitool/ValidateCommandTests.cs index d11d9a36d..ef4cf34cb 100644 --- a/src/Test.FunctionalTests.Sarif/Multitool/ValidateCommandTests.cs +++ b/src/Test.FunctionalTests.Sarif/Multitool/ValidateCommandTests.cs @@ -414,7 +414,7 @@ private void RunArrayLimitTest(string testFileNameSuffix) private void RunValidTestForRule(string ruleId) => RunTestForRule(ruleId, ValidTestFileNameSuffix); - + private void RunInvalidTestForRule(string ruleId) => RunTestForRule(ruleId, InvalidTestFileNameSuffix); @@ -594,7 +594,7 @@ private IList GetValidationRules() // Select one rule arbitrarily, find out what assembly it's in, and get all the other // rules from that assembly. Assembly validationRuleAssembly = typeof(RuleIdentifiersMustBeValid).Assembly; - + return CompositionUtilities.GetExports( new Assembly[] { diff --git a/src/Test.FunctionalTests.Sarif/MultitoolCommandLineTests.cs b/src/Test.FunctionalTests.Sarif/MultitoolCommandLineTests.cs index 7adc97115..5ba2956d0 100644 --- a/src/Test.FunctionalTests.Sarif/MultitoolCommandLineTests.cs +++ b/src/Test.FunctionalTests.Sarif/MultitoolCommandLineTests.cs @@ -3,9 +3,7 @@ using System.Diagnostics; using System.IO; - using FluentAssertions; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Test.FunctionalTests.Sarif/PropertyBagConverterTests.cs b/src/Test.FunctionalTests.Sarif/PropertyBagConverterTests.cs index 8549ce47b..47c13f4fc 100644 --- a/src/Test.FunctionalTests.Sarif/PropertyBagConverterTests.cs +++ b/src/Test.FunctionalTests.Sarif/PropertyBagConverterTests.cs @@ -3,11 +3,8 @@ using System; using System.Collections.Generic; - using FluentAssertions; - using Newtonsoft.Json; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Test.FunctionalTests.Sarif/SarifConverterTests.cs b/src/Test.FunctionalTests.Sarif/SarifConverterTests.cs index 0b5380568..d780fe6ed 100644 --- a/src/Test.FunctionalTests.Sarif/SarifConverterTests.cs +++ b/src/Test.FunctionalTests.Sarif/SarifConverterTests.cs @@ -7,12 +7,9 @@ using System.Text; using FluentAssertions; - using Microsoft.CodeAnalysis.Sarif.Visitors; using Microsoft.CodeAnalysis.Sarif.Writers; - using Newtonsoft.Json; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Converters diff --git a/src/Test.FunctionalTests.Sarif/SarifLogEqualityComparerTests.cs b/src/Test.FunctionalTests.Sarif/SarifLogEqualityComparerTests.cs index a388c1c87..ee8bff03a 100644 --- a/src/Test.FunctionalTests.Sarif/SarifLogEqualityComparerTests.cs +++ b/src/Test.FunctionalTests.Sarif/SarifLogEqualityComparerTests.cs @@ -2,13 +2,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.IO; - using FluentAssertions; - using Microsoft.CodeAnalysis.Sarif.Writers; - using Newtonsoft.Json; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Test.FunctionalTests.Sarif/SarifValidatorTests.cs b/src/Test.FunctionalTests.Sarif/SarifValidatorTests.cs index 73473fcf1..ce6160bca 100644 --- a/src/Test.FunctionalTests.Sarif/SarifValidatorTests.cs +++ b/src/Test.FunctionalTests.Sarif/SarifValidatorTests.cs @@ -6,16 +6,12 @@ using System.IO; using System.Linq; using System.Text; - using FluentAssertions; - using Microsoft.CodeAnalysis.Sarif.Writers; using Microsoft.Json.Schema; using Microsoft.Json.Schema.Validation; - using Newtonsoft.Json; using Newtonsoft.Json.Linq; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Test.FunctionalTests.Sarif/Writers/FilterByPredicateTests.cs b/src/Test.FunctionalTests.Sarif/Writers/FilterByPredicateTests.cs index 5821fa34f..a991d76eb 100644 --- a/src/Test.FunctionalTests.Sarif/Writers/FilterByPredicateTests.cs +++ b/src/Test.FunctionalTests.Sarif/Writers/FilterByPredicateTests.cs @@ -2,12 +2,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; - using Microsoft.CodeAnalysis.Sarif.Visitors; using Microsoft.CodeAnalysis.Test.Utilities.Sarif; - using Newtonsoft.Json; - using Xunit; using Xunit.Abstractions; diff --git a/src/Test.FunctionalTests.Sarif/Writers/PartitionTests.cs b/src/Test.FunctionalTests.Sarif/Writers/PartitionTests.cs index c7a9cf97f..f34f11541 100644 --- a/src/Test.FunctionalTests.Sarif/Writers/PartitionTests.cs +++ b/src/Test.FunctionalTests.Sarif/Writers/PartitionTests.cs @@ -3,13 +3,9 @@ using System.Collections.Generic; using System.Linq; - using FluentAssertions; - using Microsoft.CodeAnalysis.Sarif.Visitors; - using Newtonsoft.Json; - using Xunit; using Xunit.Abstractions; diff --git a/src/Test.FunctionalTests.Sarif/v2/ConverterTestData/FortifyFpr/src/ContentFileViewModel.cs b/src/Test.FunctionalTests.Sarif/v2/ConverterTestData/FortifyFpr/src/ContentFileViewModel.cs index 14bc05a40..0fbf83f6e 100644 --- a/src/Test.FunctionalTests.Sarif/v2/ConverterTestData/FortifyFpr/src/ContentFileViewModel.cs +++ b/src/Test.FunctionalTests.Sarif/v2/ConverterTestData/FortifyFpr/src/ContentFileViewModel.cs @@ -14,4 +14,4 @@ public class ContentFileViewModel : BaseViewModel public DateTime ExpiryDate { get; set; } #endregion } -} +} \ No newline at end of file diff --git a/src/Test.FunctionalTests.Sarif/v2/ConverterTestData/FortifyFpr/src/Controllers/ContentFileHandlingController.cs b/src/Test.FunctionalTests.Sarif/v2/ConverterTestData/FortifyFpr/src/Controllers/ContentFileHandlingController.cs index 49bc8de92..6a6dd9c68 100644 --- a/src/Test.FunctionalTests.Sarif/v2/ConverterTestData/FortifyFpr/src/Controllers/ContentFileHandlingController.cs +++ b/src/Test.FunctionalTests.Sarif/v2/ConverterTestData/FortifyFpr/src/Controllers/ContentFileHandlingController.cs @@ -41,4 +41,4 @@ public void SomeMethod() System.IO.MemoryStream streamPackage = new System.IO.MemoryStream(); } } -} +} \ No newline at end of file diff --git a/src/Test.FunctionalTests.Sarif/v2/ConverterTestData/FortifyFpr/src/DocumentValidator.cs b/src/Test.FunctionalTests.Sarif/v2/ConverterTestData/FortifyFpr/src/DocumentValidator.cs index f009527bf..15ece6f60 100644 --- a/src/Test.FunctionalTests.Sarif/v2/ConverterTestData/FortifyFpr/src/DocumentValidator.cs +++ b/src/Test.FunctionalTests.Sarif/v2/ConverterTestData/FortifyFpr/src/DocumentValidator.cs @@ -18,4 +18,4 @@ private void IsDocumentValid() } } -} +} \ No newline at end of file diff --git a/src/Test.Plugins/TestWorkItemModelTransformer.cs b/src/Test.Plugins/TestWorkItemModelTransformer.cs index a6afd57c4..8b2dc495e 100644 --- a/src/Test.Plugins/TestWorkItemModelTransformer.cs +++ b/src/Test.Plugins/TestWorkItemModelTransformer.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; - using Microsoft.CodeAnalysis.Sarif; using Microsoft.CodeAnalysis.Sarif.WorkItems; diff --git a/src/Test.UnitTests.Sarif.Converters/AndroidStudioConverterTests.cs b/src/Test.UnitTests.Sarif.Converters/AndroidStudioConverterTests.cs index a8b79ffa4..8a1a71527 100644 --- a/src/Test.UnitTests.Sarif.Converters/AndroidStudioConverterTests.cs +++ b/src/Test.UnitTests.Sarif.Converters/AndroidStudioConverterTests.cs @@ -7,11 +7,9 @@ using System.IO; using System.Linq; using System.Xml; - using FluentAssertions; using Microsoft.CodeAnalysis.Sarif.Writers; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Converters diff --git a/src/Test.UnitTests.Sarif.Converters/AndroidStudioProblemTests.cs b/src/Test.UnitTests.Sarif.Converters/AndroidStudioProblemTests.cs index 8422fc266..dd03d3acb 100644 --- a/src/Test.UnitTests.Sarif.Converters/AndroidStudioProblemTests.cs +++ b/src/Test.UnitTests.Sarif.Converters/AndroidStudioProblemTests.cs @@ -7,11 +7,8 @@ using System.Linq; using System.Xml; using System.Xml.Linq; - using FluentAssertions; - using Microsoft.CodeAnalysis.Sarif.Driver; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Converters diff --git a/src/Test.UnitTests.Sarif.Converters/AndroidStudioStringsTests.cs b/src/Test.UnitTests.Sarif.Converters/AndroidStudioStringsTests.cs index 474b735ed..549cbcb64 100644 --- a/src/Test.UnitTests.Sarif.Converters/AndroidStudioStringsTests.cs +++ b/src/Test.UnitTests.Sarif.Converters/AndroidStudioStringsTests.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Xml; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Converters diff --git a/src/Test.UnitTests.Sarif.Converters/BuiltinConverterFactoryTests.cs b/src/Test.UnitTests.Sarif.Converters/BuiltinConverterFactoryTests.cs index dd008daba..c023826b6 100644 --- a/src/Test.UnitTests.Sarif.Converters/BuiltinConverterFactoryTests.cs +++ b/src/Test.UnitTests.Sarif.Converters/BuiltinConverterFactoryTests.cs @@ -4,9 +4,7 @@ using System; using System.Collections.Generic; using System.Linq; - using Microsoft.CodeAnalysis.Sarif.Converters; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Test.UnitTests.Sarif.Converters/ClangAnalyzerConverterTests.cs b/src/Test.UnitTests.Sarif.Converters/ClangAnalyzerConverterTests.cs index 646a4a63d..cf0a9ad11 100644 --- a/src/Test.UnitTests.Sarif.Converters/ClangAnalyzerConverterTests.cs +++ b/src/Test.UnitTests.Sarif.Converters/ClangAnalyzerConverterTests.cs @@ -3,9 +3,7 @@ using System; using System.IO; - using Microsoft.CodeAnalysis.Sarif.Writers; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Converters @@ -106,3 +104,9 @@ public void ClangAnalyzerConverter_MissingNestedDictionaryKey() } } } + + + + + + diff --git a/src/Test.UnitTests.Sarif.Converters/ConverterTestsBase.cs b/src/Test.UnitTests.Sarif.Converters/ConverterTestsBase.cs index 41cc44362..502a04f7c 100644 --- a/src/Test.UnitTests.Sarif.Converters/ConverterTestsBase.cs +++ b/src/Test.UnitTests.Sarif.Converters/ConverterTestsBase.cs @@ -2,12 +2,10 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; - using FluentAssertions; using Microsoft.CodeAnalysis.Sarif.Converters; using Microsoft.CodeAnalysis.Sarif.Writers; - using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Test.UnitTests.Sarif.Converters/CppCheckConverterTests.cs b/src/Test.UnitTests.Sarif.Converters/CppCheckConverterTests.cs index 81b186ac1..dfd701a9b 100644 --- a/src/Test.UnitTests.Sarif.Converters/CppCheckConverterTests.cs +++ b/src/Test.UnitTests.Sarif.Converters/CppCheckConverterTests.cs @@ -4,11 +4,8 @@ using System; using System.IO; using System.Xml; - using Microsoft.CodeAnalysis.Sarif.Writers; - using Newtonsoft.Json; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Converters diff --git a/src/Test.UnitTests.Sarif.Converters/CppCheckErrorTests.cs b/src/Test.UnitTests.Sarif.Converters/CppCheckErrorTests.cs index 0581f6a5f..dc22e3e5a 100644 --- a/src/Test.UnitTests.Sarif.Converters/CppCheckErrorTests.cs +++ b/src/Test.UnitTests.Sarif.Converters/CppCheckErrorTests.cs @@ -5,9 +5,7 @@ using System.Collections.Immutable; using System.Linq; using System.Xml; - using FluentAssertions; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Converters diff --git a/src/Test.UnitTests.Sarif.Converters/CppCheckLocationTests.cs b/src/Test.UnitTests.Sarif.Converters/CppCheckLocationTests.cs index da79b69f7..cef72f948 100644 --- a/src/Test.UnitTests.Sarif.Converters/CppCheckLocationTests.cs +++ b/src/Test.UnitTests.Sarif.Converters/CppCheckLocationTests.cs @@ -3,9 +3,7 @@ using System; using System.Xml; - using FluentAssertions; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Converters diff --git a/src/Test.UnitTests.Sarif.Converters/CppCheckStringsTests.cs b/src/Test.UnitTests.Sarif.Converters/CppCheckStringsTests.cs index ebc2e9c2a..2c4e260b5 100644 --- a/src/Test.UnitTests.Sarif.Converters/CppCheckStringsTests.cs +++ b/src/Test.UnitTests.Sarif.Converters/CppCheckStringsTests.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Xml; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Converters diff --git a/src/Test.UnitTests.Sarif.Converters/FlawFinderCsvConverterTests.cs b/src/Test.UnitTests.Sarif.Converters/FlawFinderCsvConverterTests.cs index c9b5cc9b9..3dbaf4059 100644 --- a/src/Test.UnitTests.Sarif.Converters/FlawFinderCsvConverterTests.cs +++ b/src/Test.UnitTests.Sarif.Converters/FlawFinderCsvConverterTests.cs @@ -3,14 +3,10 @@ using System; using System.IO; - using CsvHelper; using CsvHelper.TypeConversion; - using FluentAssertions; - using Microsoft.CodeAnalysis.Sarif.Writers; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Converters diff --git a/src/Test.UnitTests.Sarif.Converters/FortifyConverterTests.cs b/src/Test.UnitTests.Sarif.Converters/FortifyConverterTests.cs index d5e4c02df..3327a465f 100644 --- a/src/Test.UnitTests.Sarif.Converters/FortifyConverterTests.cs +++ b/src/Test.UnitTests.Sarif.Converters/FortifyConverterTests.cs @@ -6,9 +6,7 @@ using System.Collections.Immutable; using System.IO; using System.Linq; - using FluentAssertions; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Converters diff --git a/src/Test.UnitTests.Sarif.Converters/FortifyFprConverterTests.cs b/src/Test.UnitTests.Sarif.Converters/FortifyFprConverterTests.cs index 2460924f2..b55fb5604 100644 --- a/src/Test.UnitTests.Sarif.Converters/FortifyFprConverterTests.cs +++ b/src/Test.UnitTests.Sarif.Converters/FortifyFprConverterTests.cs @@ -2,9 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; - using FluentAssertions; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Converters diff --git a/src/Test.UnitTests.Sarif.Converters/FortifyFprStringsTests.cs b/src/Test.UnitTests.Sarif.Converters/FortifyFprStringsTests.cs index 020b5ccf3..54050e2d7 100644 --- a/src/Test.UnitTests.Sarif.Converters/FortifyFprStringsTests.cs +++ b/src/Test.UnitTests.Sarif.Converters/FortifyFprStringsTests.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Xml; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Converters diff --git a/src/Test.UnitTests.Sarif.Converters/FortifyIssueTests.cs b/src/Test.UnitTests.Sarif.Converters/FortifyIssueTests.cs index af4a6a83b..8ebe79c1b 100644 --- a/src/Test.UnitTests.Sarif.Converters/FortifyIssueTests.cs +++ b/src/Test.UnitTests.Sarif.Converters/FortifyIssueTests.cs @@ -5,9 +5,7 @@ using System.Collections.Immutable; using System.Xml; using System.Xml.Linq; - using FluentAssertions; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Converters diff --git a/src/Test.UnitTests.Sarif.Converters/FortifyPathElementTests.cs b/src/Test.UnitTests.Sarif.Converters/FortifyPathElementTests.cs index 12c9a4681..9b41d0034 100644 --- a/src/Test.UnitTests.Sarif.Converters/FortifyPathElementTests.cs +++ b/src/Test.UnitTests.Sarif.Converters/FortifyPathElementTests.cs @@ -3,7 +3,6 @@ using System; using System.Xml; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Converters diff --git a/src/Test.UnitTests.Sarif.Converters/FortifyStringsTests.cs b/src/Test.UnitTests.Sarif.Converters/FortifyStringsTests.cs index a9d2ac5de..3cf17a470 100644 --- a/src/Test.UnitTests.Sarif.Converters/FortifyStringsTests.cs +++ b/src/Test.UnitTests.Sarif.Converters/FortifyStringsTests.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Xml; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Converters diff --git a/src/Test.UnitTests.Sarif.Converters/FxCopConverterTests.cs b/src/Test.UnitTests.Sarif.Converters/FxCopConverterTests.cs index fcc4356f8..ed4f26ace 100644 --- a/src/Test.UnitTests.Sarif.Converters/FxCopConverterTests.cs +++ b/src/Test.UnitTests.Sarif.Converters/FxCopConverterTests.cs @@ -6,9 +6,7 @@ using System.IO; using System.Linq; using System.Xml; - using FluentAssertions; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Converters diff --git a/src/Test.UnitTests.Sarif.Converters/PylintConverterTests.cs b/src/Test.UnitTests.Sarif.Converters/PylintConverterTests.cs index f870e15d3..04e4bdd59 100644 --- a/src/Test.UnitTests.Sarif.Converters/PylintConverterTests.cs +++ b/src/Test.UnitTests.Sarif.Converters/PylintConverterTests.cs @@ -5,15 +5,11 @@ using System.Collections.Generic; using System.IO; using System.Text; - using FluentAssertions; - using Microsoft.CodeAnalysis.Sarif; using Microsoft.CodeAnalysis.Sarif.Converters; using Microsoft.CodeAnalysis.Sarif.Converters.PylintObjectModel; - using Moq; - using Xunit; namespace Sarif.Converters.UnitTests diff --git a/src/Test.UnitTests.Sarif.Converters/TSLintConverterTests.cs b/src/Test.UnitTests.Sarif.Converters/TSLintConverterTests.cs index e46d40599..97a40d6d9 100644 --- a/src/Test.UnitTests.Sarif.Converters/TSLintConverterTests.cs +++ b/src/Test.UnitTests.Sarif.Converters/TSLintConverterTests.cs @@ -5,13 +5,9 @@ using System.Collections.Generic; using System.IO; using System.Text; - using FluentAssertions; - using Microsoft.CodeAnalysis.Sarif.Converters.TSLintObjectModel; - using Moq; - using Xunit; diff --git a/src/Test.UnitTests.Sarif.Converters/TSLintLogReaderTests.cs b/src/Test.UnitTests.Sarif.Converters/TSLintLogReaderTests.cs index 56b2f593c..05788b7fe 100644 --- a/src/Test.UnitTests.Sarif.Converters/TSLintLogReaderTests.cs +++ b/src/Test.UnitTests.Sarif.Converters/TSLintLogReaderTests.cs @@ -4,13 +4,9 @@ using System; using System.Collections.Generic; using System.IO; - using FluentAssertions; - using Microsoft.CodeAnalysis.Sarif.Converters.TSLintObjectModel; - using Newtonsoft.Json.Linq; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Converters diff --git a/src/Test.UnitTests.Sarif.Converters/ToolFileConverterBaseTests.cs b/src/Test.UnitTests.Sarif.Converters/ToolFileConverterBaseTests.cs index 2ab1a7c62..b9d711b55 100644 --- a/src/Test.UnitTests.Sarif.Converters/ToolFileConverterBaseTests.cs +++ b/src/Test.UnitTests.Sarif.Converters/ToolFileConverterBaseTests.cs @@ -3,9 +3,7 @@ using System; using System.IO; - using FluentAssertions; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Converters diff --git a/src/Test.UnitTests.Sarif.Converters/ToolFormatConverterTests.cs b/src/Test.UnitTests.Sarif.Converters/ToolFormatConverterTests.cs index f246a75b1..d844cbff5 100644 --- a/src/Test.UnitTests.Sarif.Converters/ToolFormatConverterTests.cs +++ b/src/Test.UnitTests.Sarif.Converters/ToolFormatConverterTests.cs @@ -6,13 +6,10 @@ using System.IO; using System.Reflection; using System.Text; - using FluentAssertions; - using Microsoft.CodeAnalysis.Sarif.Converters; using Microsoft.CodeAnalysis.Sarif.Driver; using Microsoft.CodeAnalysis.Sarif.Writers; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Test.UnitTests.Sarif.Driver/DriverExtensionMethodsTests.cs b/src/Test.UnitTests.Sarif.Driver/DriverExtensionMethodsTests.cs index 73e9af715..bf2862559 100644 --- a/src/Test.UnitTests.Sarif.Driver/DriverExtensionMethodsTests.cs +++ b/src/Test.UnitTests.Sarif.Driver/DriverExtensionMethodsTests.cs @@ -2,11 +2,8 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; - using FluentAssertions; - using Microsoft.CodeAnalysis.Sarif.Writers; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Driver diff --git a/src/Test.UnitTests.Sarif.Driver/DriverUtilitiesTests.cs b/src/Test.UnitTests.Sarif.Driver/DriverUtilitiesTests.cs index a110d32db..9b02f41ce 100644 --- a/src/Test.UnitTests.Sarif.Driver/DriverUtilitiesTests.cs +++ b/src/Test.UnitTests.Sarif.Driver/DriverUtilitiesTests.cs @@ -2,11 +2,8 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; - using CommandLine; - using FluentAssertions; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Driver diff --git a/src/Test.UnitTests.Sarif.Driver/FileSpecifierTests.cs b/src/Test.UnitTests.Sarif.Driver/FileSpecifierTests.cs index 1607d2877..0ef0d672f 100644 --- a/src/Test.UnitTests.Sarif.Driver/FileSpecifierTests.cs +++ b/src/Test.UnitTests.Sarif.Driver/FileSpecifierTests.cs @@ -3,9 +3,7 @@ using System; using System.IO; - using FluentAssertions; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Driver diff --git a/src/Test.UnitTests.Sarif.Driver/FunctionlessTestRule.cs b/src/Test.UnitTests.Sarif.Driver/FunctionlessTestRule.cs index f7ef2d88b..52a840ab2 100644 --- a/src/Test.UnitTests.Sarif.Driver/FunctionlessTestRule.cs +++ b/src/Test.UnitTests.Sarif.Driver/FunctionlessTestRule.cs @@ -4,7 +4,6 @@ using System.Collections.Generic; using System.Composition; using System.Resources; - using Microsoft.CodeAnalysis.Sarif.Driver; using Microsoft.CodeAnalysis.Test.UnitTests.Sarif.Driver.Sdk; diff --git a/src/Test.UnitTests.Sarif.Driver/Sdk/AnalyzeCommandBaseTests.cs b/src/Test.UnitTests.Sarif.Driver/Sdk/AnalyzeCommandBaseTests.cs index ea28c9286..e31d701c4 100644 --- a/src/Test.UnitTests.Sarif.Driver/Sdk/AnalyzeCommandBaseTests.cs +++ b/src/Test.UnitTests.Sarif.Driver/Sdk/AnalyzeCommandBaseTests.cs @@ -7,18 +7,13 @@ using System.Linq; using System.Reflection; using System.Text; - using FluentAssertions; - using Microsoft.CodeAnalysis.Sarif.Converters; using Microsoft.CodeAnalysis.Sarif.Readers; using Microsoft.CodeAnalysis.Sarif.VersionOne; using Microsoft.CodeAnalysis.Sarif.Writers; - using Moq; - using Newtonsoft.Json; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Driver @@ -1201,4 +1196,4 @@ public IFileSystem FileSystem } #endregion ResultsCachingTestsAndHelpers } -} +} \ No newline at end of file diff --git a/src/Test.UnitTests.Sarif.Driver/Sdk/DriverSdkExtensionsTests.cs b/src/Test.UnitTests.Sarif.Driver/Sdk/DriverSdkExtensionsTests.cs index 051459e44..6a0f7e935 100644 --- a/src/Test.UnitTests.Sarif.Driver/Sdk/DriverSdkExtensionsTests.cs +++ b/src/Test.UnitTests.Sarif.Driver/Sdk/DriverSdkExtensionsTests.cs @@ -4,11 +4,8 @@ using System; using System.Collections.Generic; using System.Linq; - using FluentAssertions; - using Microsoft.CodeAnalysis.Sarif.Driver.Sdk; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Driver diff --git a/src/Test.UnitTests.Sarif.Driver/Sdk/EntryPointUtilitiesTests.cs b/src/Test.UnitTests.Sarif.Driver/Sdk/EntryPointUtilitiesTests.cs index 9a6cebc38..51a9362eb 100644 --- a/src/Test.UnitTests.Sarif.Driver/Sdk/EntryPointUtilitiesTests.cs +++ b/src/Test.UnitTests.Sarif.Driver/Sdk/EntryPointUtilitiesTests.cs @@ -7,7 +7,6 @@ using System.IO; using FluentAssertions; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Driver diff --git a/src/Test.UnitTests.Sarif.Driver/Sdk/ExportConfigurationCommandBaseTests.cs b/src/Test.UnitTests.Sarif.Driver/Sdk/ExportConfigurationCommandBaseTests.cs index e8d9f6020..0e9deb428 100644 --- a/src/Test.UnitTests.Sarif.Driver/Sdk/ExportConfigurationCommandBaseTests.cs +++ b/src/Test.UnitTests.Sarif.Driver/Sdk/ExportConfigurationCommandBaseTests.cs @@ -6,7 +6,6 @@ using System.Reflection; using FluentAssertions; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Driver diff --git a/src/Test.UnitTests.Sarif.Driver/Sdk/FormatForVisualStudioTests.cs b/src/Test.UnitTests.Sarif.Driver/Sdk/FormatForVisualStudioTests.cs index b90c5793e..5b2da8a1c 100644 --- a/src/Test.UnitTests.Sarif.Driver/Sdk/FormatForVisualStudioTests.cs +++ b/src/Test.UnitTests.Sarif.Driver/Sdk/FormatForVisualStudioTests.cs @@ -3,11 +3,8 @@ using System; using System.Collections.Generic; - using FluentAssertions; - using Microsoft.CodeAnalysis.Test.Utilities.Sarif; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Driver diff --git a/src/Test.UnitTests.Sarif.Driver/Sdk/RuleUtilitiesTests.cs b/src/Test.UnitTests.Sarif.Driver/Sdk/RuleUtilitiesTests.cs index 19c6359df..3ed052883 100644 --- a/src/Test.UnitTests.Sarif.Driver/Sdk/RuleUtilitiesTests.cs +++ b/src/Test.UnitTests.Sarif.Driver/Sdk/RuleUtilitiesTests.cs @@ -2,9 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; - using FluentAssertions; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Driver diff --git a/src/Test.UnitTests.Sarif.Driver/Sdk/SarifLoggerTests.cs b/src/Test.UnitTests.Sarif.Driver/Sdk/SarifLoggerTests.cs index f6796dcd1..8de2c4d92 100644 --- a/src/Test.UnitTests.Sarif.Driver/Sdk/SarifLoggerTests.cs +++ b/src/Test.UnitTests.Sarif.Driver/Sdk/SarifLoggerTests.cs @@ -3,11 +3,8 @@ using System.IO; using System.Linq; - using FluentAssertions; - using Microsoft.CodeAnalysis.Sarif.Writers; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Driver diff --git a/src/Test.UnitTests.Sarif.Driver/Sdk/SkimmerBaseTests.cs b/src/Test.UnitTests.Sarif.Driver/Sdk/SkimmerBaseTests.cs index 698afc345..56cfb133e 100644 --- a/src/Test.UnitTests.Sarif.Driver/Sdk/SkimmerBaseTests.cs +++ b/src/Test.UnitTests.Sarif.Driver/Sdk/SkimmerBaseTests.cs @@ -2,11 +2,8 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Linq; - using FluentAssertions; - using Microsoft.CodeAnalysis.Sarif; - using Xunit; namespace Microsoft.CodeAnalysis.Test.UnitTests.Sarif.Driver.Sdk diff --git a/src/Test.UnitTests.Sarif.Driver/Sdk/TestSkimmerBase.cs b/src/Test.UnitTests.Sarif.Driver/Sdk/TestSkimmerBase.cs index c41bfd281..1c1612f57 100644 --- a/src/Test.UnitTests.Sarif.Driver/Sdk/TestSkimmerBase.cs +++ b/src/Test.UnitTests.Sarif.Driver/Sdk/TestSkimmerBase.cs @@ -4,7 +4,6 @@ using System; using System.Collections.Generic; using System.Resources; - using Microsoft.CodeAnalysis.Sarif; using Microsoft.CodeAnalysis.Sarif.Driver; diff --git a/src/Test.UnitTests.Sarif.Driver/SkimmerIdComparerTests.cs b/src/Test.UnitTests.Sarif.Driver/SkimmerIdComparerTests.cs index ed207cfa4..a7b6ed2da 100644 --- a/src/Test.UnitTests.Sarif.Driver/SkimmerIdComparerTests.cs +++ b/src/Test.UnitTests.Sarif.Driver/SkimmerIdComparerTests.cs @@ -2,9 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Collections.Generic; - using FluentAssertions; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Driver diff --git a/src/Test.UnitTests.Sarif.Driver/TestRule.cs b/src/Test.UnitTests.Sarif.Driver/TestRule.cs index 15d3142d1..96ec75720 100644 --- a/src/Test.UnitTests.Sarif.Driver/TestRule.cs +++ b/src/Test.UnitTests.Sarif.Driver/TestRule.cs @@ -6,9 +6,7 @@ using System.Composition; using System.IO; using System.Resources; - using FluentAssertions; - using Microsoft.CodeAnalysis.Sarif.Driver; using Microsoft.CodeAnalysis.Test.UnitTests.Sarif.Driver.Sdk; diff --git a/src/Test.UnitTests.Sarif.Driver/TestRuleBehaviors.cs b/src/Test.UnitTests.Sarif.Driver/TestRuleBehaviors.cs index f8af9239d..fe76f03f0 100644 --- a/src/Test.UnitTests.Sarif.Driver/TestRuleBehaviors.cs +++ b/src/Test.UnitTests.Sarif.Driver/TestRuleBehaviors.cs @@ -28,4 +28,4 @@ internal enum TestRuleBehaviors // Force 'current platform not valid to analyze' code path. TreatPlatformAsInvalid = 0x400 } -} +} \ No newline at end of file diff --git a/src/Test.UnitTests.Sarif.Multitool.Library/ConvertCommandTests.cs b/src/Test.UnitTests.Sarif.Multitool.Library/ConvertCommandTests.cs index fdb077eb3..57f7306a0 100644 --- a/src/Test.UnitTests.Sarif.Multitool.Library/ConvertCommandTests.cs +++ b/src/Test.UnitTests.Sarif.Multitool.Library/ConvertCommandTests.cs @@ -1,14 +1,10 @@ // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using System.IO; - using FluentAssertions; - using Microsoft.CodeAnalysis.Sarif.Converters; - using Moq; - +using System.IO; using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Test.UnitTests.Sarif.Multitool.Library/ExportValidationRulesDocumentationCommandTests.cs b/src/Test.UnitTests.Sarif.Multitool.Library/ExportValidationRulesDocumentationCommandTests.cs index 7a865f6ff..e921e1fb6 100644 --- a/src/Test.UnitTests.Sarif.Multitool.Library/ExportValidationRulesDocumentationCommandTests.cs +++ b/src/Test.UnitTests.Sarif.Multitool.Library/ExportValidationRulesDocumentationCommandTests.cs @@ -3,11 +3,8 @@ using System.Collections.Generic; using System.Text; - using FluentAssertions; - using Microsoft.CodeAnalysis.Sarif.Multitool.Rules; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Multitool @@ -37,7 +34,7 @@ public void BuildRule_GeneratesExpectedMarkdown() string expectedMarkdown = resourceExtractor.GetResourceText(test.Key); sb.ToString().Should().Be(expectedMarkdown); - } + } } private class TestRule1 : SarifValidationSkimmerBase diff --git a/src/Test.UnitTests.Sarif.Multitool.Library/GenericCommandTests.cs b/src/Test.UnitTests.Sarif.Multitool.Library/GenericCommandTests.cs index bc1c7f15a..eae2e19b8 100644 --- a/src/Test.UnitTests.Sarif.Multitool.Library/GenericCommandTests.cs +++ b/src/Test.UnitTests.Sarif.Multitool.Library/GenericCommandTests.cs @@ -5,7 +5,6 @@ using System.Collections.Generic; using System.Linq; using System.Reflection; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Test.UnitTests.Sarif.Multitool.Library/MergeCommandTests.cs b/src/Test.UnitTests.Sarif.Multitool.Library/MergeCommandTests.cs index 1af124759..dcbf14aae 100644 --- a/src/Test.UnitTests.Sarif.Multitool.Library/MergeCommandTests.cs +++ b/src/Test.UnitTests.Sarif.Multitool.Library/MergeCommandTests.cs @@ -3,11 +3,8 @@ using System; using System.IO; - using FluentAssertions; - using Moq; - using Xunit; using Xunit.Abstractions; diff --git a/src/Test.UnitTests.Sarif.Multitool.Library/PageCommandTests.cs b/src/Test.UnitTests.Sarif.Multitool.Library/PageCommandTests.cs index 691d710a6..3eff060a0 100644 --- a/src/Test.UnitTests.Sarif.Multitool.Library/PageCommandTests.cs +++ b/src/Test.UnitTests.Sarif.Multitool.Library/PageCommandTests.cs @@ -4,13 +4,9 @@ using System; using System.Collections.Generic; using System.IO; - using FluentAssertions; - using Moq; - using Newtonsoft.Json; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Test.UnitTests.Sarif.Multitool.Library/QueryCommandTests.cs b/src/Test.UnitTests.Sarif.Multitool.Library/QueryCommandTests.cs index 521fdb014..5bd66e536 100644 --- a/src/Test.UnitTests.Sarif.Multitool.Library/QueryCommandTests.cs +++ b/src/Test.UnitTests.Sarif.Multitool.Library/QueryCommandTests.cs @@ -2,9 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.IO; - using Microsoft.CodeAnalysis.Sarif.Query; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Test.UnitTests.Sarif.Multitool.Library/RebaseUriCommandTests.cs b/src/Test.UnitTests.Sarif.Multitool.Library/RebaseUriCommandTests.cs index e736636e1..6bb628782 100644 --- a/src/Test.UnitTests.Sarif.Multitool.Library/RebaseUriCommandTests.cs +++ b/src/Test.UnitTests.Sarif.Multitool.Library/RebaseUriCommandTests.cs @@ -4,7 +4,6 @@ using System; using System.IO; using System.Text; - using FluentAssertions; using Microsoft.Extensions.Options; @@ -37,7 +36,7 @@ public void RebaseUriCommand_InjectsRegions() { Runs = new[] { - new Run { Results = new[] { + new Run { Results = new[] { new Result { Locations = new [] { new Location { PhysicalLocation = new PhysicalLocation { @@ -60,11 +59,11 @@ public void RebaseUriCommand_InjectsRegions() RebaseUriOptions options = CreateDefaultOptions(); options.TargetFileSpecifiers = new string[] { logFilePath }; - - options.DataToInsert = new[] - { + + options.DataToInsert = new[] + { OptionallyEmittedData.RegionSnippets | - OptionallyEmittedData.ContextRegionSnippets + OptionallyEmittedData.ContextRegionSnippets }; Mock mockFileSystem = ArrangeMockFileSystem(inputSarifLog, logFilePath, transformedContents); diff --git a/src/Test.UnitTests.Sarif.Multitool.Library/Rules/SarifValidationSkimmerBaseTests.cs b/src/Test.UnitTests.Sarif.Multitool.Library/Rules/SarifValidationSkimmerBaseTests.cs index 448e8dd71..16ab7ad87 100644 --- a/src/Test.UnitTests.Sarif.Multitool.Library/Rules/SarifValidationSkimmerBaseTests.cs +++ b/src/Test.UnitTests.Sarif.Multitool.Library/Rules/SarifValidationSkimmerBaseTests.cs @@ -2,11 +2,8 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Text; - using FluentAssertions; - using Microsoft.CodeAnalysis.Sarif.Multitool.Rules; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Test.UnitTests.Sarif.Multitool.Library/TransformCommandTests.cs b/src/Test.UnitTests.Sarif.Multitool.Library/TransformCommandTests.cs index 163bba60e..66594c1b2 100644 --- a/src/Test.UnitTests.Sarif.Multitool.Library/TransformCommandTests.cs +++ b/src/Test.UnitTests.Sarif.Multitool.Library/TransformCommandTests.cs @@ -4,17 +4,12 @@ using System.Collections.Generic; using System.IO; using System.Text; - using FluentAssertions; - using Microsoft.CodeAnalysis.Sarif.Readers; using Microsoft.CodeAnalysis.Sarif.VersionOne; - using Moq; - using Newtonsoft.Json; using Newtonsoft.Json.Linq; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Test.UnitTests.Sarif.Multitool.Library/ValidateCommandTests.cs b/src/Test.UnitTests.Sarif.Multitool.Library/ValidateCommandTests.cs index 0304530e0..96c3a558a 100644 --- a/src/Test.UnitTests.Sarif.Multitool.Library/ValidateCommandTests.cs +++ b/src/Test.UnitTests.Sarif.Multitool.Library/ValidateCommandTests.cs @@ -2,13 +2,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.IO; - using FluentAssertions; - using Microsoft.CodeAnalysis.Sarif.Driver; - using Moq; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Test.UnitTests.Sarif.Multitool/FileWorkItemsCommandTests.cs b/src/Test.UnitTests.Sarif.Multitool/FileWorkItemsCommandTests.cs index 503a2186a..aed8e8f0e 100644 --- a/src/Test.UnitTests.Sarif.Multitool/FileWorkItemsCommandTests.cs +++ b/src/Test.UnitTests.Sarif.Multitool/FileWorkItemsCommandTests.cs @@ -3,9 +3,7 @@ using System; using System.Collections.Generic; - using FluentAssertions; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Test.UnitTests.Sarif.WorkItems/SarifWorkItemExtensionsTests.cs b/src/Test.UnitTests.Sarif.WorkItems/SarifWorkItemExtensionsTests.cs index dca19cb5a..d5c5b3f5f 100644 --- a/src/Test.UnitTests.Sarif.WorkItems/SarifWorkItemExtensionsTests.cs +++ b/src/Test.UnitTests.Sarif.WorkItems/SarifWorkItemExtensionsTests.cs @@ -5,11 +5,8 @@ using System.Collections.ObjectModel; using System.ComponentModel; using System.Text; - using FluentAssertions; - using Microsoft.CodeAnalysis.Test.Utilities.Sarif; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif.WorkItems @@ -91,7 +88,7 @@ public void SarifWorkItemExtensions_CreateWorkItemTitle_LongTitleFromLogicalLoca result.Locations = new List(); result.Locations.Add(location); result.RuleId = "TestRuleId"; - + SarifLog sarifLog = CreateLogWithEmptyRun(); Run run = sarifLog.Runs[0]; run.Results.Add(result); @@ -246,13 +243,13 @@ public void SarifWorkItemExtensions_GetRunToolNames_FetchesAllRunToolNames() } } } - } + } }), new Tuple("Result with rule.Id", new Result { Rule = new ReportingDescriptorReference { - Id = TestRuleId + Id = TestRuleId } }), new Tuple("Result with rule index only", new Result @@ -287,7 +284,7 @@ private static SarifLog CreateLogWithEmptyRun() Rules = new ReportingDescriptor[] { new ReportingDescriptor - { + { Name = "Test Rule", Id = nameof(TestRuleId) } diff --git a/src/Test.UnitTests.Sarif.WorkItems/SarifWorkItemFilerTests.cs b/src/Test.UnitTests.Sarif.WorkItems/SarifWorkItemFilerTests.cs index 25013fad1..374a8087c 100644 --- a/src/Test.UnitTests.Sarif.WorkItems/SarifWorkItemFilerTests.cs +++ b/src/Test.UnitTests.Sarif.WorkItems/SarifWorkItemFilerTests.cs @@ -7,22 +7,16 @@ using System.Linq; using System.Threading; using System.Threading.Tasks; - using FluentAssertions; - using Microsoft.CodeAnalysis.Test.Utilities.Sarif; using Microsoft.CodeAnalysis.WorkItems; using Microsoft.TeamFoundation.WorkItemTracking.WebApi.Models; using Microsoft.VisualStudio.Services.WebApi; using Microsoft.VisualStudio.Services.WebApi.Patch.Json; using Microsoft.WorkItems; - using Moq; - using Newtonsoft.Json; - using Octokit; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif.WorkItems @@ -189,10 +183,10 @@ private void TestWorkItemFiler(SarifLog sarifLog, SarifWorkItemContext context, // Validate that we updated the SARIF log with work itme URIs. // updatedSarifLog.Should().NotBeEquivalentTo(sarifLog); - - foreach (Run run in updatedSarifLog.Runs) + + foreach(Run run in updatedSarifLog.Runs) { - foreach (Result result in run.Results) + foreach(Result result in run.Results) { result.WorkItemUris.Should().NotBeNull(); result.WorkItemUris.Count.Should().Be(1); @@ -205,7 +199,7 @@ private void TestWorkItemFiler(SarifLog sarifLog, SarifWorkItemContext context, programmableUris.Count.Should().Be(1); programmableUris[0].Should().Be(bugUri); } - } + } } private static FilingClient CreateAdoMocksAndFilingClient(AttachmentReference attachmentReference, WorkItem workItem, SarifWorkItemFiler filer) @@ -377,4 +371,4 @@ private static SarifWorkItemContext CreateAzureDevOpsTestContext() "Extensibility", nameof(ExpectedWorkItemsCount), defaultValue: () => { return 1; }); } -} +} \ No newline at end of file diff --git a/src/Test.UnitTests.Sarif.WorkItems/SarifWorkItemFilingContextTests.cs b/src/Test.UnitTests.Sarif.WorkItems/SarifWorkItemFilingContextTests.cs index 035455bda..eda15bca0 100644 --- a/src/Test.UnitTests.Sarif.WorkItems/SarifWorkItemFilingContextTests.cs +++ b/src/Test.UnitTests.Sarif.WorkItems/SarifWorkItemFilingContextTests.cs @@ -3,11 +3,8 @@ using System; using System.IO; - using FluentAssertions; - using Microsoft.CodeAnalysis.Test.Utilities.Sarif; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif.WorkItems diff --git a/src/Test.UnitTests.Sarif.WorkItems/SarifWorkItemModelTests.cs b/src/Test.UnitTests.Sarif.WorkItems/SarifWorkItemModelTests.cs index 1ccaacf3d..b13107a06 100644 --- a/src/Test.UnitTests.Sarif.WorkItems/SarifWorkItemModelTests.cs +++ b/src/Test.UnitTests.Sarif.WorkItems/SarifWorkItemModelTests.cs @@ -2,10 +2,8 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using FluentAssertions; - using Microsoft.CodeAnalysis.Test.Utilities.Sarif; using Microsoft.WorkItems; - using Xunit; diff --git a/src/Test.UnitTests.Sarif/Baseline/DefaultBaselineUnitTests.cs b/src/Test.UnitTests.Sarif/Baseline/DefaultBaselineUnitTests.cs index 2a52c746b..41a83a2ec 100644 --- a/src/Test.UnitTests.Sarif/Baseline/DefaultBaselineUnitTests.cs +++ b/src/Test.UnitTests.Sarif/Baseline/DefaultBaselineUnitTests.cs @@ -4,9 +4,7 @@ using System; using System.Collections.Generic; using System.Linq; - using FluentAssertions; - using Xunit; using Xunit.Abstractions; diff --git a/src/Test.UnitTests.Sarif/Baseline/ResultMatching/ExactMatchers/FullFingerprintMatcherTests.cs b/src/Test.UnitTests.Sarif/Baseline/ResultMatching/ExactMatchers/FullFingerprintMatcherTests.cs index 698ddba29..c2c743a7c 100644 --- a/src/Test.UnitTests.Sarif/Baseline/ResultMatching/ExactMatchers/FullFingerprintMatcherTests.cs +++ b/src/Test.UnitTests.Sarif/Baseline/ResultMatching/ExactMatchers/FullFingerprintMatcherTests.cs @@ -3,9 +3,7 @@ using System.Collections.Generic; using System.Linq; - using FluentAssertions; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Baseline.ResultMatching.ExactMatchers diff --git a/src/Test.UnitTests.Sarif/Baseline/ResultMatching/ExactMatchers/IdenticalResultMatcherTests.cs b/src/Test.UnitTests.Sarif/Baseline/ResultMatching/ExactMatchers/IdenticalResultMatcherTests.cs index 395d57f57..609b2b133 100644 --- a/src/Test.UnitTests.Sarif/Baseline/ResultMatching/ExactMatchers/IdenticalResultMatcherTests.cs +++ b/src/Test.UnitTests.Sarif/Baseline/ResultMatching/ExactMatchers/IdenticalResultMatcherTests.cs @@ -4,9 +4,7 @@ using System; using System.Collections.Generic; using System.Linq; - using FluentAssertions; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Baseline.ResultMatching.ExactMatchers diff --git a/src/Test.UnitTests.Sarif/Baseline/ResultMatching/HeuristicMatchers/ContextRegionResultMatcherTests.cs b/src/Test.UnitTests.Sarif/Baseline/ResultMatching/HeuristicMatchers/ContextRegionResultMatcherTests.cs index 707f0605c..849c700e4 100644 --- a/src/Test.UnitTests.Sarif/Baseline/ResultMatching/HeuristicMatchers/ContextRegionResultMatcherTests.cs +++ b/src/Test.UnitTests.Sarif/Baseline/ResultMatching/HeuristicMatchers/ContextRegionResultMatcherTests.cs @@ -2,9 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; - using FluentAssertions; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Baseline.ResultMatching.HeuristicMatchers diff --git a/src/Test.UnitTests.Sarif/Baseline/ResultMatching/HeuristicMatchers/PartialFingerprintResultMatcherTests.cs b/src/Test.UnitTests.Sarif/Baseline/ResultMatching/HeuristicMatchers/PartialFingerprintResultMatcherTests.cs index d587ea2fb..fefff5edd 100644 --- a/src/Test.UnitTests.Sarif/Baseline/ResultMatching/HeuristicMatchers/PartialFingerprintResultMatcherTests.cs +++ b/src/Test.UnitTests.Sarif/Baseline/ResultMatching/HeuristicMatchers/PartialFingerprintResultMatcherTests.cs @@ -2,9 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; - using FluentAssertions; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Baseline.ResultMatching.HeuristicMatchers diff --git a/src/Test.UnitTests.Sarif/Baseline/ResultMatching/ResultMatchingBaselinerTests.cs b/src/Test.UnitTests.Sarif/Baseline/ResultMatching/ResultMatchingBaselinerTests.cs index b34ad264f..034a01428 100644 --- a/src/Test.UnitTests.Sarif/Baseline/ResultMatching/ResultMatchingBaselinerTests.cs +++ b/src/Test.UnitTests.Sarif/Baseline/ResultMatching/ResultMatchingBaselinerTests.cs @@ -4,9 +4,7 @@ using System; using System.Collections.Generic; using System.Linq; - using FluentAssertions; - using Xunit; using Xunit.Abstractions; diff --git a/src/Test.UnitTests.Sarif/Baseline/ResultMatching/SarifLogResultMatcherTests.cs b/src/Test.UnitTests.Sarif/Baseline/ResultMatching/SarifLogResultMatcherTests.cs index c2d3408ef..903c25a94 100644 --- a/src/Test.UnitTests.Sarif/Baseline/ResultMatching/SarifLogResultMatcherTests.cs +++ b/src/Test.UnitTests.Sarif/Baseline/ResultMatching/SarifLogResultMatcherTests.cs @@ -4,9 +4,7 @@ using System; using System.Collections.Generic; using System.Linq; - using FluentAssertions; - using Xunit; using Xunit.Abstractions; diff --git a/src/Test.UnitTests.Sarif/Baseline/StrictBaselineUnitTests.cs b/src/Test.UnitTests.Sarif/Baseline/StrictBaselineUnitTests.cs index 989c57c2c..844b9e44d 100644 --- a/src/Test.UnitTests.Sarif/Baseline/StrictBaselineUnitTests.cs +++ b/src/Test.UnitTests.Sarif/Baseline/StrictBaselineUnitTests.cs @@ -4,9 +4,7 @@ using System; using System.Collections.Generic; using System.Linq; - using FluentAssertions; - using Xunit; using Xunit.Abstractions; diff --git a/src/Test.UnitTests.Sarif/Baseline2/ExtractedResultTests.cs b/src/Test.UnitTests.Sarif/Baseline2/ExtractedResultTests.cs index 5533f1379..96291cf9d 100644 --- a/src/Test.UnitTests.Sarif/Baseline2/ExtractedResultTests.cs +++ b/src/Test.UnitTests.Sarif/Baseline2/ExtractedResultTests.cs @@ -2,12 +2,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; - using FluentAssertions; - using Microsoft.CodeAnalysis.Sarif; using Microsoft.CodeAnalysis.Sarif.Baseline.ResultMatching; - using Xunit; namespace Microsoft.CodeAnalysis.Test.UnitTests.Sarif.Baseline diff --git a/src/Test.UnitTests.Sarif/Baseline2/OverallBaseliningTests.cs b/src/Test.UnitTests.Sarif/Baseline2/OverallBaseliningTests.cs index 8d2ca3946..fa23180e4 100644 --- a/src/Test.UnitTests.Sarif/Baseline2/OverallBaseliningTests.cs +++ b/src/Test.UnitTests.Sarif/Baseline2/OverallBaseliningTests.cs @@ -10,7 +10,6 @@ using Microsoft.CodeAnalysis.Sarif; using Microsoft.CodeAnalysis.Sarif.Baseline.ResultMatching; using Microsoft.CodeAnalysis.Test.Utilities.Sarif; - using Newtonsoft.Json; using Xunit; diff --git a/src/Test.UnitTests.Sarif/Baseline2/TrustMapTests.cs b/src/Test.UnitTests.Sarif/Baseline2/TrustMapTests.cs index f7b54ffa2..2804ffa20 100644 --- a/src/Test.UnitTests.Sarif/Baseline2/TrustMapTests.cs +++ b/src/Test.UnitTests.Sarif/Baseline2/TrustMapTests.cs @@ -2,9 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using FluentAssertions; - using Microsoft.CodeAnalysis.Sarif.Baseline; - using Xunit; namespace Microsoft.CodeAnalysis.Test.UnitTests.Sarif.Baseline diff --git a/src/Test.UnitTests.Sarif/Baseline2/WhatComparerTests.cs b/src/Test.UnitTests.Sarif/Baseline2/WhatComparerTests.cs index 829b1ec7e..144031f59 100644 --- a/src/Test.UnitTests.Sarif/Baseline2/WhatComparerTests.cs +++ b/src/Test.UnitTests.Sarif/Baseline2/WhatComparerTests.cs @@ -3,13 +3,10 @@ using System; using System.Collections.Generic; - using FluentAssertions; - using Microsoft.CodeAnalysis.Sarif; using Microsoft.CodeAnalysis.Sarif.Baseline; using Microsoft.CodeAnalysis.Sarif.Baseline.ResultMatching; - using Xunit; namespace Microsoft.CodeAnalysis.Test.UnitTests.Sarif.Baseline diff --git a/src/Test.UnitTests.Sarif/Baseline2/WhereComparerTests.cs b/src/Test.UnitTests.Sarif/Baseline2/WhereComparerTests.cs index 31672da13..6cf5b01c5 100644 --- a/src/Test.UnitTests.Sarif/Baseline2/WhereComparerTests.cs +++ b/src/Test.UnitTests.Sarif/Baseline2/WhereComparerTests.cs @@ -3,12 +3,9 @@ using System; using System.Collections.Generic; - using FluentAssertions; - using Microsoft.CodeAnalysis.Sarif; using Microsoft.CodeAnalysis.Sarif.Baseline; - using Xunit; namespace Microsoft.CodeAnalysis.Test.UnitTests.Sarif.Baseline diff --git a/src/Test.UnitTests.Sarif/CacheTests.cs b/src/Test.UnitTests.Sarif/CacheTests.cs index cad440bfc..d36a57f47 100644 --- a/src/Test.UnitTests.Sarif/CacheTests.cs +++ b/src/Test.UnitTests.Sarif/CacheTests.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using FluentAssertions; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif.UnitTests diff --git a/src/Test.UnitTests.Sarif/ConsoleLoggerTests.cs b/src/Test.UnitTests.Sarif/ConsoleLoggerTests.cs index 529fd33ee..2140f7c98 100644 --- a/src/Test.UnitTests.Sarif/ConsoleLoggerTests.cs +++ b/src/Test.UnitTests.Sarif/ConsoleLoggerTests.cs @@ -1,11 +1,8 @@ // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; - using FluentAssertions; - using Microsoft.CodeAnalysis.Sarif; - using Xunit; namespace Microsoft.CodeAnalysis.Test.UnitTests.Sarif diff --git a/src/Test.UnitTests.Sarif/Core/ArtifactLocationTests.cs b/src/Test.UnitTests.Sarif/Core/ArtifactLocationTests.cs index 1c2d58ea0..66d5960dc 100644 --- a/src/Test.UnitTests.Sarif/Core/ArtifactLocationTests.cs +++ b/src/Test.UnitTests.Sarif/Core/ArtifactLocationTests.cs @@ -3,11 +3,8 @@ using System; using System.Collections.Generic; - using FluentAssertions; - using Microsoft.CodeAnalysis.Sarif; - using Xunit; namespace Microsoft.CodeAnalysis.Test.UnitTests.Sarif.Core diff --git a/src/Test.UnitTests.Sarif/Core/ArtifactTests.cs b/src/Test.UnitTests.Sarif/Core/ArtifactTests.cs index d8a260212..f84edbe3e 100644 --- a/src/Test.UnitTests.Sarif/Core/ArtifactTests.cs +++ b/src/Test.UnitTests.Sarif/Core/ArtifactTests.cs @@ -4,15 +4,10 @@ using System; using System.IO; using System.Text; - using FluentAssertions; - using Microsoft.CodeAnalysis.Sarif; - using Moq; - using Newtonsoft.Json; - using Xunit; namespace Microsoft.CodeAnalysis.Test.UnitTests.Sarif.Core @@ -275,4 +270,4 @@ private static void Validate(Artifact fileData, OptionallyEmittedData dataToInse } } -} +} \ No newline at end of file diff --git a/src/Test.UnitTests.Sarif/Core/FileLocationTests.cs b/src/Test.UnitTests.Sarif/Core/FileLocationTests.cs index 6c4f60844..6e147c1f1 100644 --- a/src/Test.UnitTests.Sarif/Core/FileLocationTests.cs +++ b/src/Test.UnitTests.Sarif/Core/FileLocationTests.cs @@ -3,9 +3,7 @@ using System; using System.Text; - using FluentAssertions; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif.UnitTests.Core diff --git a/src/Test.UnitTests.Sarif/Core/InvocationTests.cs b/src/Test.UnitTests.Sarif/Core/InvocationTests.cs index 24ca78512..ce1274e9a 100644 --- a/src/Test.UnitTests.Sarif/Core/InvocationTests.cs +++ b/src/Test.UnitTests.Sarif/Core/InvocationTests.cs @@ -2,9 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using FluentAssertions; - using Microsoft.CodeAnalysis.Sarif; - using Xunit; namespace Microsoft.CodeAnalysis.Test.UnitTests.Sarif.Core diff --git a/src/Test.UnitTests.Sarif/Core/LocationTests.cs b/src/Test.UnitTests.Sarif/Core/LocationTests.cs index 12afd13a9..2c26ca955 100644 --- a/src/Test.UnitTests.Sarif/Core/LocationTests.cs +++ b/src/Test.UnitTests.Sarif/Core/LocationTests.cs @@ -2,9 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using FluentAssertions; - using Microsoft.CodeAnalysis.Sarif; - using Xunit; namespace Microsoft.CodeAnalysis.Test.UnitTests.Sarif.Core diff --git a/src/Test.UnitTests.Sarif/Core/PropertyBagHolderTests.cs b/src/Test.UnitTests.Sarif/Core/PropertyBagHolderTests.cs index 278008d85..033238613 100644 --- a/src/Test.UnitTests.Sarif/Core/PropertyBagHolderTests.cs +++ b/src/Test.UnitTests.Sarif/Core/PropertyBagHolderTests.cs @@ -3,14 +3,10 @@ using System; using System.Collections.Generic; - using FluentAssertions; - using Microsoft.CodeAnalysis.Sarif; - using Newtonsoft.Json; using Newtonsoft.Json.Serialization; - using Xunit; namespace Microsoft.CodeAnalysis.Test.UnitTests.Sarif.Core diff --git a/src/Test.UnitTests.Sarif/Core/RegionTests.cs b/src/Test.UnitTests.Sarif/Core/RegionTests.cs index c7f16112f..04f30857e 100644 --- a/src/Test.UnitTests.Sarif/Core/RegionTests.cs +++ b/src/Test.UnitTests.Sarif/Core/RegionTests.cs @@ -2,9 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using FluentAssertions; - using Microsoft.CodeAnalysis.Sarif; - using Xunit; namespace Microsoft.CodeAnalysis.Test.UnitTests.Sarif.Core @@ -127,4 +125,4 @@ public void Region_HasAllRegionTypes_ComputesPropertiesCorrectly() region.IsBinaryRegion.Should().BeTrue(); } } -} +} \ No newline at end of file diff --git a/src/Test.UnitTests.Sarif/Core/ResultTests.cs b/src/Test.UnitTests.Sarif/Core/ResultTests.cs index 68e52dab2..8e99fb760 100644 --- a/src/Test.UnitTests.Sarif/Core/ResultTests.cs +++ b/src/Test.UnitTests.Sarif/Core/ResultTests.cs @@ -2,9 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using FluentAssertions; - using Microsoft.CodeAnalysis.Sarif; - using Xunit; namespace Microsoft.CodeAnalysis.Test.UnitTests.Sarif.Core diff --git a/src/Test.UnitTests.Sarif/Core/RunTests.cs b/src/Test.UnitTests.Sarif/Core/RunTests.cs index 9cae5539a..f799b1d21 100644 --- a/src/Test.UnitTests.Sarif/Core/RunTests.cs +++ b/src/Test.UnitTests.Sarif/Core/RunTests.cs @@ -3,13 +3,9 @@ using System; using System.Collections.Generic; - using FluentAssertions; - using Microsoft.CodeAnalysis.Sarif; - using Newtonsoft.Json; - using Xunit; namespace Microsoft.CodeAnalysis.Test.UnitTests.Sarif.Core diff --git a/src/Test.UnitTests.Sarif/Core/SarifLogTests.cs b/src/Test.UnitTests.Sarif/Core/SarifLogTests.cs index 52c0c13ec..5979e5851 100644 --- a/src/Test.UnitTests.Sarif/Core/SarifLogTests.cs +++ b/src/Test.UnitTests.Sarif/Core/SarifLogTests.cs @@ -2,9 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using FluentAssertions; - using Newtonsoft.Json; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif.UnitTests.Core diff --git a/src/Test.UnitTests.Sarif/Core/StackTests.cs b/src/Test.UnitTests.Sarif/Core/StackTests.cs index 1cd79d244..4eab86f7d 100644 --- a/src/Test.UnitTests.Sarif/Core/StackTests.cs +++ b/src/Test.UnitTests.Sarif/Core/StackTests.cs @@ -6,11 +6,8 @@ using System.Diagnostics; using System.IO; using System.Linq; - using FluentAssertions; - using Microsoft.CodeAnalysis.Sarif; - using Xunit; namespace Microsoft.CodeAnalysis.Test.UnitTests.Sarif.Core diff --git a/src/Test.UnitTests.Sarif/Core/TagsTests.cs b/src/Test.UnitTests.Sarif/Core/TagsTests.cs index 1cf529654..0454661ea 100644 --- a/src/Test.UnitTests.Sarif/Core/TagsTests.cs +++ b/src/Test.UnitTests.Sarif/Core/TagsTests.cs @@ -2,9 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; - using FluentAssertions; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Test.UnitTests.Sarif/Core/ToolTests.cs b/src/Test.UnitTests.Sarif/Core/ToolTests.cs index f6675d102..fba2e4ad1 100644 --- a/src/Test.UnitTests.Sarif/Core/ToolTests.cs +++ b/src/Test.UnitTests.Sarif/Core/ToolTests.cs @@ -4,9 +4,7 @@ using System; using System.Collections.ObjectModel; using System.Text; - using FluentAssertions; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Core diff --git a/src/Test.UnitTests.Sarif/Core/WebMessageUtilitiesTests.cs b/src/Test.UnitTests.Sarif/Core/WebMessageUtilitiesTests.cs index 9845b4c66..981eece7b 100644 --- a/src/Test.UnitTests.Sarif/Core/WebMessageUtilitiesTests.cs +++ b/src/Test.UnitTests.Sarif/Core/WebMessageUtilitiesTests.cs @@ -2,11 +2,8 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; - using FluentAssertions; - using Microsoft.CodeAnalysis.Sarif; - using Xunit; namespace Microsoft.CodeAnalysis.Test.UnitTests.Sarif.Core diff --git a/src/Test.UnitTests.Sarif/Core/WebRequestTests.cs b/src/Test.UnitTests.Sarif/Core/WebRequestTests.cs index 96ee95401..45e145819 100644 --- a/src/Test.UnitTests.Sarif/Core/WebRequestTests.cs +++ b/src/Test.UnitTests.Sarif/Core/WebRequestTests.cs @@ -2,12 +2,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; - using FluentAssertions; using FluentAssertions.Extensions; - using Microsoft.CodeAnalysis.Sarif; - using Xunit; namespace Microsoft.CodeAnalysis.Test.UnitTests.Sarif.Core @@ -189,7 +186,7 @@ public void WebRequest_TryParse_ReturnsFalseOnInvalidRequest() webRequest.Should().BeNull(); } - [Fact(Skip = "Disabling due to timing inconsistencies across execution environments.")] + [Fact(Skip="Disabling due to timing inconsistencies across execution environments.")] public void WebRequest_TryParse_HasAcceptablePerformance() { // This is a sanitized version of an actual customer's web request that exposed a perf diff --git a/src/Test.UnitTests.Sarif/Core/WebResponseTests.cs b/src/Test.UnitTests.Sarif/Core/WebResponseTests.cs index e64ad2eca..cef069599 100644 --- a/src/Test.UnitTests.Sarif/Core/WebResponseTests.cs +++ b/src/Test.UnitTests.Sarif/Core/WebResponseTests.cs @@ -2,11 +2,8 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; - using FluentAssertions; - using Microsoft.CodeAnalysis.Sarif; - using Xunit; namespace Microsoft.CodeAnalysis.Test.UnitTests.Sarif.Core diff --git a/src/Test.UnitTests.Sarif/ExtensionsTests.cs b/src/Test.UnitTests.Sarif/ExtensionsTests.cs index c0aadc8ea..b5b1ae437 100644 --- a/src/Test.UnitTests.Sarif/ExtensionsTests.cs +++ b/src/Test.UnitTests.Sarif/ExtensionsTests.cs @@ -4,11 +4,8 @@ using System.Collections.Generic; using System.Xml; using System.Xml.Linq; - using FluentAssertions; - using Microsoft.CodeAnalysis.Sarif.Converters; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Test.UnitTests.Sarif/FileRegionsCacheTests.cs b/src/Test.UnitTests.Sarif/FileRegionsCacheTests.cs index 01dea08ac..2fb0a9e42 100644 --- a/src/Test.UnitTests.Sarif/FileRegionsCacheTests.cs +++ b/src/Test.UnitTests.Sarif/FileRegionsCacheTests.cs @@ -5,9 +5,7 @@ using System.Collections.ObjectModel; using System.Diagnostics; using System.Text; - using FluentAssertions; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif.UnitTests diff --git a/src/Test.UnitTests.Sarif/GitHelperTests.cs b/src/Test.UnitTests.Sarif/GitHelperTests.cs index 631f26c9c..b0f951650 100644 --- a/src/Test.UnitTests.Sarif/GitHelperTests.cs +++ b/src/Test.UnitTests.Sarif/GitHelperTests.cs @@ -2,11 +2,8 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; - using FluentAssertions; - using Moq; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Test.UnitTests.Sarif/JsonTests.cs b/src/Test.UnitTests.Sarif/JsonTests.cs index 7ff157fe2..99e51e3ad 100644 --- a/src/Test.UnitTests.Sarif/JsonTests.cs +++ b/src/Test.UnitTests.Sarif/JsonTests.cs @@ -5,9 +5,7 @@ using System.Collections.Generic; using System.IO; using System.Text; - using Microsoft.CodeAnalysis.Sarif.Writers; - using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif @@ -81,4 +79,4 @@ protected static string CreateCurrentV2SarifLogText(int resultCount = 0, Action< return JsonConvert.SerializeObject(sarifLog, Formatting.Indented); } } -} +} \ No newline at end of file diff --git a/src/Test.UnitTests.Sarif/Map/JsonMapBuilderTests.cs b/src/Test.UnitTests.Sarif/Map/JsonMapBuilderTests.cs index bbad6e8c3..3f8cfc700 100644 --- a/src/Test.UnitTests.Sarif/Map/JsonMapBuilderTests.cs +++ b/src/Test.UnitTests.Sarif/Map/JsonMapBuilderTests.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.IO; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Map diff --git a/src/Test.UnitTests.Sarif/Map/LongArrayDeltaConverterTests.cs b/src/Test.UnitTests.Sarif/Map/LongArrayDeltaConverterTests.cs index b39270532..2067a33dd 100644 --- a/src/Test.UnitTests.Sarif/Map/LongArrayDeltaConverterTests.cs +++ b/src/Test.UnitTests.Sarif/Map/LongArrayDeltaConverterTests.cs @@ -2,9 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; - using Newtonsoft.Json; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Map diff --git a/src/Test.UnitTests.Sarif/MockFactory.cs b/src/Test.UnitTests.Sarif/MockFactory.cs index 3ba966e3a..006bc2409 100644 --- a/src/Test.UnitTests.Sarif/MockFactory.cs +++ b/src/Test.UnitTests.Sarif/MockFactory.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; - using Moq; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Test.UnitTests.Sarif/OrderSensitiveValueComparisonListTests.cs b/src/Test.UnitTests.Sarif/OrderSensitiveValueComparisonListTests.cs index caa5c0f28..cc79687e6 100644 --- a/src/Test.UnitTests.Sarif/OrderSensitiveValueComparisonListTests.cs +++ b/src/Test.UnitTests.Sarif/OrderSensitiveValueComparisonListTests.cs @@ -3,9 +3,7 @@ using System; using System.Collections.Generic; - using FluentAssertions; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif.UnitTests @@ -112,4 +110,4 @@ private OrderSensitiveValueComparisonList CreateTestList(IEquali return list; } } -} +} \ No newline at end of file diff --git a/src/Test.UnitTests.Sarif/Processors/GenericTests/GenericProcessorTests.cs b/src/Test.UnitTests.Sarif/Processors/GenericTests/GenericProcessorTests.cs index bad208176..206759634 100644 --- a/src/Test.UnitTests.Sarif/Processors/GenericTests/GenericProcessorTests.cs +++ b/src/Test.UnitTests.Sarif/Processors/GenericTests/GenericProcessorTests.cs @@ -4,9 +4,7 @@ using System; using System.Collections.Generic; using System.Linq; - using FluentAssertions; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Processors diff --git a/src/Test.UnitTests.Sarif/Processors/Log/LogPipelineSerializationTests.cs b/src/Test.UnitTests.Sarif/Processors/Log/LogPipelineSerializationTests.cs index c6602b542..7645668c8 100644 --- a/src/Test.UnitTests.Sarif/Processors/Log/LogPipelineSerializationTests.cs +++ b/src/Test.UnitTests.Sarif/Processors/Log/LogPipelineSerializationTests.cs @@ -2,11 +2,8 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; - using FluentAssertions; - using Newtonsoft.Json; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Processors diff --git a/src/Test.UnitTests.Sarif/Processors/Log/MergeStageTests.cs b/src/Test.UnitTests.Sarif/Processors/Log/MergeStageTests.cs index 39601eada..599dbf842 100644 --- a/src/Test.UnitTests.Sarif/Processors/Log/MergeStageTests.cs +++ b/src/Test.UnitTests.Sarif/Processors/Log/MergeStageTests.cs @@ -3,9 +3,7 @@ using System; using System.Collections.Generic; - using FluentAssertions; - using Xunit; using Xunit.Abstractions; diff --git a/src/Test.UnitTests.Sarif/Processors/Log/RebaseUriStageTests.cs b/src/Test.UnitTests.Sarif/Processors/Log/RebaseUriStageTests.cs index 373736a69..ce76d9a2b 100644 --- a/src/Test.UnitTests.Sarif/Processors/Log/RebaseUriStageTests.cs +++ b/src/Test.UnitTests.Sarif/Processors/Log/RebaseUriStageTests.cs @@ -4,9 +4,7 @@ using System; using System.Collections.Generic; using System.Linq; - using FluentAssertions; - using Xunit; using Xunit.Abstractions; diff --git a/src/Test.UnitTests.Sarif/Processors/Log/SarifLogExtensionTests.cs b/src/Test.UnitTests.Sarif/Processors/Log/SarifLogExtensionTests.cs index 61c3d8886..7e45a472a 100644 --- a/src/Test.UnitTests.Sarif/Processors/Log/SarifLogExtensionTests.cs +++ b/src/Test.UnitTests.Sarif/Processors/Log/SarifLogExtensionTests.cs @@ -4,11 +4,8 @@ using System; using System.Collections.Generic; using System.Linq; - using FluentAssertions; - using Newtonsoft.Json; - using Xunit; using Xunit.Abstractions; diff --git a/src/Test.UnitTests.Sarif/PropertiesDictionaryTests.cs b/src/Test.UnitTests.Sarif/PropertiesDictionaryTests.cs index 6fa76f982..bcf32ec75 100644 --- a/src/Test.UnitTests.Sarif/PropertiesDictionaryTests.cs +++ b/src/Test.UnitTests.Sarif/PropertiesDictionaryTests.cs @@ -4,9 +4,7 @@ using System; using System.Collections.Generic; using System.IO; - using FluentAssertions; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Test.UnitTests.Sarif/Query/EvaluatorTests.cs b/src/Test.UnitTests.Sarif/Query/EvaluatorTests.cs index 66b605bc1..106a3b09f 100644 --- a/src/Test.UnitTests.Sarif/Query/EvaluatorTests.cs +++ b/src/Test.UnitTests.Sarif/Query/EvaluatorTests.cs @@ -5,9 +5,7 @@ using System.Collections; using System.Collections.Generic; using System.Linq; - using Microsoft.CodeAnalysis.Sarif.Query.Evaluators; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Query diff --git a/src/Test.UnitTests.Sarif/Query/StringSliceTests.cs b/src/Test.UnitTests.Sarif/Query/StringSliceTests.cs index 09530292f..ccd0320eb 100644 --- a/src/Test.UnitTests.Sarif/Query/StringSliceTests.cs +++ b/src/Test.UnitTests.Sarif/Query/StringSliceTests.cs @@ -3,9 +3,7 @@ using System; using System.Text; - using Microsoft.CodeAnalysis.Sarif.Query; - using Xunit; namespace Microsoft.CodeAnalysis.Test.UnitTests.Sarif.Query diff --git a/src/Test.UnitTests.Sarif/RandomSarifLogGenerator.cs b/src/Test.UnitTests.Sarif/RandomSarifLogGenerator.cs index ff638231b..fd6ef95f4 100644 --- a/src/Test.UnitTests.Sarif/RandomSarifLogGenerator.cs +++ b/src/Test.UnitTests.Sarif/RandomSarifLogGenerator.cs @@ -5,7 +5,6 @@ using System.IO; using System.Linq; using System.Runtime.CompilerServices; - using Xunit.Abstractions; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Test.UnitTests.Sarif/Readers/DeferredCollectionsTests.cs b/src/Test.UnitTests.Sarif/Readers/DeferredCollectionsTests.cs index 63bc0649b..28ada7f46 100644 --- a/src/Test.UnitTests.Sarif/Readers/DeferredCollectionsTests.cs +++ b/src/Test.UnitTests.Sarif/Readers/DeferredCollectionsTests.cs @@ -4,11 +4,8 @@ using System.Collections.Generic; using System.IO; using System.Linq; - using Microsoft.CodeAnalysis.Sarif.Readers.SampleModel; - using Newtonsoft.Json; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Readers diff --git a/src/Test.UnitTests.Sarif/Readers/EnumConverterTests.cs b/src/Test.UnitTests.Sarif/Readers/EnumConverterTests.cs index c4e86b5a0..e300abe0d 100644 --- a/src/Test.UnitTests.Sarif/Readers/EnumConverterTests.cs +++ b/src/Test.UnitTests.Sarif/Readers/EnumConverterTests.cs @@ -48,4 +48,4 @@ public void EnumConverter_ConvertToCamelCase() Assert.Equal("meToo", EnumConverter.ConvertToCamelCase("MeToo")); } } -} +} \ No newline at end of file diff --git a/src/Test.UnitTests.Sarif/Readers/IsSuppressedInSourceConverterTests.cs b/src/Test.UnitTests.Sarif/Readers/IsSuppressedInSourceConverterTests.cs index c423da5be..5a555e495 100644 --- a/src/Test.UnitTests.Sarif/Readers/IsSuppressedInSourceConverterTests.cs +++ b/src/Test.UnitTests.Sarif/Readers/IsSuppressedInSourceConverterTests.cs @@ -2,11 +2,8 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; - using FluentAssertions; - using Newtonsoft.Json; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Readers diff --git a/src/Test.UnitTests.Sarif/Readers/LineMappingStreamReaderTests.cs b/src/Test.UnitTests.Sarif/Readers/LineMappingStreamReaderTests.cs index 1fc8847e0..0215d60f5 100644 --- a/src/Test.UnitTests.Sarif/Readers/LineMappingStreamReaderTests.cs +++ b/src/Test.UnitTests.Sarif/Readers/LineMappingStreamReaderTests.cs @@ -2,12 +2,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; using System.IO; - using Microsoft.CodeAnalysis.Sarif.Readers.SampleModel; - using Newtonsoft.Json; using Newtonsoft.Json.Linq; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Readers diff --git a/src/Test.UnitTests.Sarif/Readers/PropertyBagConverterTests.cs b/src/Test.UnitTests.Sarif/Readers/PropertyBagConverterTests.cs index 27a85f190..ef18ded6e 100644 --- a/src/Test.UnitTests.Sarif/Readers/PropertyBagConverterTests.cs +++ b/src/Test.UnitTests.Sarif/Readers/PropertyBagConverterTests.cs @@ -4,11 +4,8 @@ using System; using System.Collections.Generic; using System.Linq; - using FluentAssertions; - using Newtonsoft.Json; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Readers diff --git a/src/Test.UnitTests.Sarif/Readers/ResultDiffingVisitorTests.cs b/src/Test.UnitTests.Sarif/Readers/ResultDiffingVisitorTests.cs index ae18bd5e1..a67cd1dbe 100644 --- a/src/Test.UnitTests.Sarif/Readers/ResultDiffingVisitorTests.cs +++ b/src/Test.UnitTests.Sarif/Readers/ResultDiffingVisitorTests.cs @@ -4,7 +4,6 @@ using System.Collections.Generic; using System.Linq; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Readers diff --git a/src/Test.UnitTests.Sarif/Readers/SampleModel/LogModel.cs b/src/Test.UnitTests.Sarif/Readers/SampleModel/LogModel.cs index 4c27af78f..7e3d92319 100644 --- a/src/Test.UnitTests.Sarif/Readers/SampleModel/LogModel.cs +++ b/src/Test.UnitTests.Sarif/Readers/SampleModel/LogModel.cs @@ -4,7 +4,6 @@ using System; using System.Collections.Generic; using System.IO; - using Newtonsoft.Json; using Newtonsoft.Json.Serialization; diff --git a/src/Test.UnitTests.Sarif/RoundTrippingTests.cs b/src/Test.UnitTests.Sarif/RoundTrippingTests.cs index a086865d5..85140354d 100644 --- a/src/Test.UnitTests.Sarif/RoundTrippingTests.cs +++ b/src/Test.UnitTests.Sarif/RoundTrippingTests.cs @@ -3,11 +3,8 @@ using System; using System.Globalization; - using FluentAssertions; - using Newtonsoft.Json; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Test.UnitTests.Sarif/SarifExtensionsTests.cs b/src/Test.UnitTests.Sarif/SarifExtensionsTests.cs index 47030fea7..b6ff05fc2 100644 --- a/src/Test.UnitTests.Sarif/SarifExtensionsTests.cs +++ b/src/Test.UnitTests.Sarif/SarifExtensionsTests.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Text; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif @@ -140,4 +139,4 @@ public void SarifExtensions_Result_GetMessageText_Concise_Truncated() Assert.Equal(Expected, actual); } } -} +} \ No newline at end of file diff --git a/src/Test.UnitTests.Sarif/SarifUtilitiesTests.cs b/src/Test.UnitTests.Sarif/SarifUtilitiesTests.cs index 24d7c5676..5a7fe430b 100644 --- a/src/Test.UnitTests.Sarif/SarifUtilitiesTests.cs +++ b/src/Test.UnitTests.Sarif/SarifUtilitiesTests.cs @@ -1,15 +1,15 @@ // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +using Castle.DynamicProxy.Generators; + +using FluentAssertions; + using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Text; -using Castle.DynamicProxy.Generators; - -using FluentAssertions; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Test.UnitTests.Sarif/ToolFormatTests.cs b/src/Test.UnitTests.Sarif/ToolFormatTests.cs index add79d828..96366997b 100644 --- a/src/Test.UnitTests.Sarif/ToolFormatTests.cs +++ b/src/Test.UnitTests.Sarif/ToolFormatTests.cs @@ -4,7 +4,6 @@ using System; using System.Collections.Generic; using System.Reflection; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Test.UnitTests.Sarif/UriConverterTests.cs b/src/Test.UnitTests.Sarif/UriConverterTests.cs index 58f7203d8..8c5485921 100644 --- a/src/Test.UnitTests.Sarif/UriConverterTests.cs +++ b/src/Test.UnitTests.Sarif/UriConverterTests.cs @@ -6,13 +6,9 @@ using System.Linq; using System.Runtime.Serialization; using System.Text; - using FluentAssertions; - using Microsoft.CodeAnalysis.Sarif; - using Newtonsoft.Json; - using Xunit; namespace Microsoft.CodeAnalysis.Test.UnitTests.Sarif diff --git a/src/Test.UnitTests.Sarif/Visitors/ExtractAllArtifactionLocationsVisitorTests.cs b/src/Test.UnitTests.Sarif/Visitors/ExtractAllArtifactionLocationsVisitorTests.cs index 32acda456..8d4de5276 100644 --- a/src/Test.UnitTests.Sarif/Visitors/ExtractAllArtifactionLocationsVisitorTests.cs +++ b/src/Test.UnitTests.Sarif/Visitors/ExtractAllArtifactionLocationsVisitorTests.cs @@ -2,11 +2,8 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Collections.Generic; - using FluentAssertions; - using Microsoft.CodeAnalysis.Test.Utilities.Sarif; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Visitors diff --git a/src/Test.UnitTests.Sarif/Visitors/GitHubIngestionVisitorTests.cs b/src/Test.UnitTests.Sarif/Visitors/GitHubIngestionVisitorTests.cs index 147ed31ed..73df73664 100644 --- a/src/Test.UnitTests.Sarif/Visitors/GitHubIngestionVisitorTests.cs +++ b/src/Test.UnitTests.Sarif/Visitors/GitHubIngestionVisitorTests.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using Newtonsoft.Json; - using Xunit; using Xunit.Abstractions; diff --git a/src/Test.UnitTests.Sarif/Visitors/InsertOptionalDataVisitorTests.cs b/src/Test.UnitTests.Sarif/Visitors/InsertOptionalDataVisitorTests.cs index 4bcefd0c7..4dc45f574 100644 --- a/src/Test.UnitTests.Sarif/Visitors/InsertOptionalDataVisitorTests.cs +++ b/src/Test.UnitTests.Sarif/Visitors/InsertOptionalDataVisitorTests.cs @@ -4,7 +4,6 @@ using System; using System.Collections.Generic; using System.IO; - using FluentAssertions; using Microsoft.CodeAnalysis.Sarif.Driver; @@ -12,9 +11,7 @@ using Microsoft.CodeAnalysis.Test.Utilities.Sarif; using Moq; - using Newtonsoft.Json; - using Xunit; using Xunit.Abstractions; @@ -714,4 +711,4 @@ public void InsertOptionalDataVisitor_ResolvesOriginalUriBaseIds() run.Artifacts[0].Contents.Text.Should().Be(File.ReadAllText(Path.Combine(testDirectory, inputFileName))); } } -} +} \ No newline at end of file diff --git a/src/Test.UnitTests.Sarif/Visitors/MakeUriAbsoluteVisitorTest.cs b/src/Test.UnitTests.Sarif/Visitors/MakeUriAbsoluteVisitorTest.cs index a072e1753..50bcc05e5 100644 --- a/src/Test.UnitTests.Sarif/Visitors/MakeUriAbsoluteVisitorTest.cs +++ b/src/Test.UnitTests.Sarif/Visitors/MakeUriAbsoluteVisitorTest.cs @@ -4,9 +4,7 @@ using System; using System.Collections.Generic; using System.Linq; - using FluentAssertions; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Visitors diff --git a/src/Test.UnitTests.Sarif/Visitors/PerRunPerRuleSplittingVisitorTests.cs b/src/Test.UnitTests.Sarif/Visitors/PerRunPerRuleSplittingVisitorTests.cs index 28b166d29..f05f33f22 100644 --- a/src/Test.UnitTests.Sarif/Visitors/PerRunPerRuleSplittingVisitorTests.cs +++ b/src/Test.UnitTests.Sarif/Visitors/PerRunPerRuleSplittingVisitorTests.cs @@ -1,11 +1,8 @@ // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; - using FluentAssertions; - using Microsoft.CodeAnalysis.Test.Utilities.Sarif; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Visitors diff --git a/src/Test.UnitTests.Sarif/Visitors/RebaseUriVisitorTests.cs b/src/Test.UnitTests.Sarif/Visitors/RebaseUriVisitorTests.cs index b6d6a9c4a..6d699481c 100644 --- a/src/Test.UnitTests.Sarif/Visitors/RebaseUriVisitorTests.cs +++ b/src/Test.UnitTests.Sarif/Visitors/RebaseUriVisitorTests.cs @@ -5,13 +5,9 @@ using System.Collections.Generic; using System.IO; using System.Linq; - using FluentAssertions; - using Microsoft.CodeAnalysis.Sarif.Writers; - using Newtonsoft.Json; - using Xunit; using Xunit.Abstractions; diff --git a/src/Test.UnitTests.Sarif/Visitors/RemapIndicesVisitorTests.cs b/src/Test.UnitTests.Sarif/Visitors/RemapIndicesVisitorTests.cs index 4c6908ac0..af9297d39 100644 --- a/src/Test.UnitTests.Sarif/Visitors/RemapIndicesVisitorTests.cs +++ b/src/Test.UnitTests.Sarif/Visitors/RemapIndicesVisitorTests.cs @@ -88,7 +88,7 @@ public void RunMergingVisitor_RemapsNestedFilesProperly() // Confirm that Artifacts (including indirectly referenced ones) were all copied to the destination Run mergedRun.Artifacts.Count.Should().Be(baselineRun.Artifacts.Count + currentRun.Artifacts.Count); - + // Confirm that Artifacts have consistent indices in the merged Run for (int i = 0; i < mergedRun.Artifacts.Count; i++) { @@ -287,17 +287,17 @@ public void RunMergingVisitor_MapsRulesProperly() { var baselineRun = new Run { - Tool = new Tool + Tool = new Tool { - Driver = new ToolComponent - { + Driver = new ToolComponent + { Name = "Test Tool", Rules = new List() - { + { new ReportingDescriptor() { Id = "Rule001" }, new ReportingDescriptor() { Id = "Rule002" }, } - }, + } , }, Results = new List { diff --git a/src/Test.UnitTests.Sarif/Visitors/RemoveOptionalDataVisitorTests.cs b/src/Test.UnitTests.Sarif/Visitors/RemoveOptionalDataVisitorTests.cs index 9bcbb03df..7ac326b9e 100644 --- a/src/Test.UnitTests.Sarif/Visitors/RemoveOptionalDataVisitorTests.cs +++ b/src/Test.UnitTests.Sarif/Visitors/RemoveOptionalDataVisitorTests.cs @@ -1,11 +1,9 @@ // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +using FluentAssertions; using System; using System.Collections.Generic; - -using FluentAssertions; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Visitors @@ -43,4 +41,4 @@ public void RemoveGuids() log.Runs[0].Results[0].Guid.Should().BeNull(); } } -} +} \ No newline at end of file diff --git a/src/Test.UnitTests.Sarif/Visitors/SarifCurrentToVersionOneVisitorTests.cs b/src/Test.UnitTests.Sarif/Visitors/SarifCurrentToVersionOneVisitorTests.cs index 716f2da4e..4aaced590 100644 --- a/src/Test.UnitTests.Sarif/Visitors/SarifCurrentToVersionOneVisitorTests.cs +++ b/src/Test.UnitTests.Sarif/Visitors/SarifCurrentToVersionOneVisitorTests.cs @@ -4,9 +4,7 @@ using Microsoft.CodeAnalysis.Sarif.VersionOne; using Microsoft.CodeAnalysis.Sarif.Visitors; using Microsoft.CodeAnalysis.Sarif.Writers; - using Newtonsoft.Json; - using Xunit; using Xunit.Abstractions; @@ -82,4 +80,4 @@ protected override string ConstructTestOutputFromInputResource(string inputResou [Fact] public void SarifTransformerTests_ToVersionOne_PopulatesRunIdAndStableId() => RunTest("OneRunWithAutomationDetails.sarif"); } -} +} \ No newline at end of file diff --git a/src/Test.UnitTests.Sarif/Visitors/SarifVersionOneToCurrentVisitorTests.cs b/src/Test.UnitTests.Sarif/Visitors/SarifVersionOneToCurrentVisitorTests.cs index f90d576a0..bed561285 100644 --- a/src/Test.UnitTests.Sarif/Visitors/SarifVersionOneToCurrentVisitorTests.cs +++ b/src/Test.UnitTests.Sarif/Visitors/SarifVersionOneToCurrentVisitorTests.cs @@ -3,9 +3,7 @@ using Microsoft.CodeAnalysis.Sarif.VersionOne; using Microsoft.CodeAnalysis.Sarif.Visitors; - using Newtonsoft.Json; - using Xunit; using Xunit.Abstractions; diff --git a/src/Test.UnitTests.Sarif/Visitors/UpdateIndicesFromLegacyDataVisitorTests.cs b/src/Test.UnitTests.Sarif/Visitors/UpdateIndicesFromLegacyDataVisitorTests.cs index c28199f56..afa4d59a2 100644 --- a/src/Test.UnitTests.Sarif/Visitors/UpdateIndicesFromLegacyDataVisitorTests.cs +++ b/src/Test.UnitTests.Sarif/Visitors/UpdateIndicesFromLegacyDataVisitorTests.cs @@ -3,9 +3,7 @@ using System; using System.Collections.Generic; - using FluentAssertions; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Visitors diff --git a/src/Test.UnitTests.Sarif/WarningsTests.cs b/src/Test.UnitTests.Sarif/WarningsTests.cs index cae981748..03c3e4e99 100644 --- a/src/Test.UnitTests.Sarif/WarningsTests.cs +++ b/src/Test.UnitTests.Sarif/WarningsTests.cs @@ -3,7 +3,6 @@ using FluentAssertions; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Test.UnitTests.Sarif/Writers/MimeTypeTests.cs b/src/Test.UnitTests.Sarif/Writers/MimeTypeTests.cs index 057918ed8..b65e62ffe 100644 --- a/src/Test.UnitTests.Sarif/Writers/MimeTypeTests.cs +++ b/src/Test.UnitTests.Sarif/Writers/MimeTypeTests.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Writers diff --git a/src/Test.UnitTests.Sarif/Writers/PrereleaseCompatibilityTransformerTests.cs b/src/Test.UnitTests.Sarif/Writers/PrereleaseCompatibilityTransformerTests.cs index 3b93da522..0684dde1c 100644 --- a/src/Test.UnitTests.Sarif/Writers/PrereleaseCompatibilityTransformerTests.cs +++ b/src/Test.UnitTests.Sarif/Writers/PrereleaseCompatibilityTransformerTests.cs @@ -3,9 +3,7 @@ using System; using System.IO; - using Newtonsoft.Json; - using Xunit; using Xunit.Abstractions; diff --git a/src/Test.UnitTests.Sarif/Writers/ResultLogJsonWriterTests.cs b/src/Test.UnitTests.Sarif/Writers/ResultLogJsonWriterTests.cs index e650d7b4c..8f0cfed89 100644 --- a/src/Test.UnitTests.Sarif/Writers/ResultLogJsonWriterTests.cs +++ b/src/Test.UnitTests.Sarif/Writers/ResultLogJsonWriterTests.cs @@ -5,11 +5,8 @@ using System.Collections.Generic; using System.Globalization; using System.IO; - using FluentAssertions; - using Newtonsoft.Json; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Writers diff --git a/src/Test.UnitTests.Sarif/Writers/SarifConsolidatorTests.cs b/src/Test.UnitTests.Sarif/Writers/SarifConsolidatorTests.cs index 89a2e058b..2543bd061 100644 --- a/src/Test.UnitTests.Sarif/Writers/SarifConsolidatorTests.cs +++ b/src/Test.UnitTests.Sarif/Writers/SarifConsolidatorTests.cs @@ -3,9 +3,7 @@ using System; using System.Collections.Generic; - using Microsoft.CodeAnalysis.Sarif.Writers; - using Xunit; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Test.UnitTests.Sarif/Writers/SarifLoggerTests.cs b/src/Test.UnitTests.Sarif/Writers/SarifLoggerTests.cs index 3d20d1a57..52fd9557b 100644 --- a/src/Test.UnitTests.Sarif/Writers/SarifLoggerTests.cs +++ b/src/Test.UnitTests.Sarif/Writers/SarifLoggerTests.cs @@ -8,15 +8,11 @@ using System.Linq; using System.Reflection; using System.Text; - using FluentAssertions; - using Microsoft.CodeAnalysis.Sarif.Driver; using Microsoft.CodeAnalysis.Sarif.Writers; using Microsoft.CodeAnalysis.Test.Utilities.Sarif; - using Newtonsoft.Json; - using Xunit; using Xunit.Abstractions; diff --git a/src/Test.UnitTests.WorkItems/FilingClientFactoryTests.cs b/src/Test.UnitTests.WorkItems/FilingClientFactoryTests.cs index a1f3a9256..4d1828a37 100644 --- a/src/Test.UnitTests.WorkItems/FilingClientFactoryTests.cs +++ b/src/Test.UnitTests.WorkItems/FilingClientFactoryTests.cs @@ -2,9 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; - using FluentAssertions; - using Xunit; namespace Microsoft.WorkItems diff --git a/src/Test.UnitTests.WorkItems/Logging/ApplicationInsightsTelemetryInitializerTests.cs b/src/Test.UnitTests.WorkItems/Logging/ApplicationInsightsTelemetryInitializerTests.cs index 61085f234..b5c402f69 100644 --- a/src/Test.UnitTests.WorkItems/Logging/ApplicationInsightsTelemetryInitializerTests.cs +++ b/src/Test.UnitTests.WorkItems/Logging/ApplicationInsightsTelemetryInitializerTests.cs @@ -2,12 +2,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; - using FluentAssertions; - using Microsoft.ApplicationInsights.DataContracts; using Microsoft.TeamFoundation; - using Xunit; namespace Microsoft.WorkItems.Logging diff --git a/src/Test.UnitTests.WorkItems/Logging/MetricsLogValuesTests.cs b/src/Test.UnitTests.WorkItems/Logging/MetricsLogValuesTests.cs index 382c4837f..9bd00c55b 100644 --- a/src/Test.UnitTests.WorkItems/Logging/MetricsLogValuesTests.cs +++ b/src/Test.UnitTests.WorkItems/Logging/MetricsLogValuesTests.cs @@ -4,13 +4,10 @@ using System; using System.Collections.Generic; using System.Linq; - using FluentAssertions; - using Microsoft.ApplicationInsights.DataContracts; using Microsoft.Extensions.Logging; using Microsoft.TeamFoundation; - using Xunit; namespace Microsoft.WorkItems.Logging diff --git a/src/Test.UnitTests.WorkItems/ServiceProviderFactoryTests.cs b/src/Test.UnitTests.WorkItems/ServiceProviderFactoryTests.cs index 11b799969..f11117137 100644 --- a/src/Test.UnitTests.WorkItems/ServiceProviderFactoryTests.cs +++ b/src/Test.UnitTests.WorkItems/ServiceProviderFactoryTests.cs @@ -2,9 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; - using FluentAssertions; - using Xunit; namespace Microsoft.WorkItems diff --git a/src/Test.Utilities.Sarif/AssertionExtensions.cs b/src/Test.Utilities.Sarif/AssertionExtensions.cs index dd7fa9c61..67d73dd1d 100644 --- a/src/Test.Utilities.Sarif/AssertionExtensions.cs +++ b/src/Test.Utilities.Sarif/AssertionExtensions.cs @@ -4,11 +4,9 @@ using System; using System.Text.RegularExpressions; using System.Threading.Tasks; - using FluentAssertions; using FluentAssertions.Execution; using FluentAssertions.Primitives; - using Microsoft.CodeAnalysis.Test.Utilities.Sarif; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Test.Utilities.Sarif/FileDiffingFunctionalTests.cs b/src/Test.Utilities.Sarif/FileDiffingFunctionalTests.cs index 8d0f543a9..3131a3f98 100644 --- a/src/Test.Utilities.Sarif/FileDiffingFunctionalTests.cs +++ b/src/Test.Utilities.Sarif/FileDiffingFunctionalTests.cs @@ -3,7 +3,6 @@ using System; using System.IO; - using Xunit.Abstractions; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Test.Utilities.Sarif/FileDiffingUnitTests.cs b/src/Test.Utilities.Sarif/FileDiffingUnitTests.cs index 0f763d45d..6ee23114e 100644 --- a/src/Test.Utilities.Sarif/FileDiffingUnitTests.cs +++ b/src/Test.Utilities.Sarif/FileDiffingUnitTests.cs @@ -8,17 +8,13 @@ using System.Linq; using System.Reflection; using System.Text; - using FluentAssertions; - using Microsoft.CodeAnalysis.Sarif.Readers; using Microsoft.CodeAnalysis.Sarif.VersionOne; using Microsoft.CodeAnalysis.Sarif.Writers; - using Newtonsoft.Json; using Newtonsoft.Json.Linq; using Newtonsoft.Json.Serialization; - using Xunit.Abstractions; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Test.Utilities.Sarif/TestData.cs b/src/Test.Utilities.Sarif/TestData.cs index a38c196ed..1b9cf77d6 100644 --- a/src/Test.Utilities.Sarif/TestData.cs +++ b/src/Test.Utilities.Sarif/TestData.cs @@ -3,7 +3,6 @@ using System; using System.Collections.Generic; - using Microsoft.CodeAnalysis.Sarif; namespace Microsoft.CodeAnalysis.Test.Utilities.Sarif @@ -438,4 +437,4 @@ public static SarifLog CreateBaselineNew() }; } } -} +} \ No newline at end of file diff --git a/src/Test.Utilities.Sarif/TestMessageLogger.cs b/src/Test.Utilities.Sarif/TestMessageLogger.cs index 3bb345eb1..575b8c850 100644 --- a/src/Test.Utilities.Sarif/TestMessageLogger.cs +++ b/src/Test.Utilities.Sarif/TestMessageLogger.cs @@ -95,4 +95,4 @@ public void LogConfigurationNotification(Notification notification) ConfigurationNotifications.Add(notification); } } -} +} \ No newline at end of file diff --git a/src/Test.Utilities.Sarif/Utilities.cs b/src/Test.Utilities.Sarif/Utilities.cs index 761dc9ea3..6f3620f0c 100644 --- a/src/Test.Utilities.Sarif/Utilities.cs +++ b/src/Test.Utilities.Sarif/Utilities.cs @@ -9,10 +9,8 @@ using System.Text; using System.Xml; using System.Xml.Linq; - using Microsoft.CodeAnalysis.Sarif.Converters; using Microsoft.CodeAnalysis.Sarif.Writers; - using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/WorkItems/AzureDevOpsFilingClient.cs b/src/WorkItems/AzureDevOpsFilingClient.cs index 65271d8f0..3c9ce1ae7 100644 --- a/src/WorkItems/AzureDevOpsFilingClient.cs +++ b/src/WorkItems/AzureDevOpsFilingClient.cs @@ -6,14 +6,12 @@ using System.IO; using System.Linq; using System.Threading.Tasks; - using Microsoft.Extensions.Logging; using Microsoft.TeamFoundation.WorkItemTracking.WebApi.Models; using Microsoft.VisualStudio.Services.WebApi; using Microsoft.VisualStudio.Services.WebApi.Patch; using Microsoft.VisualStudio.Services.WebApi.Patch.Json; using Microsoft.WorkItems.Logging; - using Newtonsoft.Json; namespace Microsoft.WorkItems diff --git a/src/WorkItems/FilingClient.cs b/src/WorkItems/FilingClient.cs index 4786ee742..de194f531 100644 --- a/src/WorkItems/FilingClient.cs +++ b/src/WorkItems/FilingClient.cs @@ -4,7 +4,6 @@ using System; using System.Collections.Generic; using System.Threading.Tasks; - using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; @@ -14,7 +13,7 @@ namespace Microsoft.WorkItems /// Abstract base for classes that represents a system (for example, GitHub or Azure DevOps) /// to which work items can be filed. /// - public abstract class FilingClient : IDisposable + public abstract class FilingClient: IDisposable { public enum SourceControlProvider diff --git a/src/WorkItems/GitHubClientWrapper.cs b/src/WorkItems/GitHubClientWrapper.cs index 072ed6a34..539b390b9 100644 --- a/src/WorkItems/GitHubClientWrapper.cs +++ b/src/WorkItems/GitHubClientWrapper.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Threading.Tasks; - using Octokit; namespace Microsoft.WorkItems @@ -33,4 +32,4 @@ public Task UpdateWorkItemAsync( return this.gitHubClient.Issue.Update(organization, repository, issueNumber, issueUpdate); } } -} +} \ No newline at end of file diff --git a/src/WorkItems/GitHubConnectionFacade.cs b/src/WorkItems/GitHubConnectionFacade.cs index e64f1d898..09df40240 100644 --- a/src/WorkItems/GitHubConnectionFacade.cs +++ b/src/WorkItems/GitHubConnectionFacade.cs @@ -3,11 +3,9 @@ using System; using System.Threading.Tasks; - using Microsoft.TeamFoundation.WorkItemTracking.WebApi; using Microsoft.VisualStudio.Services.Common; using Microsoft.VisualStudio.Services.WebApi; - using Octokit; using Octokit.Internal; @@ -31,4 +29,4 @@ async public Task ConnectAsync(string organization, string return gitHubClientWrapper; } } -} +} \ No newline at end of file diff --git a/src/WorkItems/GitHubFilingClient.cs b/src/WorkItems/GitHubFilingClient.cs index d82e1aae0..64d36abf6 100644 --- a/src/WorkItems/GitHubFilingClient.cs +++ b/src/WorkItems/GitHubFilingClient.cs @@ -4,7 +4,6 @@ using System; using System.Collections.Generic; using System.Threading.Tasks; - using Octokit; namespace Microsoft.WorkItems @@ -77,4 +76,4 @@ public override Task GetWorkItemMetadata(WorkItemModel workItemMo throw new NotImplementedException(); } } -} +} \ No newline at end of file diff --git a/src/WorkItems/IGitHubClientWrapper.cs b/src/WorkItems/IGitHubClientWrapper.cs index d16e5ada6..f93574314 100644 --- a/src/WorkItems/IGitHubClientWrapper.cs +++ b/src/WorkItems/IGitHubClientWrapper.cs @@ -1,9 +1,8 @@ // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using System.Threading.Tasks; - using Octokit; +using System.Threading.Tasks; namespace Microsoft.WorkItems { @@ -28,4 +27,4 @@ public Task UpdateWorkItemAsync( int issueNumber, IssueUpdate issueUpdate); } -} +} \ No newline at end of file diff --git a/src/WorkItems/IGitHubConnection.cs b/src/WorkItems/IGitHubConnection.cs index 4bebb6fa1..5c45f4207 100644 --- a/src/WorkItems/IGitHubConnection.cs +++ b/src/WorkItems/IGitHubConnection.cs @@ -1,11 +1,10 @@ // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +using Octokit; using System; using System.Threading.Tasks; -using Octokit; - namespace Microsoft.WorkItems { /// @@ -21,4 +20,4 @@ internal interface IGitHubConnection /// Task ConnectAsync(string organization, string personalAccessToken); } -} +} \ No newline at end of file diff --git a/src/WorkItems/IVssConnection.cs b/src/WorkItems/IVssConnection.cs index c8091bed4..e23a2f42f 100644 --- a/src/WorkItems/IVssConnection.cs +++ b/src/WorkItems/IVssConnection.cs @@ -9,7 +9,7 @@ namespace Microsoft.WorkItems /// /// This interface allows for mocking of the low-level VssConnection class. /// - internal interface IVssConnection : IDisposable + internal interface IVssConnection: IDisposable { /// /// Provide for both the instantiation of the connection instance followed by @@ -26,4 +26,4 @@ internal interface IVssConnection : IDisposable /// Task GetClientAsync(); } -} +} \ No newline at end of file diff --git a/src/WorkItems/IWorkItemModelTransformer.cs b/src/WorkItems/IWorkItemModelTransformer.cs index fd4d04691..a2c65678d 100644 --- a/src/WorkItems/IWorkItemModelTransformer.cs +++ b/src/WorkItems/IWorkItemModelTransformer.cs @@ -7,4 +7,4 @@ public interface IWorkItemModelTransformer where T : WorkItemModel { void Transform(T workItemModel); } -} +} \ No newline at end of file diff --git a/src/WorkItems/IWorkItemTrackingHttpClient.cs b/src/WorkItems/IWorkItemTrackingHttpClient.cs index feafa02c7..d0b263715 100644 --- a/src/WorkItems/IWorkItemTrackingHttpClient.cs +++ b/src/WorkItems/IWorkItemTrackingHttpClient.cs @@ -6,7 +6,6 @@ using System.IO; using System.Threading; using System.Threading.Tasks; - using Microsoft.TeamFoundation.WorkItemTracking.WebApi.Models; using Microsoft.VisualStudio.Services.WebApi.Patch.Json; @@ -30,13 +29,13 @@ Task CreateAttachmentAsync( /// Creates a single work item. /// Task CreateWorkItemAsync( - JsonPatchDocument document, - string project, - string type, - bool? validateOnly = null, - bool? bypassRules = null, - bool? suppressNotifications = null, - object userState = null, + JsonPatchDocument document, + string project, + string type, + bool? validateOnly = null, + bool? bypassRules = null, + bool? suppressNotifications = null, + object userState = null, CancellationToken cancellationToken = default); /// @@ -66,4 +65,4 @@ Task GetWorkItemAsync( object userState = null, CancellationToken cancellationToken = default); } -} +} \ No newline at end of file diff --git a/src/WorkItems/Logging/ApplicationInsightsTelemetryInitializer.cs b/src/WorkItems/Logging/ApplicationInsightsTelemetryInitializer.cs index 0a5e4b681..a8929376c 100644 --- a/src/WorkItems/Logging/ApplicationInsightsTelemetryInitializer.cs +++ b/src/WorkItems/Logging/ApplicationInsightsTelemetryInitializer.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; - using Microsoft.ApplicationInsights.Channel; using Microsoft.ApplicationInsights.Extensibility; diff --git a/src/WorkItems/Logging/AssemblyExtensions.cs b/src/WorkItems/Logging/AssemblyExtensions.cs index 7ffeb8c75..2a9407671 100644 --- a/src/WorkItems/Logging/AssemblyExtensions.cs +++ b/src/WorkItems/Logging/AssemblyExtensions.cs @@ -4,7 +4,6 @@ using System.Collections.Generic; using System.IO; using System.Reflection; - using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; diff --git a/src/WorkItems/Logging/LoggerExtensions.cs b/src/WorkItems/Logging/LoggerExtensions.cs index 9e8df3af5..c276bb243 100644 --- a/src/WorkItems/Logging/LoggerExtensions.cs +++ b/src/WorkItems/Logging/LoggerExtensions.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; - using Microsoft.CodeAnalysis.WorkItems.Logging; using Microsoft.Extensions.Logging; @@ -13,19 +12,19 @@ public static class LoggerExtensions public static void LogMetrics(this ILogger logger, EventId eventId, IDictionary customDimensions) { LogMetrics( - logger, - eventId, - message: string.Empty, + logger, + eventId, + message: string.Empty, customDimensions); } public static void LogMetrics(this ILogger logger, EventId eventId, string message, IDictionary customDimensions) { logger.Log( - LogLevel.Information, - eventId, + LogLevel.Information, + eventId, new MetricsLogValues(message, eventId, customDimensions), - exception: null, + exception: null, (state, error) => state.ToString()); } diff --git a/src/WorkItems/Logging/LoggingContext.cs b/src/WorkItems/Logging/LoggingContext.cs index e18328874..8ecd5f58b 100644 --- a/src/WorkItems/Logging/LoggingContext.cs +++ b/src/WorkItems/Logging/LoggingContext.cs @@ -4,7 +4,6 @@ using System; using System.Collections.Generic; using System.Text; - using Microsoft.Extensions.Logging; namespace Microsoft.CodeAnalysis.WorkItems.Logging diff --git a/src/WorkItems/Logging/MetricsLogValues.cs b/src/WorkItems/Logging/MetricsLogValues.cs index f515db38a..84c1dc9cb 100644 --- a/src/WorkItems/Logging/MetricsLogValues.cs +++ b/src/WorkItems/Logging/MetricsLogValues.cs @@ -5,7 +5,6 @@ using System.Collections; using System.Collections.Generic; using System.Linq; - using Microsoft.Extensions.Logging; namespace Microsoft.WorkItems.Logging diff --git a/src/WorkItems/Properties/AssemblyInfo.cs b/src/WorkItems/Properties/AssemblyInfo.cs index 3fd1bec8e..f14fe0b91 100644 --- a/src/WorkItems/Properties/AssemblyInfo.cs +++ b/src/WorkItems/Properties/AssemblyInfo.cs @@ -1,2 +1,2 @@ // Copyright (c) Microsoft. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. \ No newline at end of file diff --git a/src/WorkItems/ServiceProviderFactory.cs b/src/WorkItems/ServiceProviderFactory.cs index 06dc29bbf..8984d037a 100644 --- a/src/WorkItems/ServiceProviderFactory.cs +++ b/src/WorkItems/ServiceProviderFactory.cs @@ -2,7 +2,6 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; - using Microsoft.ApplicationInsights.Channel; using Microsoft.ApplicationInsights.Extensibility; using Microsoft.Extensions.Configuration; diff --git a/src/WorkItems/VssConnectionFacade.cs b/src/WorkItems/VssConnectionFacade.cs index 9c2ae0f6d..43c8b26dd 100644 --- a/src/WorkItems/VssConnectionFacade.cs +++ b/src/WorkItems/VssConnectionFacade.cs @@ -3,7 +3,6 @@ using System; using System.Threading.Tasks; - using Microsoft.TeamFoundation.WorkItemTracking.WebApi; using Microsoft.VisualStudio.Services.Common; using Microsoft.VisualStudio.Services.WebApi; @@ -36,4 +35,4 @@ public void Dispose() } } } -} +} \ No newline at end of file diff --git a/src/WorkItems/WorkItemTrackingHttpClientWrapper.cs b/src/WorkItems/WorkItemTrackingHttpClientWrapper.cs index 7caaebe59..17d56e50c 100644 --- a/src/WorkItems/WorkItemTrackingHttpClientWrapper.cs +++ b/src/WorkItems/WorkItemTrackingHttpClientWrapper.cs @@ -6,7 +6,6 @@ using System.IO; using System.Threading; using System.Threading.Tasks; - using Microsoft.TeamFoundation.WorkItemTracking.WebApi; using Microsoft.TeamFoundation.WorkItemTracking.WebApi.Models; using Microsoft.VisualStudio.Services.WebApi.Patch.Json; @@ -23,7 +22,7 @@ public WorkItemTrackingHttpClientWrapper(WorkItemTrackingHttpClient workItemTrac } public Task CreateAttachmentAsync( - MemoryStream stream, + MemoryStream stream, string fileName = null, string uploadType = null, string areaPath = null, @@ -34,9 +33,9 @@ public Task CreateAttachmentAsync( } public Task CreateWorkItemAsync( - JsonPatchDocument document, - string project, - string type, + JsonPatchDocument document, + string project, + string type, bool? validateOnly = null, bool? bypassRules = null, bool? suppressNotifications = null, @@ -80,4 +79,4 @@ public void Dispose() } } } -} +} \ No newline at end of file From e2b37703bbed3f94b869d3393fb0e39fb07ac242 Mon Sep 17 00:00:00 2001 From: Eddy Nakamura Date: Fri, 16 Oct 2020 08:34:00 -0300 Subject: [PATCH 4/7] enforcing file normalization --- src/.editorconfig | 9 +++------ src/Samples/Sarif.Sdk.Sample/Program.cs | 3 +++ src/Samples/Sarif.WorkItems.Sample/Program.cs | 2 ++ src/Samples/SarifDeferredSample/Program.cs | 14 ++++++++------ src/Samples/SarifToCsv/CsvWriter.cs | 2 +- src/Samples/SarifToCsv/Program.cs | 2 +- src/Samples/SarifToCsv/SarifCsvColumnWriters.cs | 3 ++- src/Samples/SarifToCsv/SdkExtensions.cs | 2 +- src/Sarif.Converters/AndroidStudioConverter.cs | 2 +- src/Sarif.Converters/ClangAnalyzerConverter.cs | 2 +- .../ContrastSecurityConverter.cs | 4 +++- src/Sarif.Converters/FlawFinderCsvConverter.cs | 5 +++-- src/Sarif.Converters/FortifyFprConverter.cs | 16 ++++++++-------- src/Sarif.Converters/FortifyUtilities.cs | 4 ++-- src/Sarif.Converters/FxCopConverter.cs | 2 +- src/Sarif.Converters/GlobalSuppressions.cs | 2 +- src/Sarif.Converters/LogReader.cs | 2 +- src/Sarif.Converters/MSBuildConverter.cs | 2 +- src/Sarif.Converters/Properties/AssemblyInfo.cs | 2 +- src/Sarif.Converters/PylintConverter.cs | 1 + .../PylintObjectModel/PylintLog.cs | 2 +- .../PylintObjectModel/PylintLogReader.cs | 3 ++- src/Sarif.Converters/SparseReader.cs | 2 +- src/Sarif.Converters/TSLintConverter.cs | 1 + src/Sarif.Converters/TSLintLogReader.cs | 2 ++ src/Sarif.Converters/TextFormats/CsvReader.cs | 2 +- src/Sarif.Converters/ToolFileConverterBase.cs | 1 + src/Sarif.Converters/ToolFormatConverter.cs | 2 ++ src/Sarif.Driver/DriverExtensionMethods.cs | 1 + src/Sarif.Driver/DriverUtilities.cs | 3 ++- src/Sarif.Driver/PathExtensions.cs | 2 +- src/Sarif.Driver/Properties/AssemblyInfo.cs | 2 +- src/Sarif.Driver/Sdk/AnalysisApplicability.cs | 2 +- src/Sarif.Driver/Sdk/AnalysisContext.cs | 2 +- src/Sarif.Driver/Sdk/AnalyzeCommandBase.cs | 3 ++- src/Sarif.Driver/Sdk/AnalyzeOptionsBase.cs | 2 +- src/Sarif.Driver/Sdk/CommonOptionsBase.cs | 3 ++- .../Sdk/ExportRulesDocumentationCommandBase.cs | 6 +++--- src/Sarif.Driver/Sdk/MultifileOptionsBase.cs | 1 + src/Sarif.Driver/SemanticVersion.cs | 2 +- .../AbsoluteUriCommand.cs | 2 ++ .../AbsoluteUriOptions.cs | 1 + src/Sarif.Multitool.Library/CommandBase.cs | 2 ++ src/Sarif.Multitool.Library/CommandUtilities.cs | 1 + src/Sarif.Multitool.Library/ConvertCommand.cs | 2 +- src/Sarif.Multitool.Library/ConvertOptions.cs | 3 ++- .../ExportValidationConfigurationCommand.cs | 1 + .../ExportValidationConfigurationOptions.cs | 3 ++- .../ExportValidationDocumentationOptions.cs | 1 + .../ExportValidationRulesMetadataOptions.cs | 1 + .../FileWorkItemsCommand.cs | 4 +++- .../FileWorkItemsOptions.cs | 3 ++- src/Sarif.Multitool.Library/JTokenExtensions.cs | 3 ++- src/Sarif.Multitool.Library/MergeCommand.cs | 2 +- src/Sarif.Multitool.Library/MergeOptions.cs | 7 ++++--- src/Sarif.Multitool.Library/PageCommand.cs | 2 ++ src/Sarif.Multitool.Library/QueryCommand.cs | 1 + src/Sarif.Multitool.Library/RebaseUriCommand.cs | 1 + src/Sarif.Multitool.Library/RebaseUriOptions.cs | 1 + .../ResultMatchSetCommand.cs | 2 ++ .../ResultMatchSetOptions.cs | 1 + .../ResultMatchingCommand.cs | 1 + .../ResultMatchingOptions.cs | 2 ++ src/Sarif.Multitool.Library/RewriteCommand.cs | 2 ++ src/Sarif.Multitool.Library/RewriteOptions.cs | 3 ++- src/Sarif.Multitool.Library/Rules/RuleId.cs | 2 +- .../Rules/SARIF1005.UriMustBeAbsolute.cs | 4 ++-- .../Rules/SARIF1010.RuleIdMustBeConsistent.cs | 10 +++++----- .../Rules/SARIF1011.ReferenceFinalSchema.cs | 2 +- .../Rules/SARIF2004.OptimizeFileSize.cs | 2 +- .../Rules/SARIF2006.UrisShouldBeReachable.cs | 4 ++-- .../Rules/SARIF2008.ProvideSchema.cs | 2 +- .../Rules/SARIF2010.ProvideCodeSnippets.cs | 1 + .../Rules/SarifValidationSkimmerBase.cs | 2 ++ .../SarifValidationContext.cs | 1 + src/Sarif.Multitool.Library/StringExtensions.cs | 1 + src/Sarif.Multitool.Library/TransformCommand.cs | 4 +++- src/Sarif.Multitool.Library/TransformOptions.cs | 3 ++- src/Sarif.Multitool.Library/ValidateCommand.cs | 1 + src/Sarif.Multitool.Library/ValidateOptions.cs | 1 + src/Sarif.WorkItems/SarifWorkItemContext.cs | 8 +++++--- src/Sarif.WorkItems/SarifWorkItemFiler.cs | 6 ++++-- src/Sarif.WorkItems/SarifWorkItemModel.cs | 8 +++++--- src/Sarif.WorkItems/SarifWorkItemsExtensions.cs | 6 +++--- src/Sarif/Autogenerated/.editorconfig | 7 +++++++ .../DefaultBaseline/CodeFlowBaselineEquals.cs | 2 +- .../DefaultBaseline/ThreadFlowBaselineEquals.cs | 2 +- .../ThreadFlowLocationBaselineEquals.cs | 2 +- .../DataStructures/MatchedResults.cs | 2 +- .../Baseline/ResultMatching/IResultMatcher.cs | 1 + .../IRemappingCalculator.cs | 2 +- .../RemappingCalculators/SarifLogRemapping.cs | 2 +- .../ResultMatchingBaselinerFactory.cs | 1 + src/Sarif/Baseline/V2/WhatComponent.cs | 2 +- src/Sarif/Baseline/V2/WhatMap.cs | 4 ++-- src/Sarif/Baseline/V2/WhereComparer.cs | 2 +- src/Sarif/ConsoleLogger.cs | 2 +- src/Sarif/Core/Artifact.cs | 1 + src/Sarif/Core/CodeFlow.cs | 4 ++-- src/Sarif/Core/IPropertyBagHolder.cs | 2 +- src/Sarif/Core/PropertyBagHolder.cs | 2 ++ src/Sarif/Core/Run.cs | 2 +- src/Sarif/Core/SarifLog.cs | 2 ++ src/Sarif/Core/SerializedPropertyInfo.cs | 1 + src/Sarif/ExtensionMethods.cs | 6 +++--- src/Sarif/ExternalProcess.cs | 2 +- src/Sarif/FileRegionsCache.cs | 2 +- src/Sarif/GlobalSuppressions.cs | 2 +- src/Sarif/IConsoleCapture.cs | 2 +- src/Sarif/IOptionsProvider.cs | 2 +- src/Sarif/IntegerSet.cs | 1 + src/Sarif/NotYetAutoGenerated/Address.cs | 4 +++- src/Sarif/NotYetAutoGenerated/Invocation.cs | 4 +++- .../ReportingConfiguration.cs | 4 +++- .../NotYetAutoGenerated/ReportingDescriptor.cs | 4 +++- src/Sarif/NotYetAutoGenerated/Result.cs | 4 +++- src/Sarif/NotYetAutoGenerated/Run.cs | 4 +++- src/Sarif/NotYetAutoGenerated/SarifLog.cs | 4 +++- src/Sarif/Notes.cs | 2 +- src/Sarif/PerLanguageOption.cs | 2 +- .../Processors/Log/SarifLogExtensionMethods.cs | 4 ++-- src/Sarif/Processors/Log/SarifLogPipeline.cs | 1 + src/Sarif/Properties/AssemblyInfo.cs | 2 +- src/Sarif/PropertiesDictionary.cs | 1 + .../Evaluators/PropertyBagPropertyEvaluator.cs | 1 + src/Sarif/Readers/DateTimeConverter.cs | 1 + .../Readers/DeferredDictionaryConverter.cs | 1 + src/Sarif/Readers/DeferredListConverter.cs | 1 + src/Sarif/Readers/EnumConverter.cs | 1 + src/Sarif/Readers/JsonPositionedTextReader.cs | 1 + src/Sarif/Readers/LineMappingStreamReader.cs | 6 +++--- src/Sarif/Readers/PropertyBagConverter.cs | 2 +- src/Sarif/Readers/SarifContractResolver.cs | 1 + .../Readers/SarifDeferredContractResolver.cs | 1 + src/Sarif/Readers/SarifVersionConverter.cs | 1 + src/Sarif/Readers/UriConverter.cs | 3 ++- src/Sarif/RuleUtilities.cs | 2 +- src/Sarif/SplittingStrategy.cs | 2 +- src/Sarif/StringSet.cs | 1 + src/Sarif/TypedPropertiesDictionary.cs | 1 + src/Sarif/TypedPropertiesDictionaryConverter.cs | 1 + src/Sarif/VersionConstants.cs | 2 +- .../Autogenerated/AlgorithmKindVersionOne.cs | 2 +- ...AnnotatedCodeLocationImportanceVersionOne.cs | 2 +- .../AnnotatedCodeLocationKindVersionOne.cs | 2 +- .../AnnotatedCodeLocationVersionOne.cs | 3 ++- ...tedCodeLocationVersionOneEqualityComparer.cs | 2 +- .../Autogenerated/AnnotationVersionOne.cs | 2 +- .../AnnotationVersionOneEqualityComparer.cs | 2 +- .../Autogenerated/BaselineStateVersionOne.cs | 2 +- .../Autogenerated/CodeFlowVersionOne.cs | 2 +- .../CodeFlowVersionOneEqualityComparer.cs | 2 +- .../Autogenerated/ExceptionDataVersionOne.cs | 2 +- .../ExceptionDataVersionOneEqualityComparer.cs | 2 +- .../Autogenerated/FileChangeVersionOne.cs | 2 +- .../FileChangeVersionOneEqualityComparer.cs | 2 +- .../Autogenerated/FileDataVersionOne.cs | 2 +- .../FileDataVersionOneEqualityComparer.cs | 2 +- .../VersionOne/Autogenerated/FixVersionOne.cs | 2 +- .../FixVersionOneEqualityComparer.cs | 2 +- .../FormattedRuleMessageVersionOne.cs | 2 +- ...ttedRuleMessageVersionOneEqualityComparer.cs | 2 +- .../VersionOne/Autogenerated/HashVersionOne.cs | 2 +- .../HashVersionOneEqualityComparer.cs | 2 +- .../Autogenerated/IRuleVersionOneVersionOne.cs | 2 +- .../ISarifNodeVersionOneVersionOne.cs | 2 +- .../Autogenerated/InvocationVersionOne.cs | 2 +- .../InvocationVersionOneEqualityComparer.cs | 2 +- .../Autogenerated/LocationVersionOne.cs | 2 +- .../LocationVersionOneEqualityComparer.cs | 2 +- .../Autogenerated/LogicalLocationVersionOne.cs | 2 +- ...LogicalLocationVersionOneEqualityComparer.cs | 2 +- .../NotificationLevelVersionOne.cs | 2 +- .../Autogenerated/NotificationVersionOne.cs | 2 +- .../NotificationVersionOneEqualityComparer.cs | 2 +- .../Autogenerated/PhysicalLocationVersionOne.cs | 2 +- ...hysicalLocationVersionOneEqualityComparer.cs | 2 +- .../Autogenerated/RegionVersionOne.cs | 2 +- .../RegionVersionOneEqualityComparer.cs | 2 +- .../Autogenerated/ReplacementVersionOne.cs | 2 +- .../ReplacementVersionOneEqualityComparer.cs | 2 +- .../Autogenerated/ResultLevelVersionOne.cs | 2 +- .../Autogenerated/ResultVersionOne.cs | 2 +- .../ResultVersionOneEqualityComparer.cs | 2 +- .../RuleConfigurationVersionOne.cs | 2 +- .../VersionOne/Autogenerated/RuleVersionOne.cs | 2 +- .../RuleVersionOneEqualityComparer.cs | 2 +- .../VersionOne/Autogenerated/RunVersionOne.cs | 2 +- .../RunVersionOneEqualityComparer.cs | 2 +- .../Autogenerated/SarifLogVersionOne.cs | 2 +- .../SarifLogVersionOneEqualityComparer.cs | 2 +- .../SarifNodeKindVersionOneVersionOne.cs | 2 +- .../SarifRewritingVisitorVersionOne.cs | 2 +- .../Autogenerated/SarifVersionVersionOne.cs | 2 +- .../Autogenerated/StackFrameVersionOne.cs | 2 +- .../StackFrameVersionOneEqualityComparer.cs | 2 +- .../VersionOne/Autogenerated/StackVersionOne.cs | 2 +- .../StackVersionOneEqualityComparer.cs | 2 +- .../SuppressionStatesVersionOne.cs | 2 +- .../Autogenerated/TaintKindVersionOne.cs | 2 +- .../VersionOne/Autogenerated/ToolVersionOne.cs | 2 +- .../ToolVersionOneEqualityComparer.cs | 2 +- .../Core/IPropertyBagHolderVersionOne.cs | 2 +- .../Core/PropertyBagHolderVersionOne.cs | 2 ++ .../Readers/AnnotatedCodeLocationIdConverter.cs | 1 + .../Readers/SarifContractResolverVersionOne.cs | 2 ++ .../VersionOne/SarifUtilitiesVersionOne.cs | 1 + src/Sarif/Visitors/PartitioningVisitor.cs | 2 +- .../Visitors/SarifCurrentToVersionOneVisitor.cs | 2 ++ src/Sarif/Visitors/SarifTransformerUtilities.cs | 4 +++- .../Visitors/SarifVersionOneToCurrentVisitor.cs | 2 ++ src/Sarif/Visitors/UnknownEncodingException.cs | 2 +- .../UpdateIndicesFromLegacyDataVisitor.cs | 2 +- ...alLocationKeyToLogicalLocationDataVisitor.cs | 1 + src/Sarif/Warnings.cs | 2 +- .../PrereleaseCompatibilityTransformer.cs | 4 +++- src/Sarif/Writers/ResultLogJsonWriter.cs | 3 ++- src/Sarif/Writers/SarifLogger.cs | 3 ++- src/Sarif/Writers/SarifOneZeroZeroLogger.cs | 2 ++ src/Sarif/Writers/SarifPartitioner.cs | 1 + .../BaseliningDetailLogger.cs | 2 +- .../Extensions/ResultTextFormatter.cs | 2 +- src/Test.EndToEnd.Baselining/Program.cs | 4 ++-- .../DefaultObjectPopulatingVisitor.cs | 3 ++- .../Multitool/ValidateCommandTests.cs | 4 ++-- .../MultitoolCommandLineTests.cs | 2 ++ .../PropertyBagConverterTests.cs | 3 +++ .../SarifConverterTests.cs | 3 +++ .../SarifLogEqualityComparerTests.cs | 4 ++++ .../SarifValidatorTests.cs | 4 ++++ .../Writers/FilterByPredicateTests.cs | 3 +++ .../Writers/PartitionTests.cs | 4 ++++ .../FortifyFpr/src/ContentFileViewModel.cs | 2 +- .../ContentFileHandlingController.cs | 2 +- .../FortifyFpr/src/DocumentValidator.cs | 2 +- .../TestWorkItemModelTransformer.cs | 1 + .../AndroidStudioConverterTests.cs | 2 ++ .../AndroidStudioProblemTests.cs | 3 +++ .../AndroidStudioStringsTests.cs | 1 + .../BuiltinConverterFactoryTests.cs | 2 ++ .../ClangAnalyzerConverterTests.cs | 2 ++ .../ConverterTestsBase.cs | 2 ++ .../CppCheckConverterTests.cs | 3 +++ .../CppCheckErrorTests.cs | 2 ++ .../CppCheckLocationTests.cs | 2 ++ .../CppCheckStringsTests.cs | 1 + .../FlawFinderCsvConverterTests.cs | 4 ++++ .../FortifyConverterTests.cs | 2 ++ .../FortifyFprConverterTests.cs | 2 ++ .../FortifyFprStringsTests.cs | 1 + .../FortifyIssueTests.cs | 2 ++ .../FortifyPathElementTests.cs | 1 + .../FortifyStringsTests.cs | 1 + .../FxCopConverterTests.cs | 2 ++ .../PylintConverterTests.cs | 4 ++++ .../TSLintConverterTests.cs | 4 ++++ .../TSLintLogReaderTests.cs | 4 ++++ .../ToolFileConverterBaseTests.cs | 2 ++ .../ToolFormatConverterTests.cs | 3 +++ .../DriverExtensionMethodsTests.cs | 3 +++ .../DriverUtilitiesTests.cs | 3 +++ .../FileSpecifierTests.cs | 2 ++ .../FunctionlessTestRule.cs | 1 + .../Sdk/AnalyzeCommandBaseTests.cs | 7 ++++++- .../Sdk/DriverSdkExtensionsTests.cs | 3 +++ .../Sdk/EntryPointUtilitiesTests.cs | 1 + .../Sdk/ExportConfigurationCommandBaseTests.cs | 1 + .../Sdk/FormatForVisualStudioTests.cs | 3 +++ .../Sdk/RuleUtilitiesTests.cs | 2 ++ .../Sdk/SarifLoggerTests.cs | 3 +++ .../Sdk/SkimmerBaseTests.cs | 3 +++ .../Sdk/TestSkimmerBase.cs | 1 + .../SkimmerIdComparerTests.cs | 2 ++ src/Test.UnitTests.Sarif.Driver/TestRule.cs | 2 ++ .../TestRuleBehaviors.cs | 2 +- .../ConvertCommandTests.cs | 6 +++++- ...tValidationRulesDocumentationCommandTests.cs | 5 ++++- .../GenericCommandTests.cs | 1 + .../MergeCommandTests.cs | 3 +++ .../PageCommandTests.cs | 4 ++++ .../QueryCommandTests.cs | 2 ++ .../RebaseUriCommandTests.cs | 11 ++++++----- .../RewriteCommandTests.cs | 2 ++ .../Rules/SarifValidationSkimmerBaseTests.cs | 3 +++ .../TransformCommandTests.cs | 7 ++++++- .../ValidateCommandTests.cs | 4 ++++ .../FileWorkItemsCommandTests.cs | 2 ++ .../QueryCommandPropertyBagTests.cs | 4 ++++ .../SarifWorkItemExtensionsTests.cs | 11 +++++++---- .../SarifWorkItemFilerTests.cs | 16 +++++++++++----- .../SarifWorkItemFilingContextTests.cs | 3 +++ .../SarifWorkItemModelTests.cs | 2 ++ .../Baseline/DefaultBaselineUnitTests.cs | 2 ++ .../FullFingerprintMatcherTests.cs | 2 ++ .../IdenticalResultMatcherTests.cs | 2 ++ .../ContextRegionResultMatcherTests.cs | 2 ++ .../PartialFingerprintResultMatcherTests.cs | 2 ++ .../ResultMatchingBaselinerTests.cs | 2 ++ .../SarifLogResultMatcherTests.cs | 2 ++ .../Baseline/StrictBaselineUnitTests.cs | 2 ++ .../Baseline2/ExtractedResultTests.cs | 3 +++ .../Baseline2/OverallBaseliningTests.cs | 1 + .../Baseline2/TrustMapTests.cs | 2 ++ .../Baseline2/WhatComparerTests.cs | 3 +++ .../Baseline2/WhereComparerTests.cs | 3 +++ src/Test.UnitTests.Sarif/CacheTests.cs | 1 + src/Test.UnitTests.Sarif/ConsoleLoggerTests.cs | 3 +++ .../Core/ArtifactLocationTests.cs | 3 +++ src/Test.UnitTests.Sarif/Core/ArtifactTests.cs | 7 ++++++- .../Core/FileLocationTests.cs | 2 ++ .../Core/InvocationTests.cs | 2 ++ src/Test.UnitTests.Sarif/Core/LocationTests.cs | 2 ++ .../Core/PropertyBagHolderTests.cs | 4 ++++ src/Test.UnitTests.Sarif/Core/RegionTests.cs | 4 +++- src/Test.UnitTests.Sarif/Core/ResultTests.cs | 2 ++ src/Test.UnitTests.Sarif/Core/RunTests.cs | 4 ++++ src/Test.UnitTests.Sarif/Core/SarifLogTests.cs | 3 +++ src/Test.UnitTests.Sarif/Core/StackTests.cs | 3 +++ src/Test.UnitTests.Sarif/Core/TagsTests.cs | 2 ++ src/Test.UnitTests.Sarif/Core/ToolTests.cs | 2 ++ .../Core/WebMessageUtilitiesTests.cs | 3 +++ .../Core/WebRequestTests.cs | 5 ++++- .../Core/WebResponseTests.cs | 3 +++ src/Test.UnitTests.Sarif/ExtensionsTests.cs | 3 +++ .../FileRegionsCacheTests.cs | 2 ++ src/Test.UnitTests.Sarif/GitHelperTests.cs | 3 +++ src/Test.UnitTests.Sarif/JsonTests.cs | 4 +++- .../Map/JsonMapBuilderTests.cs | 1 + .../Map/LongArrayDeltaConverterTests.cs | 2 ++ src/Test.UnitTests.Sarif/MockFactory.cs | 1 + .../OrderSensitiveValueComparisonListTests.cs | 4 +++- .../GenericTests/GenericProcessorTests.cs | 2 ++ .../Log/LogPipelineSerializationTests.cs | 3 +++ .../Processors/Log/MergeStageTests.cs | 2 ++ .../Processors/Log/RebaseUriStageTests.cs | 2 ++ .../Processors/Log/SarifLogExtensionTests.cs | 3 +++ .../PropertiesDictionaryTests.cs | 2 ++ .../Query/EvaluatorTests.cs | 2 ++ .../Query/StringSliceTests.cs | 2 ++ .../RandomSarifLogGenerator.cs | 1 + .../Readers/DeferredCollectionsTests.cs | 3 +++ .../Readers/EnumConverterTests.cs | 2 +- .../IsSuppressedInSourceConverterTests.cs | 3 +++ .../Readers/LineMappingStreamReaderTests.cs | 3 +++ .../Readers/PropertyBagConverterTests.cs | 3 +++ .../Readers/ResultDiffingVisitorTests.cs | 1 + .../Readers/SampleModel/LogModel.cs | 1 + src/Test.UnitTests.Sarif/RoundTrippingTests.cs | 3 +++ .../SarifExtensionsTests.cs | 3 ++- src/Test.UnitTests.Sarif/SarifUtilitiesTests.cs | 8 ++++---- src/Test.UnitTests.Sarif/ToolFormatTests.cs | 1 + src/Test.UnitTests.Sarif/UriConverterTests.cs | 4 ++++ ...xtractAllArtifactionLocationsVisitorTests.cs | 3 +++ .../Visitors/GitHubIngestionVisitorTests.cs | 1 + .../Visitors/InsertOptionalDataVisitorTests.cs | 5 ++++- .../Visitors/MakeUriAbsoluteVisitorTest.cs | 2 ++ .../PerRunPerRuleSplittingVisitorTests.cs | 3 +++ .../Visitors/RebaseUriVisitorTests.cs | 4 ++++ .../Visitors/RemapIndicesVisitorTests.cs | 12 ++++++------ .../Visitors/RemoveOptionalDataVisitorTests.cs | 6 ++++-- .../SarifCurrentToVersionOneVisitorTests.cs | 4 +++- .../SarifVersionOneToCurrentVisitorTests.cs | 2 ++ .../UpdateIndicesFromLegacyDataVisitorTests.cs | 2 ++ src/Test.UnitTests.Sarif/WarningsTests.cs | 1 + .../Writers/MimeTypeTests.cs | 1 + .../PrereleaseCompatibilityTransformerTests.cs | 2 ++ .../Writers/ResultLogJsonWriterTests.cs | 3 +++ .../Writers/SarifConsolidatorTests.cs | 2 ++ .../Writers/SarifLoggerTests.cs | 4 ++++ .../FilingClientFactoryTests.cs | 2 ++ ...licationInsightsTelemetryInitializerTests.cs | 3 +++ .../Logging/MetricsLogValuesTests.cs | 3 +++ .../ServiceProviderFactoryTests.cs | 2 ++ src/Test.Utilities.Sarif/AssertionExtensions.cs | 2 ++ .../FileDiffingFunctionalTests.cs | 1 + .../FileDiffingUnitTests.cs | 4 ++++ src/Test.Utilities.Sarif/TestData.cs | 3 ++- src/Test.Utilities.Sarif/TestMessageLogger.cs | 2 +- src/Test.Utilities.Sarif/Utilities.cs | 2 ++ src/WorkItems/AzureDevOpsFilingClient.cs | 2 ++ src/WorkItems/FilingClient.cs | 3 ++- src/WorkItems/GitHubClientWrapper.cs | 3 ++- src/WorkItems/GitHubConnectionFacade.cs | 4 +++- src/WorkItems/GitHubFilingClient.cs | 3 ++- src/WorkItems/IGitHubClientWrapper.cs | 5 +++-- src/WorkItems/IGitHubConnection.cs | 5 +++-- src/WorkItems/IVssConnection.cs | 4 ++-- src/WorkItems/IWorkItemModelTransformer.cs | 2 +- src/WorkItems/IWorkItemTrackingHttpClient.cs | 17 +++++++++-------- .../ApplicationInsightsTelemetryInitializer.cs | 1 + src/WorkItems/Logging/AssemblyExtensions.cs | 1 + src/WorkItems/Logging/LoggerExtensions.cs | 13 +++++++------ src/WorkItems/Logging/LoggingContext.cs | 1 + src/WorkItems/Logging/MetricsLogValues.cs | 1 + src/WorkItems/Properties/AssemblyInfo.cs | 2 +- src/WorkItems/ServiceProviderFactory.cs | 1 + src/WorkItems/VssConnectionFacade.cs | 3 ++- .../WorkItemTrackingHttpClientWrapper.cs | 11 ++++++----- 398 files changed, 792 insertions(+), 285 deletions(-) create mode 100644 src/Sarif/Autogenerated/.editorconfig diff --git a/src/.editorconfig b/src/.editorconfig index 7d068c4b5..5fd6d310f 100644 --- a/src/.editorconfig +++ b/src/.editorconfig @@ -13,13 +13,13 @@ tab_width = 4 # New line preferences end_of_line = crlf -insert_final_newline = false +insert_final_newline = true #### .NET Coding Conventions #### # Organize usings -dotnet_separate_import_directive_groups = true:error -dotnet_sort_system_directives_first = true:error +dotnet_separate_import_directive_groups = true +dotnet_sort_system_directives_first = true # this. and Me. preferences dotnet_style_qualification_for_field = true:silent @@ -205,6 +205,3 @@ dotnet_diagnostic.CS1712.severity = silent dotnet_diagnostic.CS1734.severity = silent file_header_template = Copyright (c) Microsoft. All rights reserved.\nLicensed under the MIT license. See LICENSE file in the project root for full license information. - -[Autogenerated/**] -file_header_template = unset diff --git a/src/Samples/Sarif.Sdk.Sample/Program.cs b/src/Samples/Sarif.Sdk.Sample/Program.cs index 6059af015..815297063 100644 --- a/src/Samples/Sarif.Sdk.Sample/Program.cs +++ b/src/Samples/Sarif.Sdk.Sample/Program.cs @@ -5,9 +5,12 @@ using System.Collections.Generic; using System.IO; using System.Text; + using CommandLine; + using Microsoft.CodeAnalysis.Sarif; using Microsoft.CodeAnalysis.Sarif.Writers; + using Newtonsoft.Json; namespace Sarif.Sdk.Sample diff --git a/src/Samples/Sarif.WorkItems.Sample/Program.cs b/src/Samples/Sarif.WorkItems.Sample/Program.cs index 1f156969f..57f98f194 100644 --- a/src/Samples/Sarif.WorkItems.Sample/Program.cs +++ b/src/Samples/Sarif.WorkItems.Sample/Program.cs @@ -5,9 +5,11 @@ using System.Collections.Generic; using System.Diagnostics; using System.IO; + using Microsoft.CodeAnalysis.Sarif; using Microsoft.CodeAnalysis.Sarif.Baseline; using Microsoft.CodeAnalysis.Sarif.WorkItemFiling; + using Newtonsoft.Json; namespace Sarif.WorkItems.Sample diff --git a/src/Samples/SarifDeferredSample/Program.cs b/src/Samples/SarifDeferredSample/Program.cs index 549265427..3b2fd3022 100644 --- a/src/Samples/SarifDeferredSample/Program.cs +++ b/src/Samples/SarifDeferredSample/Program.cs @@ -1,10 +1,12 @@ -using Microsoft.CodeAnalysis.Sarif; -using Microsoft.CodeAnalysis.Sarif.Readers; -using Newtonsoft.Json; -using System; +using System; using System.Diagnostics; using System.IO; +using Microsoft.CodeAnalysis.Sarif; +using Microsoft.CodeAnalysis.Sarif.Readers; + +using Newtonsoft.Json; + namespace SarifDeferredSample { /// @@ -18,7 +20,7 @@ private static void Main(string[] args) { bool deferred = bool.Parse(args[0]); string filePath = args[1]; - + SarifLog log = null; Console.WriteLine($"Loading {filePath}{(deferred ? " (deferred)" : "")}..."); @@ -85,7 +87,7 @@ private static void Main(string[] args) // uriLengthTotal += file?.ArtifactLocation?.Uri?.OriginalString?.Length ?? 0; // fileCount++; //} - } + } return $"Enumerated {fileCount:n0} Files, URI total {uriLengthTotal / BytesPerMB:n0}MB."; }); diff --git a/src/Samples/SarifToCsv/CsvWriter.cs b/src/Samples/SarifToCsv/CsvWriter.cs index 1bb51450a..d705910cc 100644 --- a/src/Samples/SarifToCsv/CsvWriter.cs +++ b/src/Samples/SarifToCsv/CsvWriter.cs @@ -193,4 +193,4 @@ public void Dispose() } } } -} \ No newline at end of file +} diff --git a/src/Samples/SarifToCsv/Program.cs b/src/Samples/SarifToCsv/Program.cs index 57dfe4948..40b26b444 100644 --- a/src/Samples/SarifToCsv/Program.cs +++ b/src/Samples/SarifToCsv/Program.cs @@ -150,4 +150,4 @@ private static string ValueOrDefault(string value, string defaultValue) return String.IsNullOrEmpty(value) ? defaultValue : value; } } -} \ No newline at end of file +} diff --git a/src/Samples/SarifToCsv/SarifCsvColumnWriters.cs b/src/Samples/SarifToCsv/SarifCsvColumnWriters.cs index bbd43c48e..9344a33d2 100644 --- a/src/Samples/SarifToCsv/SarifCsvColumnWriters.cs +++ b/src/Samples/SarifToCsv/SarifCsvColumnWriters.cs @@ -7,6 +7,7 @@ using System.Text; using Microsoft.CodeAnalysis.Sarif; + using Newtonsoft.Json; namespace SarifToCsv @@ -67,7 +68,7 @@ public static Action GetWriter(string columnName) { value = ""; } - + c.Writer.Write(value); }; } diff --git a/src/Samples/SarifToCsv/SdkExtensions.cs b/src/Samples/SarifToCsv/SdkExtensions.cs index ba85d7bea..285c54145 100644 --- a/src/Samples/SarifToCsv/SdkExtensions.cs +++ b/src/Samples/SarifToCsv/SdkExtensions.cs @@ -43,4 +43,4 @@ public static string FileUri(this ArtifactLocation artifactLocation, Run run) } } } -} \ No newline at end of file +} diff --git a/src/Sarif.Converters/AndroidStudioConverter.cs b/src/Sarif.Converters/AndroidStudioConverter.cs index 1661f0574..cbba397a4 100644 --- a/src/Sarif.Converters/AndroidStudioConverter.cs +++ b/src/Sarif.Converters/AndroidStudioConverter.cs @@ -278,4 +278,4 @@ private static bool RemoveBadRoot(string path, out Uri uri) return removedBadRoot; } } -} \ No newline at end of file +} diff --git a/src/Sarif.Converters/ClangAnalyzerConverter.cs b/src/Sarif.Converters/ClangAnalyzerConverter.cs index ddf8581b8..e28ef8e53 100644 --- a/src/Sarif.Converters/ClangAnalyzerConverter.cs +++ b/src/Sarif.Converters/ClangAnalyzerConverter.cs @@ -443,4 +443,4 @@ private static class ClangSchemaStrings public const string VersionName = "version"; } } -} \ No newline at end of file +} diff --git a/src/Sarif.Converters/ContrastSecurityConverter.cs b/src/Sarif.Converters/ContrastSecurityConverter.cs index 05c66b870..d9868d219 100644 --- a/src/Sarif.Converters/ContrastSecurityConverter.cs +++ b/src/Sarif.Converters/ContrastSecurityConverter.cs @@ -11,7 +11,9 @@ using System.Text; using System.Text.RegularExpressions; using System.Xml; + using Microsoft.CodeAnalysis.Sarif.Writers; + using Newtonsoft.Json; using Newtonsoft.Json.Linq; @@ -1684,4 +1686,4 @@ private void ReadProps(SparseReader reader, object parent) _readingProps = false; } } -} \ No newline at end of file +} diff --git a/src/Sarif.Converters/FlawFinderCsvConverter.cs b/src/Sarif.Converters/FlawFinderCsvConverter.cs index 168d652c3..901664f0a 100644 --- a/src/Sarif.Converters/FlawFinderCsvConverter.cs +++ b/src/Sarif.Converters/FlawFinderCsvConverter.cs @@ -6,6 +6,7 @@ using System.Globalization; using System.IO; using System.Linq; + using CsvHelper; namespace Microsoft.CodeAnalysis.Sarif.Converters @@ -26,7 +27,7 @@ public override void Convert(Stream input, IResultLogWriter output, OptionallyEm IList flawFinderCsvResults = csvReader.GetRecords().ToList(); - IList rules = ExtractRules(flawFinderCsvResults); + IList rules = ExtractRules(flawFinderCsvResults); IList results = ExtractResults(flawFinderCsvResults); var run = new Run @@ -134,6 +135,6 @@ private static Region RegionFromFlawFinderCsvResult(FlawFinderCsvResult flawFind }; private static FailureLevel SarifLevelFromFlawFinderLevel(int flawFinderLevel) => - flawFinderLevel< 4 ? FailureLevel.Warning : FailureLevel.Error; + flawFinderLevel < 4 ? FailureLevel.Warning : FailureLevel.Error; } } diff --git a/src/Sarif.Converters/FortifyFprConverter.cs b/src/Sarif.Converters/FortifyFprConverter.cs index 9804d33f6..6c6df9527 100644 --- a/src/Sarif.Converters/FortifyFprConverter.cs +++ b/src/Sarif.Converters/FortifyFprConverter.cs @@ -32,7 +32,7 @@ internal class FortifyFprConverter : ToolFileConverterBase "LastTraceLocation.file", "LastTraceLocation.line", "PrimaryCall.name", - "PrimaryLocation.file", + "PrimaryLocation.file", "PrimaryLocation.line", "PrimaryTransitionFunction.name", "SinkFunction", @@ -600,7 +600,7 @@ private string NormalizeGuid(string guid) private static string RemoveSpaces(string ruleComponent) { - Tuple[] lowercasedTokens = new [] + Tuple[] lowercasedTokens = new[] { new Tuple(" in ", " In "), new Tuple(" true ", " True "), @@ -608,10 +608,10 @@ private static string RemoveSpaces(string ruleComponent) new Tuple(" against ", " Against "), }; - foreach(Tuple lowercasedToken in lowercasedTokens) + foreach (Tuple lowercasedToken in lowercasedTokens) { ruleComponent = ruleComponent.Replace(lowercasedToken.Item1, lowercasedToken.Item2); - } + } return ruleComponent.Replace(" ", ""); } @@ -1009,7 +1009,7 @@ private void ParseRuleDescriptions() private void ParseEngineVersion() { - _engineVersion = _reader.ReadElementContentAsString(); + _engineVersion = _reader.ReadElementContentAsString(); } private void ParseNodes() @@ -1195,7 +1195,7 @@ private void ParseCommandLine() _invocation.CommandLine = sb.ToString(); } - + private void ParseErrors() { // Despite being expressed as XML elements named , these messages @@ -1326,7 +1326,7 @@ private void AddMessagesToResult(Result result) else { // Replace the token with plain text. - messageText = messageText.Replace(string.Format(ReplacementTokenFormat, key), "'"+ value + "'"); + messageText = messageText.Replace(string.Format(ReplacementTokenFormat, key), "'" + value + "'"); } } } @@ -1417,4 +1417,4 @@ public Node(ThreadFlowLocation tfl, string snippetId) } } } -} \ No newline at end of file +} diff --git a/src/Sarif.Converters/FortifyUtilities.cs b/src/Sarif.Converters/FortifyUtilities.cs index 08e155960..eb0fece86 100644 --- a/src/Sarif.Converters/FortifyUtilities.cs +++ b/src/Sarif.Converters/FortifyUtilities.cs @@ -47,10 +47,10 @@ internal static string ParseFormattedContentText(string content) content = Regex.Replace(content, pattern, FormattedTextReplacements[pattern], RegexOptions.Compiled); } - foreach(Match match in s_replaceKeyRegex.Matches(content)) + foreach (Match match in s_replaceKeyRegex.Matches(content)) { string key = match.Groups[1].Value; - content = content.Replace(string.Format(ReplacementTokenFormat, key), "{"+ key + "}"); + content = content.Replace(string.Format(ReplacementTokenFormat, key), "{" + key + "}"); } return content.Trim(new[] { '\r', '\n', ' ' }); diff --git a/src/Sarif.Converters/FxCopConverter.cs b/src/Sarif.Converters/FxCopConverter.cs index 01864effa..877b38f20 100644 --- a/src/Sarif.Converters/FxCopConverter.cs +++ b/src/Sarif.Converters/FxCopConverter.cs @@ -1083,4 +1083,4 @@ internal static string MakeExceptionMessage(string kind, string checkId, string } } } -} \ No newline at end of file +} diff --git a/src/Sarif.Converters/GlobalSuppressions.cs b/src/Sarif.Converters/GlobalSuppressions.cs index 2f12d709c..0143fc3de 100644 --- a/src/Sarif.Converters/GlobalSuppressions.cs +++ b/src/Sarif.Converters/GlobalSuppressions.cs @@ -10,4 +10,4 @@ [module: SuppressMessage("Microsoft.Security.Xml", "CA3053:UseXmlSecureResolver", Scope = "member", Target = "Microsoft.CodeAnalysis.Sarif.Converters.FortifyFprConverter.#ParseAuditStream(System.IO.Stream)")] [module: SuppressMessage("Microsoft.Security.Xml", "CA3053:UseXmlSecureResolver", Scope = "member", Target = "Microsoft.CodeAnalysis.Sarif.Converters.FxCopLogReader.#Read(Microsoft.CodeAnalysis.Sarif.Converters.FxCopLogReader+Context,System.IO.Stream)")] [module: SuppressMessage("Microsoft.Security.Xml", "CA3053:UseXmlSecureResolver", Scope = "member", Target = "Microsoft.CodeAnalysis.Sarif.Converters.PREfastConverter.#Convert(System.IO.Stream,Microsoft.CodeAnalysis.Sarif.IResultLogWriter,Microsoft.CodeAnalysis.Sarif.Writers.LoggingOptions)")] -[module: SuppressMessage("Microsoft.Security.Xml", "CA3053:UseXmlSecureResolver", Scope = "member", Target = "Microsoft.CodeAnalysis.Sarif.Converters.SparseReader.#CreateFromStream(Microsoft.CodeAnalysis.Sarif.Converters.SparseReaderDispatchTable,System.IO.Stream,System.Xml.Schema.XmlSchemaSet)")] \ No newline at end of file +[module: SuppressMessage("Microsoft.Security.Xml", "CA3053:UseXmlSecureResolver", Scope = "member", Target = "Microsoft.CodeAnalysis.Sarif.Converters.SparseReader.#CreateFromStream(Microsoft.CodeAnalysis.Sarif.Converters.SparseReaderDispatchTable,System.IO.Stream,System.Xml.Schema.XmlSchemaSet)")] diff --git a/src/Sarif.Converters/LogReader.cs b/src/Sarif.Converters/LogReader.cs index 377cdc5ff..cff8d054a 100644 --- a/src/Sarif.Converters/LogReader.cs +++ b/src/Sarif.Converters/LogReader.cs @@ -20,4 +20,4 @@ public TLog ReadLog(string input, Encoding encoding) public abstract TLog ReadLog(Stream input); } -} \ No newline at end of file +} diff --git a/src/Sarif.Converters/MSBuildConverter.cs b/src/Sarif.Converters/MSBuildConverter.cs index e27b546e7..63f4b5396 100644 --- a/src/Sarif.Converters/MSBuildConverter.cs +++ b/src/Sarif.Converters/MSBuildConverter.cs @@ -287,4 +287,4 @@ private static Region GetRegionFrom(string regionString) return region; } } -} \ No newline at end of file +} diff --git a/src/Sarif.Converters/Properties/AssemblyInfo.cs b/src/Sarif.Converters/Properties/AssemblyInfo.cs index f14fe0b91..3fd1bec8e 100644 --- a/src/Sarif.Converters/Properties/AssemblyInfo.cs +++ b/src/Sarif.Converters/Properties/AssemblyInfo.cs @@ -1,2 +1,2 @@ // Copyright (c) Microsoft. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. \ No newline at end of file +// Licensed under the MIT license. See LICENSE file in the project root for full license information. diff --git a/src/Sarif.Converters/PylintConverter.cs b/src/Sarif.Converters/PylintConverter.cs index 9d65b4aa0..fcca17e42 100644 --- a/src/Sarif.Converters/PylintConverter.cs +++ b/src/Sarif.Converters/PylintConverter.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.IO; + using Microsoft.CodeAnalysis.Sarif.Converters.PylintObjectModel; namespace Microsoft.CodeAnalysis.Sarif.Converters diff --git a/src/Sarif.Converters/PylintObjectModel/PylintLog.cs b/src/Sarif.Converters/PylintObjectModel/PylintLog.cs index 48a50b5e8..9761a5b9d 100644 --- a/src/Sarif.Converters/PylintObjectModel/PylintLog.cs +++ b/src/Sarif.Converters/PylintObjectModel/PylintLog.cs @@ -8,4 +8,4 @@ namespace Microsoft.CodeAnalysis.Sarif.Converters.PylintObjectModel public class PylintLog : List { } -} \ No newline at end of file +} diff --git a/src/Sarif.Converters/PylintObjectModel/PylintLogReader.cs b/src/Sarif.Converters/PylintObjectModel/PylintLogReader.cs index c6f36b08a..f1c6cd677 100644 --- a/src/Sarif.Converters/PylintObjectModel/PylintLogReader.cs +++ b/src/Sarif.Converters/PylintObjectModel/PylintLogReader.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.IO; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.Converters.PylintObjectModel @@ -20,4 +21,4 @@ public override PylintLog ReadLog(Stream input) return JsonConvert.DeserializeObject(pylintText); } } -} \ No newline at end of file +} diff --git a/src/Sarif.Converters/SparseReader.cs b/src/Sarif.Converters/SparseReader.cs index c3a964eb6..a9515d5d7 100644 --- a/src/Sarif.Converters/SparseReader.cs +++ b/src/Sarif.Converters/SparseReader.cs @@ -342,4 +342,4 @@ private void ReadEndElement(string expectedTagName) _xmlReader.MoveToContent(); } } -} \ No newline at end of file +} diff --git a/src/Sarif.Converters/TSLintConverter.cs b/src/Sarif.Converters/TSLintConverter.cs index de2ba26f0..9d7edfebb 100644 --- a/src/Sarif.Converters/TSLintConverter.cs +++ b/src/Sarif.Converters/TSLintConverter.cs @@ -5,6 +5,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; + using Microsoft.CodeAnalysis.Sarif.Converters.TSLintObjectModel; namespace Microsoft.CodeAnalysis.Sarif.Converters diff --git a/src/Sarif.Converters/TSLintLogReader.cs b/src/Sarif.Converters/TSLintLogReader.cs index f2ae7b471..8a5d4cd51 100644 --- a/src/Sarif.Converters/TSLintLogReader.cs +++ b/src/Sarif.Converters/TSLintLogReader.cs @@ -8,7 +8,9 @@ using System.Runtime.Serialization; using System.Runtime.Serialization.Json; using System.Text; + using Microsoft.CodeAnalysis.Sarif.Converters.TSLintObjectModel; + using Newtonsoft.Json; using Newtonsoft.Json.Linq; diff --git a/src/Sarif.Converters/TextFormats/CsvReader.cs b/src/Sarif.Converters/TextFormats/CsvReader.cs index 72e1087fc..f615e954c 100644 --- a/src/Sarif.Converters/TextFormats/CsvReader.cs +++ b/src/Sarif.Converters/TextFormats/CsvReader.cs @@ -145,4 +145,4 @@ private int NextCellEnd(bool quoted, out bool escapedQuotes) return i; } } -} \ No newline at end of file +} diff --git a/src/Sarif.Converters/ToolFileConverterBase.cs b/src/Sarif.Converters/ToolFileConverterBase.cs index 4a5e98930..e83cabfb4 100644 --- a/src/Sarif.Converters/ToolFileConverterBase.cs +++ b/src/Sarif.Converters/ToolFileConverterBase.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.IO; + using Microsoft.CodeAnalysis.Sarif.Visitors; namespace Microsoft.CodeAnalysis.Sarif.Converters diff --git a/src/Sarif.Converters/ToolFormatConverter.cs b/src/Sarif.Converters/ToolFormatConverter.cs index 2fe7f42f0..2f4897f7d 100644 --- a/src/Sarif.Converters/ToolFormatConverter.cs +++ b/src/Sarif.Converters/ToolFormatConverter.cs @@ -3,7 +3,9 @@ using System; using System.IO; + using Microsoft.CodeAnalysis.Sarif.Writers; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.Converters diff --git a/src/Sarif.Driver/DriverExtensionMethods.cs b/src/Sarif.Driver/DriverExtensionMethods.cs index 437412ffb..f4044b787 100644 --- a/src/Sarif.Driver/DriverExtensionMethods.cs +++ b/src/Sarif.Driver/DriverExtensionMethods.cs @@ -3,6 +3,7 @@ using System; using System.Globalization; + using Microsoft.CodeAnalysis.Sarif.Writers; namespace Microsoft.CodeAnalysis.Sarif.Driver diff --git a/src/Sarif.Driver/DriverUtilities.cs b/src/Sarif.Driver/DriverUtilities.cs index 5062ff78a..454e58422 100644 --- a/src/Sarif.Driver/DriverUtilities.cs +++ b/src/Sarif.Driver/DriverUtilities.cs @@ -6,6 +6,7 @@ using System.Globalization; using System.Reflection; using System.Text; + using CommandLine; namespace Microsoft.CodeAnalysis.Sarif.Driver @@ -133,4 +134,4 @@ public static string GetOptionDescription(Type optionsType, string optionPropert return builder.ToString(); } } -} \ No newline at end of file +} diff --git a/src/Sarif.Driver/PathExtensions.cs b/src/Sarif.Driver/PathExtensions.cs index 030619419..000c9e0e1 100644 --- a/src/Sarif.Driver/PathExtensions.cs +++ b/src/Sarif.Driver/PathExtensions.cs @@ -166,4 +166,4 @@ private static void AddSlashes(char[] resultTemp, ref int resultIdx, int slashes } } } -} \ No newline at end of file +} diff --git a/src/Sarif.Driver/Properties/AssemblyInfo.cs b/src/Sarif.Driver/Properties/AssemblyInfo.cs index f14fe0b91..3fd1bec8e 100644 --- a/src/Sarif.Driver/Properties/AssemblyInfo.cs +++ b/src/Sarif.Driver/Properties/AssemblyInfo.cs @@ -1,2 +1,2 @@ // Copyright (c) Microsoft. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. \ No newline at end of file +// Licensed under the MIT license. See LICENSE file in the project root for full license information. diff --git a/src/Sarif.Driver/Sdk/AnalysisApplicability.cs b/src/Sarif.Driver/Sdk/AnalysisApplicability.cs index ed9d08419..f939bef02 100644 --- a/src/Sarif.Driver/Sdk/AnalysisApplicability.cs +++ b/src/Sarif.Driver/Sdk/AnalysisApplicability.cs @@ -9,4 +9,4 @@ public enum AnalysisApplicability NotApplicableToSpecifiedTarget, ApplicableToSpecifiedTarget } -} \ No newline at end of file +} diff --git a/src/Sarif.Driver/Sdk/AnalysisContext.cs b/src/Sarif.Driver/Sdk/AnalysisContext.cs index f6d20eb1f..302992530 100644 --- a/src/Sarif.Driver/Sdk/AnalysisContext.cs +++ b/src/Sarif.Driver/Sdk/AnalysisContext.cs @@ -28,4 +28,4 @@ public class AnalysisContext : IAnalysisContext public void Dispose() { } } -} \ No newline at end of file +} diff --git a/src/Sarif.Driver/Sdk/AnalyzeCommandBase.cs b/src/Sarif.Driver/Sdk/AnalyzeCommandBase.cs index 96b454762..89411170d 100644 --- a/src/Sarif.Driver/Sdk/AnalyzeCommandBase.cs +++ b/src/Sarif.Driver/Sdk/AnalyzeCommandBase.cs @@ -8,6 +8,7 @@ using System.Reflection; using System.Runtime.InteropServices; using System.Security; + using Microsoft.CodeAnalysis.Sarif.Writers; namespace Microsoft.CodeAnalysis.Sarif.Driver @@ -846,4 +847,4 @@ protected static void LogToolNotification( }); } } -} \ No newline at end of file +} diff --git a/src/Sarif.Driver/Sdk/AnalyzeOptionsBase.cs b/src/Sarif.Driver/Sdk/AnalyzeOptionsBase.cs index 2f9e1855f..7df714a51 100644 --- a/src/Sarif.Driver/Sdk/AnalyzeOptionsBase.cs +++ b/src/Sarif.Driver/Sdk/AnalyzeOptionsBase.cs @@ -85,4 +85,4 @@ public abstract class AnalyzeOptionsBase : CommonOptionsBase HelpText = "Omit redundant properties, producing a smaller but non-human-readable log.")] public bool Optimize { get; set; } } -} \ No newline at end of file +} diff --git a/src/Sarif.Driver/Sdk/CommonOptionsBase.cs b/src/Sarif.Driver/Sdk/CommonOptionsBase.cs index 1cb4e525b..ab48869e4 100644 --- a/src/Sarif.Driver/Sdk/CommonOptionsBase.cs +++ b/src/Sarif.Driver/Sdk/CommonOptionsBase.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; + using CommandLine; namespace Microsoft.CodeAnalysis.Sarif.Driver @@ -68,4 +69,4 @@ public class CommonOptionsBase Default = SarifVersion.Current)] public SarifVersion SarifOutputVersion { get; set; } } -} \ No newline at end of file +} diff --git a/src/Sarif.Driver/Sdk/ExportRulesDocumentationCommandBase.cs b/src/Sarif.Driver/Sdk/ExportRulesDocumentationCommandBase.cs index f42db1e64..d6aaad2de 100644 --- a/src/Sarif.Driver/Sdk/ExportRulesDocumentationCommandBase.cs +++ b/src/Sarif.Driver/Sdk/ExportRulesDocumentationCommandBase.cs @@ -49,10 +49,10 @@ internal void BuildRule(Skimmer rule, StringBuilder sb) { sb.AppendLine($"## Rule `{rule.Moniker}`{Environment.NewLine}"); sb.AppendLine($"### Description{Environment.NewLine}"); - sb.AppendLine(@$"{rule.FullDescription?.Markdown - ?? rule.FullDescription?.Text + sb.AppendLine(@$"{rule.FullDescription?.Markdown + ?? rule.FullDescription?.Text ?? rule.ShortDescription?.Markdown - ?? rule.ShortDescription?.Text + ?? rule.ShortDescription?.Text ?? DriverResources.NoRuleDescription}{Environment.NewLine}"); sb.AppendLine($"### Messages{Environment.NewLine}"); diff --git a/src/Sarif.Driver/Sdk/MultifileOptionsBase.cs b/src/Sarif.Driver/Sdk/MultifileOptionsBase.cs index df597ce5d..ba97e6622 100644 --- a/src/Sarif.Driver/Sdk/MultifileOptionsBase.cs +++ b/src/Sarif.Driver/Sdk/MultifileOptionsBase.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; + using CommandLine; namespace Microsoft.CodeAnalysis.Sarif.Driver diff --git a/src/Sarif.Driver/SemanticVersion.cs b/src/Sarif.Driver/SemanticVersion.cs index 2aacfec41..89c44547d 100644 --- a/src/Sarif.Driver/SemanticVersion.cs +++ b/src/Sarif.Driver/SemanticVersion.cs @@ -371,4 +371,4 @@ public static bool TryParse(string version, out SemanticVersion result) return result != null; } } -} \ No newline at end of file +} diff --git a/src/Sarif.Multitool.Library/AbsoluteUriCommand.cs b/src/Sarif.Multitool.Library/AbsoluteUriCommand.cs index d107036a7..f84a17683 100644 --- a/src/Sarif.Multitool.Library/AbsoluteUriCommand.cs +++ b/src/Sarif.Multitool.Library/AbsoluteUriCommand.cs @@ -5,8 +5,10 @@ using System.Collections.Generic; using System.IO; using System.Linq; + using Microsoft.CodeAnalysis.Sarif.Driver; using Microsoft.CodeAnalysis.Sarif.Processors; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Sarif.Multitool.Library/AbsoluteUriOptions.cs b/src/Sarif.Multitool.Library/AbsoluteUriOptions.cs index ad0a63379..b0736007f 100644 --- a/src/Sarif.Multitool.Library/AbsoluteUriOptions.cs +++ b/src/Sarif.Multitool.Library/AbsoluteUriOptions.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using CommandLine; + using Microsoft.CodeAnalysis.Sarif.Driver; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Sarif.Multitool.Library/CommandBase.cs b/src/Sarif.Multitool.Library/CommandBase.cs index 0673311a0..3aad1ef67 100644 --- a/src/Sarif.Multitool.Library/CommandBase.cs +++ b/src/Sarif.Multitool.Library/CommandBase.cs @@ -5,7 +5,9 @@ using System.Collections.Generic; using System.Globalization; using System.IO; + using Microsoft.CodeAnalysis.Sarif.Driver; + using Newtonsoft.Json; using Newtonsoft.Json.Serialization; diff --git a/src/Sarif.Multitool.Library/CommandUtilities.cs b/src/Sarif.Multitool.Library/CommandUtilities.cs index c5268a121..fc819f1cf 100644 --- a/src/Sarif.Multitool.Library/CommandUtilities.cs +++ b/src/Sarif.Multitool.Library/CommandUtilities.cs @@ -3,6 +3,7 @@ using System; using System.IO; + using Microsoft.CodeAnalysis.Sarif.Driver; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Sarif.Multitool.Library/ConvertCommand.cs b/src/Sarif.Multitool.Library/ConvertCommand.cs index 0f5c21117..5e1cfcbab 100644 --- a/src/Sarif.Multitool.Library/ConvertCommand.cs +++ b/src/Sarif.Multitool.Library/ConvertCommand.cs @@ -72,7 +72,7 @@ public int Run(ConvertOptions convertOptions, IFileSystem fileSystem = null) }; using (JsonTextReader reader = new JsonTextReader(new StreamReader(convertOptions.OutputFilePath))) - { + { sarifLog = serializer.Deserialize(reader); } diff --git a/src/Sarif.Multitool.Library/ConvertOptions.cs b/src/Sarif.Multitool.Library/ConvertOptions.cs index d41acc104..304b6db1a 100644 --- a/src/Sarif.Multitool.Library/ConvertOptions.cs +++ b/src/Sarif.Multitool.Library/ConvertOptions.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using CommandLine; + using Microsoft.CodeAnalysis.Sarif.Driver; namespace Microsoft.CodeAnalysis.Sarif.Multitool @@ -28,4 +29,4 @@ public class ConvertOptions : SingleFileOptionsBase public bool NormalizeForGitHub { get; internal set; } } -} \ No newline at end of file +} diff --git a/src/Sarif.Multitool.Library/ExportValidationConfigurationCommand.cs b/src/Sarif.Multitool.Library/ExportValidationConfigurationCommand.cs index 174d1dfd7..87ec6a61a 100644 --- a/src/Sarif.Multitool.Library/ExportValidationConfigurationCommand.cs +++ b/src/Sarif.Multitool.Library/ExportValidationConfigurationCommand.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using CommandLine; + using Microsoft.CodeAnalysis.Sarif.Driver; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Sarif.Multitool.Library/ExportValidationConfigurationOptions.cs b/src/Sarif.Multitool.Library/ExportValidationConfigurationOptions.cs index 4b087a442..0cb78299b 100644 --- a/src/Sarif.Multitool.Library/ExportValidationConfigurationOptions.cs +++ b/src/Sarif.Multitool.Library/ExportValidationConfigurationOptions.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using CommandLine; + using Microsoft.CodeAnalysis.Sarif.Driver; namespace Microsoft.CodeAnalysis.Sarif.Multitool @@ -10,4 +11,4 @@ namespace Microsoft.CodeAnalysis.Sarif.Multitool public class ExportValidationConfigurationOptions : ExportConfigurationOptions { } -} \ No newline at end of file +} diff --git a/src/Sarif.Multitool.Library/ExportValidationDocumentationOptions.cs b/src/Sarif.Multitool.Library/ExportValidationDocumentationOptions.cs index b8e2013e9..d51d74037 100644 --- a/src/Sarif.Multitool.Library/ExportValidationDocumentationOptions.cs +++ b/src/Sarif.Multitool.Library/ExportValidationDocumentationOptions.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using CommandLine; + using Microsoft.CodeAnalysis.Sarif.Driver; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Sarif.Multitool.Library/ExportValidationRulesMetadataOptions.cs b/src/Sarif.Multitool.Library/ExportValidationRulesMetadataOptions.cs index e5c4fb5f0..3f7851923 100644 --- a/src/Sarif.Multitool.Library/ExportValidationRulesMetadataOptions.cs +++ b/src/Sarif.Multitool.Library/ExportValidationRulesMetadataOptions.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using CommandLine; + using Microsoft.CodeAnalysis.Sarif.Driver; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Sarif.Multitool.Library/FileWorkItemsCommand.cs b/src/Sarif.Multitool.Library/FileWorkItemsCommand.cs index cffe243ca..75edd3205 100644 --- a/src/Sarif.Multitool.Library/FileWorkItemsCommand.cs +++ b/src/Sarif.Multitool.Library/FileWorkItemsCommand.cs @@ -7,10 +7,12 @@ using System.IO; using System.Reflection; using System.Text; + using Microsoft.CodeAnalysis.Sarif.Driver; using Microsoft.CodeAnalysis.Sarif.WorkItems; using Microsoft.Json.Schema; using Microsoft.Json.Schema.Validation; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.Multitool @@ -257,4 +259,4 @@ private string FormatSchemaErrors(string path, IEnumerable errors) return sb.ToString(); } } -} \ No newline at end of file +} diff --git a/src/Sarif.Multitool.Library/FileWorkItemsOptions.cs b/src/Sarif.Multitool.Library/FileWorkItemsOptions.cs index e7c32e3e3..be042129c 100644 --- a/src/Sarif.Multitool.Library/FileWorkItemsOptions.cs +++ b/src/Sarif.Multitool.Library/FileWorkItemsOptions.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using CommandLine; + using Microsoft.CodeAnalysis.Sarif.Driver; namespace Microsoft.CodeAnalysis.Sarif.Multitool @@ -30,7 +31,7 @@ public class FileWorkItemsOptions : SingleFileOptionsBase [Option( "file-unchanged", - HelpText = "File work items for both new and unchanged baseline state results. " + + HelpText = "File work items for both new and unchanged baseline state results. " + "If an unchanged result already has an associated work item, a new work item will not be created.", Default = null)] public bool? ShouldFileUnchanged { get; internal set; } diff --git a/src/Sarif.Multitool.Library/JTokenExtensions.cs b/src/Sarif.Multitool.Library/JTokenExtensions.cs index 6eb578513..af8e7152d 100644 --- a/src/Sarif.Multitool.Library/JTokenExtensions.cs +++ b/src/Sarif.Multitool.Library/JTokenExtensions.cs @@ -3,6 +3,7 @@ using System; using System.Linq; + using Newtonsoft.Json.Linq; namespace Microsoft.CodeAnalysis.Sarif.Multitool @@ -15,4 +16,4 @@ public static bool HasProperty(this JToken token, string propertyName) .Any(jp => jp.Name.Equals(propertyName, StringComparison.Ordinal)); } } -} \ No newline at end of file +} diff --git a/src/Sarif.Multitool.Library/MergeCommand.cs b/src/Sarif.Multitool.Library/MergeCommand.cs index 02b261d12..bc4047405 100644 --- a/src/Sarif.Multitool.Library/MergeCommand.cs +++ b/src/Sarif.Multitool.Library/MergeCommand.cs @@ -106,7 +106,7 @@ public int Run(MergeOptions mergeOptions) } } } - + foreach (string ruleId in ruleToRunsMap.Keys) { HashSet runs = ruleToRunsMap[ruleId]; diff --git a/src/Sarif.Multitool.Library/MergeOptions.cs b/src/Sarif.Multitool.Library/MergeOptions.cs index cedef28df..f4551c761 100644 --- a/src/Sarif.Multitool.Library/MergeOptions.cs +++ b/src/Sarif.Multitool.Library/MergeOptions.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using CommandLine; + using Microsoft.CodeAnalysis.Sarif.Driver; namespace Microsoft.CodeAnalysis.Sarif.Multitool @@ -23,15 +24,15 @@ public class MergeOptions : MultipleFilesOptionsBase [Option( "split", HelpText = "Apply a splitting strategy to the merged file. " + - "Must be one of None or PerRule. By default ('None'), " + - "no splitting strategy is applied (i.e. all input " + + "Must be one of None or PerRule. By default ('None'), " + + "no splitting strategy is applied (i.e. all input " + "files will be merged into a single log).", Default = SplittingStrategy.None)] public SplittingStrategy SplittingStrategy { get; internal set; } [Option( "merge-runs", - HelpText = "Merge runs of the same tool + verion combination (requires " + + HelpText = "Merge runs of the same tool + verion combination (requires " + "eliding run-specific details such as invocations data.")] public bool MergeRuns { get; internal set; } } diff --git a/src/Sarif.Multitool.Library/PageCommand.cs b/src/Sarif.Multitool.Library/PageCommand.cs index cbd518a9b..3dd20d293 100644 --- a/src/Sarif.Multitool.Library/PageCommand.cs +++ b/src/Sarif.Multitool.Library/PageCommand.cs @@ -7,8 +7,10 @@ using System.Globalization; using System.IO; using System.Linq; + using Microsoft.CodeAnalysis.Sarif.Driver; using Microsoft.CodeAnalysis.Sarif.Map; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Sarif.Multitool.Library/QueryCommand.cs b/src/Sarif.Multitool.Library/QueryCommand.cs index 88a8cb241..457d5548c 100644 --- a/src/Sarif.Multitool.Library/QueryCommand.cs +++ b/src/Sarif.Multitool.Library/QueryCommand.cs @@ -5,6 +5,7 @@ using System.Collections; using System.Diagnostics; using System.Linq; + using Microsoft.CodeAnalysis.Sarif.Driver; using Microsoft.CodeAnalysis.Sarif.Query; using Microsoft.CodeAnalysis.Sarif.Query.Evaluators; diff --git a/src/Sarif.Multitool.Library/RebaseUriCommand.cs b/src/Sarif.Multitool.Library/RebaseUriCommand.cs index ec176d7d8..c0d6dcef0 100644 --- a/src/Sarif.Multitool.Library/RebaseUriCommand.cs +++ b/src/Sarif.Multitool.Library/RebaseUriCommand.cs @@ -5,6 +5,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; + using Microsoft.CodeAnalysis.Sarif.Driver; using Microsoft.CodeAnalysis.Sarif.Processors; using Microsoft.CodeAnalysis.Sarif.Visitors; diff --git a/src/Sarif.Multitool.Library/RebaseUriOptions.cs b/src/Sarif.Multitool.Library/RebaseUriOptions.cs index 4e82da62a..e03b6209d 100644 --- a/src/Sarif.Multitool.Library/RebaseUriOptions.cs +++ b/src/Sarif.Multitool.Library/RebaseUriOptions.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using CommandLine; + using Microsoft.CodeAnalysis.Sarif.Driver; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Sarif.Multitool.Library/ResultMatchSetCommand.cs b/src/Sarif.Multitool.Library/ResultMatchSetCommand.cs index d4b807a86..40e51c735 100644 --- a/src/Sarif.Multitool.Library/ResultMatchSetCommand.cs +++ b/src/Sarif.Multitool.Library/ResultMatchSetCommand.cs @@ -7,8 +7,10 @@ using System.Globalization; using System.IO; using System.Linq; + using Microsoft.CodeAnalysis.Sarif.Baseline.ResultMatching; using Microsoft.CodeAnalysis.Sarif.Driver; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Sarif.Multitool.Library/ResultMatchSetOptions.cs b/src/Sarif.Multitool.Library/ResultMatchSetOptions.cs index 5b6f24738..e224ba8c0 100644 --- a/src/Sarif.Multitool.Library/ResultMatchSetOptions.cs +++ b/src/Sarif.Multitool.Library/ResultMatchSetOptions.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using CommandLine; + using Microsoft.CodeAnalysis.Sarif.Driver; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Sarif.Multitool.Library/ResultMatchingCommand.cs b/src/Sarif.Multitool.Library/ResultMatchingCommand.cs index 91ff85320..8a8490dca 100644 --- a/src/Sarif.Multitool.Library/ResultMatchingCommand.cs +++ b/src/Sarif.Multitool.Library/ResultMatchingCommand.cs @@ -5,6 +5,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; + using Microsoft.CodeAnalysis.Sarif.Baseline.ResultMatching; using Microsoft.CodeAnalysis.Sarif.Driver; diff --git a/src/Sarif.Multitool.Library/ResultMatchingOptions.cs b/src/Sarif.Multitool.Library/ResultMatchingOptions.cs index 885f5bebe..5ea30c19b 100644 --- a/src/Sarif.Multitool.Library/ResultMatchingOptions.cs +++ b/src/Sarif.Multitool.Library/ResultMatchingOptions.cs @@ -2,7 +2,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; + using CommandLine; + using Microsoft.CodeAnalysis.Sarif.Driver; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Sarif.Multitool.Library/RewriteCommand.cs b/src/Sarif.Multitool.Library/RewriteCommand.cs index 66c573df9..11f3b3a9d 100644 --- a/src/Sarif.Multitool.Library/RewriteCommand.cs +++ b/src/Sarif.Multitool.Library/RewriteCommand.cs @@ -4,9 +4,11 @@ using System; using System.Collections.Generic; using System.Diagnostics; + using Microsoft.CodeAnalysis.Sarif.Driver; using Microsoft.CodeAnalysis.Sarif.Driver.Sdk; using Microsoft.CodeAnalysis.Sarif.Visitors; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Sarif.Multitool.Library/RewriteOptions.cs b/src/Sarif.Multitool.Library/RewriteOptions.cs index cc0af9741..f701295e5 100644 --- a/src/Sarif.Multitool.Library/RewriteOptions.cs +++ b/src/Sarif.Multitool.Library/RewriteOptions.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using CommandLine; + using Microsoft.CodeAnalysis.Sarif.Driver; namespace Microsoft.CodeAnalysis.Sarif.Multitool @@ -11,4 +12,4 @@ public class RewriteOptions : SingleFileOptionsBase { } -} \ No newline at end of file +} diff --git a/src/Sarif.Multitool.Library/Rules/RuleId.cs b/src/Sarif.Multitool.Library/Rules/RuleId.cs index 4a4001ccc..3ce3efc7a 100644 --- a/src/Sarif.Multitool.Library/Rules/RuleId.cs +++ b/src/Sarif.Multitool.Library/Rules/RuleId.cs @@ -25,7 +25,7 @@ public static class RuleId public const string OptimizeFileSize = "SARIF2004"; public const string ProvideToolProperties = "SARIF2005"; - public const string UrisShouldBeReachable = "SARIF2006"; + public const string UrisShouldBeReachable = "SARIF2006"; public const string ExpressPathsRelativeToRepoRoot = "SARIF2007"; public const string ProvideSchema = "SARIF2008"; public const string ConsiderConventionalIdentifierValues = "SARIF2009"; diff --git a/src/Sarif.Multitool.Library/Rules/SARIF1005.UriMustBeAbsolute.cs b/src/Sarif.Multitool.Library/Rules/SARIF1005.UriMustBeAbsolute.cs index 7c31c90db..173b839a3 100644 --- a/src/Sarif.Multitool.Library/Rules/SARIF1005.UriMustBeAbsolute.cs +++ b/src/Sarif.Multitool.Library/Rules/SARIF1005.UriMustBeAbsolute.cs @@ -83,8 +83,8 @@ private void AnalyzeUri(string uriString, string pointer) { // {0}: The value of this property is required to be an absolute URI, but '{1}' is a relative URI reference. LogResult( - pointer, - nameof(RuleResources.SARIF1005_UriMustBeAbsolute_Error_Default_Text), + pointer, + nameof(RuleResources.SARIF1005_UriMustBeAbsolute_Error_Default_Text), uriString); } } diff --git a/src/Sarif.Multitool.Library/Rules/SARIF1010.RuleIdMustBeConsistent.cs b/src/Sarif.Multitool.Library/Rules/SARIF1010.RuleIdMustBeConsistent.cs index 2bc02af28..fe761e723 100644 --- a/src/Sarif.Multitool.Library/Rules/SARIF1010.RuleIdMustBeConsistent.cs +++ b/src/Sarif.Multitool.Library/Rules/SARIF1010.RuleIdMustBeConsistent.cs @@ -25,7 +25,7 @@ public class RuleIdMustBeConsistent : SarifValidationSkimmerBase nameof(RuleResources.SARIF1010_RuleIdMustBeConsistent_Error_ResultMustSpecifyRuleId_Text) }; public override FailureLevel DefaultLevel => FailureLevel.Error; - + protected override void Analyze(Result result, string resultPointer) { AnalyzeRuleId(result, resultPointer); @@ -40,7 +40,7 @@ private void AnalyzeRuleId(Result result, string pointer) // ([§3.27.5](https://docs.oasis-open.org/sarif/sarif/v2.1.0/os/sarif-v2.1.0-os.html#_Toc34317643)) // requires at least one of these properties to be present. LogResult( - pointer, + pointer, nameof(RuleResources.SARIF1010_RuleIdMustBeConsistent_Error_ResultMustSpecifyRuleId_Text)); } // if both are present, they must be equal. @@ -53,9 +53,9 @@ private void AnalyzeRuleId(Result result, string pointer) // (https://docs.oasis-open.org/sarif/sarif/v2.1.0/os/sarif-v2.1.0-os.html#_Toc34317643)) // requires that if both of these properties are present, they must be equal. LogResult( - pointer, - nameof(RuleResources.SARIF1010_RuleIdMustBeConsistent_Error_ResultRuleIdMustBeConsistent_Text), - result.RuleId, + pointer, + nameof(RuleResources.SARIF1010_RuleIdMustBeConsistent_Error_ResultRuleIdMustBeConsistent_Text), + result.RuleId, result.Rule?.Id); } } diff --git a/src/Sarif.Multitool.Library/Rules/SARIF1011.ReferenceFinalSchema.cs b/src/Sarif.Multitool.Library/Rules/SARIF1011.ReferenceFinalSchema.cs index c01a44bb4..efb689c6c 100644 --- a/src/Sarif.Multitool.Library/Rules/SARIF1011.ReferenceFinalSchema.cs +++ b/src/Sarif.Multitool.Library/Rules/SARIF1011.ReferenceFinalSchema.cs @@ -56,7 +56,7 @@ private void AnalyzeSchema(Uri schemaUri, string schema) // final version of the schema, upgrade the tool to populate the '$schema' property with a URL // that refers to the final version of the schema. LogResult( - schema, + schema, nameof(RuleResources.SARIF1011_ReferenceFinalSchema_Error_Default_Text), schemaUri.OriginalString); } diff --git a/src/Sarif.Multitool.Library/Rules/SARIF2004.OptimizeFileSize.cs b/src/Sarif.Multitool.Library/Rules/SARIF2004.OptimizeFileSize.cs index b1a5c5dfb..f2e13da9b 100644 --- a/src/Sarif.Multitool.Library/Rules/SARIF2004.OptimizeFileSize.cs +++ b/src/Sarif.Multitool.Library/Rules/SARIF2004.OptimizeFileSize.cs @@ -111,7 +111,7 @@ private void ReportRuleDuplication(Result result, string resultPointer) resultPointer, nameof(RuleResources.SARIF2004_OptimizeFileSize_Warning_AvoidDuplicativeResultRuleInformation_Text)); } - } + } } else { diff --git a/src/Sarif.Multitool.Library/Rules/SARIF2006.UrisShouldBeReachable.cs b/src/Sarif.Multitool.Library/Rules/SARIF2006.UrisShouldBeReachable.cs index d8a074649..0e19763bb 100644 --- a/src/Sarif.Multitool.Library/Rules/SARIF2006.UrisShouldBeReachable.cs +++ b/src/Sarif.Multitool.Library/Rules/SARIF2006.UrisShouldBeReachable.cs @@ -88,8 +88,8 @@ private void AnalyzeUri(string uriString, string pointer) { // {0}: The URI '{1}' was not reachable via an HTTP GET request. LogResult( - pointer, - nameof(RuleResources.SARIF2006_UrisShouldBeReachable_Note_Default_Text), + pointer, + nameof(RuleResources.SARIF2006_UrisShouldBeReachable_Note_Default_Text), uriString); } } diff --git a/src/Sarif.Multitool.Library/Rules/SARIF2008.ProvideSchema.cs b/src/Sarif.Multitool.Library/Rules/SARIF2008.ProvideSchema.cs index d5bebe5f9..ad6703016 100644 --- a/src/Sarif.Multitool.Library/Rules/SARIF2008.ProvideSchema.cs +++ b/src/Sarif.Multitool.Library/Rules/SARIF2008.ProvideSchema.cs @@ -33,7 +33,7 @@ protected override void Analyze(SarifLog log, string logPointer) // property that refers to the final, OASIS standard version of the SARIF 2.1.0 // schema. This enables IDEs to provide Intellisense for SARIF log files. LogResult( - logPointer, + logPointer, nameof(RuleResources.SARIF2008_ProvideSchema_Warning_Default_Text)); } } diff --git a/src/Sarif.Multitool.Library/Rules/SARIF2010.ProvideCodeSnippets.cs b/src/Sarif.Multitool.Library/Rules/SARIF2010.ProvideCodeSnippets.cs index 1352564ac..2e64648d4 100644 --- a/src/Sarif.Multitool.Library/Rules/SARIF2010.ProvideCodeSnippets.cs +++ b/src/Sarif.Multitool.Library/Rules/SARIF2010.ProvideCodeSnippets.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.Linq; + using Microsoft.CodeAnalysis.Sarif.Writers; using Microsoft.Json.Pointer; diff --git a/src/Sarif.Multitool.Library/Rules/SarifValidationSkimmerBase.cs b/src/Sarif.Multitool.Library/Rules/SarifValidationSkimmerBase.cs index fd920c010..ef421ebbe 100644 --- a/src/Sarif.Multitool.Library/Rules/SarifValidationSkimmerBase.cs +++ b/src/Sarif.Multitool.Library/Rules/SarifValidationSkimmerBase.cs @@ -6,8 +6,10 @@ using System.Resources; using System.Text; using System.Text.RegularExpressions; + using Microsoft.CodeAnalysis.Sarif.Driver; using Microsoft.Json.Pointer; + using Newtonsoft.Json; using Newtonsoft.Json.Linq; diff --git a/src/Sarif.Multitool.Library/SarifValidationContext.cs b/src/Sarif.Multitool.Library/SarifValidationContext.cs index d2b9c4da3..0234315f6 100644 --- a/src/Sarif.Multitool.Library/SarifValidationContext.cs +++ b/src/Sarif.Multitool.Library/SarifValidationContext.cs @@ -3,6 +3,7 @@ using System; using System.IO; + using Newtonsoft.Json.Linq; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Sarif.Multitool.Library/StringExtensions.cs b/src/Sarif.Multitool.Library/StringExtensions.cs index f0bbf145f..c9fc115d0 100644 --- a/src/Sarif.Multitool.Library/StringExtensions.cs +++ b/src/Sarif.Multitool.Library/StringExtensions.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using Microsoft.Json.Pointer; + using Newtonsoft.Json.Linq; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Sarif.Multitool.Library/TransformCommand.cs b/src/Sarif.Multitool.Library/TransformCommand.cs index b26291d4a..0fc9c9551 100644 --- a/src/Sarif.Multitool.Library/TransformCommand.cs +++ b/src/Sarif.Multitool.Library/TransformCommand.cs @@ -3,11 +3,13 @@ using System; using System.IO; + using Microsoft.CodeAnalysis.Sarif.Driver; using Microsoft.CodeAnalysis.Sarif.Readers; using Microsoft.CodeAnalysis.Sarif.VersionOne; using Microsoft.CodeAnalysis.Sarif.Visitors; using Microsoft.CodeAnalysis.Sarif.Writers; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.Multitool @@ -151,4 +153,4 @@ private string SniffVersion(string sarifPath) return null; } } -} \ No newline at end of file +} diff --git a/src/Sarif.Multitool.Library/TransformOptions.cs b/src/Sarif.Multitool.Library/TransformOptions.cs index 83d93e8ff..fc9dd6a11 100644 --- a/src/Sarif.Multitool.Library/TransformOptions.cs +++ b/src/Sarif.Multitool.Library/TransformOptions.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using CommandLine; + using Microsoft.CodeAnalysis.Sarif.Driver; namespace Microsoft.CodeAnalysis.Sarif.Multitool @@ -10,4 +11,4 @@ namespace Microsoft.CodeAnalysis.Sarif.Multitool public class TransformOptions : SingleFileOptionsBase { } -} \ No newline at end of file +} diff --git a/src/Sarif.Multitool.Library/ValidateCommand.cs b/src/Sarif.Multitool.Library/ValidateCommand.cs index b8339504e..a2f5a8c86 100644 --- a/src/Sarif.Multitool.Library/ValidateCommand.cs +++ b/src/Sarif.Multitool.Library/ValidateCommand.cs @@ -9,6 +9,7 @@ using Microsoft.CodeAnalysis.Sarif.Writers; using Microsoft.Json.Schema; using Microsoft.Json.Schema.Validation; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Sarif.Multitool.Library/ValidateOptions.cs b/src/Sarif.Multitool.Library/ValidateOptions.cs index 02c6f7bfa..1f7622333 100644 --- a/src/Sarif.Multitool.Library/ValidateOptions.cs +++ b/src/Sarif.Multitool.Library/ValidateOptions.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using CommandLine; + using Microsoft.CodeAnalysis.Sarif.Driver; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Sarif.WorkItems/SarifWorkItemContext.cs b/src/Sarif.WorkItems/SarifWorkItemContext.cs index 9bfc87293..df495a283 100644 --- a/src/Sarif.WorkItems/SarifWorkItemContext.cs +++ b/src/Sarif.WorkItems/SarifWorkItemContext.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using System.IO; using System.Reflection; + using Microsoft.WorkItems; namespace Microsoft.CodeAnalysis.Sarif.WorkItems @@ -30,8 +31,9 @@ public Uri HostUri public string DescriptionFooter { - get { - return + get + { + return CurrentProvider == FilingClient.SourceControlProvider.AzureDevOps ? AzureDevOpsDescriptionFooter : GitHubDescriptionFooter; @@ -268,4 +270,4 @@ public void Dispose() "Extensibility", nameof(AdditionalTags), defaultValue: () => { return new StringSet(); }); } -} \ No newline at end of file +} diff --git a/src/Sarif.WorkItems/SarifWorkItemFiler.cs b/src/Sarif.WorkItems/SarifWorkItemFiler.cs index 784b95ef8..e7022d6fc 100644 --- a/src/Sarif.WorkItems/SarifWorkItemFiler.cs +++ b/src/Sarif.WorkItems/SarifWorkItemFiler.cs @@ -8,6 +8,7 @@ using System.Linq; using System.Reflection; using System.Threading.Tasks; + using Microsoft.ApplicationInsights.Channel; using Microsoft.CodeAnalysis.Sarif.Visitors; using Microsoft.CodeAnalysis.WorkItems; @@ -15,6 +16,7 @@ using Microsoft.Extensions.Logging; using Microsoft.WorkItems; using Microsoft.WorkItems.Logging; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.WorkItems @@ -54,7 +56,7 @@ public SarifWorkItemFiler(Uri filingUri = null, SarifWorkItemContext filingConte this.FiledWorkItems = new List(); } - public FilingClient FilingClient + public FilingClient FilingClient { get { @@ -532,4 +534,4 @@ public void Dispose() internal const string PROGRAMMABLE_URIS_PROPERTY_NAME = "programmableWorkItemUris"; internal const string LOGID_PROPERTY_NAME = "logId"; } -} \ No newline at end of file +} diff --git a/src/Sarif.WorkItems/SarifWorkItemModel.cs b/src/Sarif.WorkItems/SarifWorkItemModel.cs index d9915c231..1c1d20e7a 100644 --- a/src/Sarif.WorkItems/SarifWorkItemModel.cs +++ b/src/Sarif.WorkItems/SarifWorkItemModel.cs @@ -4,8 +4,10 @@ using System; using System.Collections.Generic; using System.Linq; + using Microsoft.CodeAnalysis.Sarif.Visitors; using Microsoft.WorkItems; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.WorkItems @@ -75,10 +77,10 @@ public class SarifWorkItemModel : WorkItemModel // this.CommentOrDiscussion = $"Default {nameof(this.CommentOrDiscussion)}"; - string descriptionFooter = this.Context.DescriptionFooter; + string descriptionFooter = this.Context.DescriptionFooter; - this.BodyOrDescription = - Environment.NewLine + + this.BodyOrDescription = + Environment.NewLine + sarifLog.CreateWorkItemDescription(this.Context, LocationUris) + descriptionFooter; diff --git a/src/Sarif.WorkItems/SarifWorkItemsExtensions.cs b/src/Sarif.WorkItems/SarifWorkItemsExtensions.cs index 6316e5666..807033ce0 100644 --- a/src/Sarif.WorkItems/SarifWorkItemsExtensions.cs +++ b/src/Sarif.WorkItems/SarifWorkItemsExtensions.cs @@ -17,7 +17,7 @@ public static bool ShouldBeFiled(this Result result) { return false; } - + if (result.Suppressions?.Count > 0) { return false; } // Fail: an explicit failure occurred. @@ -91,7 +91,7 @@ public static string CreateWorkItemTitle(this Run run) string locationName = "'" + firstResult.Locations?[0].LogicalLocation?.FullyQualifiedName + "'"; if (locationName.Length > remainingChars) - { + { locationName = "'" + Path.GetFileName(firstResult.Locations?[0].LogicalLocation?.FullyQualifiedName) + "'"; if (locationName.Length > remainingChars) @@ -139,7 +139,7 @@ public static int GetAggregateFilableResultsCount(this SarifLog log) .Select(result => result.ShouldBeFiled() ? 1 : 0).Sum()) .Sum() ?? 0; } - + public static string CreateWorkItemDescription(this SarifLog log, SarifWorkItemContext context, IList locationUris) { int totalResults = log.GetAggregateFilableResultsCount(); diff --git a/src/Sarif/Autogenerated/.editorconfig b/src/Sarif/Autogenerated/.editorconfig new file mode 100644 index 000000000..535ef6940 --- /dev/null +++ b/src/Sarif/Autogenerated/.editorconfig @@ -0,0 +1,7 @@ +# Remove the line below if you want to inherit .editorconfig settings from higher directories +root = true + +[Autogenerated/**] +file_header_template = unset +dotnet_separate_import_directive_groups = unset +dotnet_sort_system_directives_first = unset diff --git a/src/Sarif/Baseline/DefaultBaseline/CodeFlowBaselineEquals.cs b/src/Sarif/Baseline/DefaultBaseline/CodeFlowBaselineEquals.cs index 5be48102a..f59b243b1 100644 --- a/src/Sarif/Baseline/DefaultBaseline/CodeFlowBaselineEquals.cs +++ b/src/Sarif/Baseline/DefaultBaseline/CodeFlowBaselineEquals.cs @@ -37,4 +37,4 @@ public int GetHashCode(CodeFlow obj) } } } -} \ No newline at end of file +} diff --git a/src/Sarif/Baseline/DefaultBaseline/ThreadFlowBaselineEquals.cs b/src/Sarif/Baseline/DefaultBaseline/ThreadFlowBaselineEquals.cs index cceb41b13..84e9c94a7 100644 --- a/src/Sarif/Baseline/DefaultBaseline/ThreadFlowBaselineEquals.cs +++ b/src/Sarif/Baseline/DefaultBaseline/ThreadFlowBaselineEquals.cs @@ -37,4 +37,4 @@ public int GetHashCode(ThreadFlow obj) } } } -} \ No newline at end of file +} diff --git a/src/Sarif/Baseline/DefaultBaseline/ThreadFlowLocationBaselineEquals.cs b/src/Sarif/Baseline/DefaultBaseline/ThreadFlowLocationBaselineEquals.cs index d2fff51f1..a32f82dde 100644 --- a/src/Sarif/Baseline/DefaultBaseline/ThreadFlowLocationBaselineEquals.cs +++ b/src/Sarif/Baseline/DefaultBaseline/ThreadFlowLocationBaselineEquals.cs @@ -47,4 +47,4 @@ public int GetHashCode(ThreadFlowLocation obj) } } } -} \ No newline at end of file +} diff --git a/src/Sarif/Baseline/ResultMatching/DataStructures/MatchedResults.cs b/src/Sarif/Baseline/ResultMatching/DataStructures/MatchedResults.cs index 441ea4534..83ab87488 100644 --- a/src/Sarif/Baseline/ResultMatching/DataStructures/MatchedResults.cs +++ b/src/Sarif/Baseline/ResultMatching/DataStructures/MatchedResults.cs @@ -247,4 +247,4 @@ public override string ToString() } } } -} \ No newline at end of file +} diff --git a/src/Sarif/Baseline/ResultMatching/IResultMatcher.cs b/src/Sarif/Baseline/ResultMatching/IResultMatcher.cs index 79af24ad3..fd3fc3c1c 100644 --- a/src/Sarif/Baseline/ResultMatching/IResultMatcher.cs +++ b/src/Sarif/Baseline/ResultMatching/IResultMatcher.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; + using Microsoft.CodeAnalysis.Sarif.Baseline.ResultMatching; namespace Microsoft.CodeAnalysis.Sarif.Baseline diff --git a/src/Sarif/Baseline/ResultMatching/RemappingCalculators/IRemappingCalculator.cs b/src/Sarif/Baseline/ResultMatching/RemappingCalculators/IRemappingCalculator.cs index 6deb2f096..57c2ad9a2 100644 --- a/src/Sarif/Baseline/ResultMatching/RemappingCalculators/IRemappingCalculator.cs +++ b/src/Sarif/Baseline/ResultMatching/RemappingCalculators/IRemappingCalculator.cs @@ -9,4 +9,4 @@ public interface IRemappingCalculator { IEnumerable CalculatePossibleRemappings(IEnumerable baseline, IEnumerable current); } -} \ No newline at end of file +} diff --git a/src/Sarif/Baseline/ResultMatching/RemappingCalculators/SarifLogRemapping.cs b/src/Sarif/Baseline/ResultMatching/RemappingCalculators/SarifLogRemapping.cs index ab905c47d..e66ee52a3 100644 --- a/src/Sarif/Baseline/ResultMatching/RemappingCalculators/SarifLogRemapping.cs +++ b/src/Sarif/Baseline/ResultMatching/RemappingCalculators/SarifLogRemapping.cs @@ -11,4 +11,4 @@ public class SarifLogRemapping public Func RemapResult { get; private set; } } -} \ No newline at end of file +} diff --git a/src/Sarif/Baseline/ResultMatching/ResultMatchingBaselinerFactory.cs b/src/Sarif/Baseline/ResultMatching/ResultMatchingBaselinerFactory.cs index 8ad23b138..0fcd82a57 100644 --- a/src/Sarif/Baseline/ResultMatching/ResultMatchingBaselinerFactory.cs +++ b/src/Sarif/Baseline/ResultMatching/ResultMatchingBaselinerFactory.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; + using Microsoft.CodeAnalysis.Sarif.Baseline.ResultMatching.ExactMatchers; using Microsoft.CodeAnalysis.Sarif.Baseline.ResultMatching.HeuristicMatchers; diff --git a/src/Sarif/Baseline/V2/WhatComponent.cs b/src/Sarif/Baseline/V2/WhatComponent.cs index cb284dc0f..9f28c47cd 100644 --- a/src/Sarif/Baseline/V2/WhatComponent.cs +++ b/src/Sarif/Baseline/V2/WhatComponent.cs @@ -38,7 +38,7 @@ public bool Equals(WhatComponent other) public override bool Equals(object obj) { - if(obj is WhatComponent) + if (obj is WhatComponent) { return Equals((WhatComponent)obj); } diff --git a/src/Sarif/Baseline/V2/WhatMap.cs b/src/Sarif/Baseline/V2/WhatMap.cs index a36cbeb28..24d5b982b 100644 --- a/src/Sarif/Baseline/V2/WhatMap.cs +++ b/src/Sarif/Baseline/V2/WhatMap.cs @@ -19,7 +19,7 @@ internal class WhatMap // This dictionary tracks which WhatComponents are unique. // The value is the index of the result with that value, if unique, or -1 if in several. private readonly Dictionary _map; - + public WhatMap() { _map = new Dictionary(); @@ -31,7 +31,7 @@ private void Add(ExtractedResult result, HashSet otherRunLocations, int string locationSpecifier = WhereComparer.LocationSpecifier(result, otherRunLocations); // Add Result attributes used as matching hints in a "bucket" for the Rule x LocationSpecifier x AttributeName - foreach(WhatComponent component in result.WhatProperties(locationSpecifier)) + foreach (WhatComponent component in result.WhatProperties(locationSpecifier)) { Add(component, index); } diff --git a/src/Sarif/Baseline/V2/WhereComparer.cs b/src/Sarif/Baseline/V2/WhereComparer.cs index d1ddb6bdd..a8cc1546f 100644 --- a/src/Sarif/Baseline/V2/WhereComparer.cs +++ b/src/Sarif/Baseline/V2/WhereComparer.cs @@ -218,7 +218,7 @@ public static void AddLocationIdentifiers(ExtractedResult result, HashSet public partial class CodeFlow { - public bool ShouldSerializeThreadFlows() + public bool ShouldSerializeThreadFlows() { - return this.ThreadFlows.HasAtLeastOneNonDefaultValue(ThreadFlow.ValueComparer); + return this.ThreadFlows.HasAtLeastOneNonDefaultValue(ThreadFlow.ValueComparer); } } } diff --git a/src/Sarif/Core/IPropertyBagHolder.cs b/src/Sarif/Core/IPropertyBagHolder.cs index d9a235983..d7bba6147 100644 --- a/src/Sarif/Core/IPropertyBagHolder.cs +++ b/src/Sarif/Core/IPropertyBagHolder.cs @@ -19,4 +19,4 @@ public interface IPropertyBagHolder void SetPropertiesFrom(IPropertyBagHolder other); void RemoveProperty(string propertyName); } -} \ No newline at end of file +} diff --git a/src/Sarif/Core/PropertyBagHolder.cs b/src/Sarif/Core/PropertyBagHolder.cs index dc57239a2..2ff328b9d 100644 --- a/src/Sarif/Core/PropertyBagHolder.cs +++ b/src/Sarif/Core/PropertyBagHolder.cs @@ -6,8 +6,10 @@ using System.Diagnostics; using System.Globalization; using System.Linq; + using Microsoft.CodeAnalysis.Sarif.Readers; using Microsoft.CodeAnalysis.Sarif.Visitors; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Sarif/Core/Run.cs b/src/Sarif/Core/Run.cs index aadffc20a..fa4c95460 100644 --- a/src/Sarif/Core/Run.cs +++ b/src/Sarif/Core/Run.cs @@ -256,7 +256,7 @@ public void ApplyPolicies() foreach (Result result in this.Results) { string ruleId = result.ResolvedRuleId(this); - + if (PoliciesCache.ContainsKey(ruleId)) { result.Level = PoliciesCache[ruleId]; diff --git a/src/Sarif/Core/SarifLog.cs b/src/Sarif/Core/SarifLog.cs index 9bb8396e0..9c803abb5 100644 --- a/src/Sarif/Core/SarifLog.cs +++ b/src/Sarif/Core/SarifLog.cs @@ -2,7 +2,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.IO; + using Microsoft.CodeAnalysis.Sarif.Readers; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Sarif/Core/SerializedPropertyInfo.cs b/src/Sarif/Core/SerializedPropertyInfo.cs index 5470e679a..e3ea41298 100644 --- a/src/Sarif/Core/SerializedPropertyInfo.cs +++ b/src/Sarif/Core/SerializedPropertyInfo.cs @@ -3,6 +3,7 @@ using Microsoft.CodeAnalysis.Sarif.Readers; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Sarif/ExtensionMethods.cs b/src/Sarif/ExtensionMethods.cs index ff97e7a9b..f70bbac5d 100644 --- a/src/Sarif/ExtensionMethods.cs +++ b/src/Sarif/ExtensionMethods.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using Microsoft.CodeAnalysis.Sarif.Visitors; - using System; using System.Collections; using System.Collections.Generic; @@ -13,6 +11,8 @@ using System.Text.RegularExpressions; using System.Xml; +using Microsoft.CodeAnalysis.Sarif.Visitors; + namespace Microsoft.CodeAnalysis.Sarif { public static class ExtensionMethods @@ -552,4 +552,4 @@ internal static void ConsumeElementOfDepth(this XmlReader xmlReader, int endElem } } } -} \ No newline at end of file +} diff --git a/src/Sarif/ExternalProcess.cs b/src/Sarif/ExternalProcess.cs index dc742c820..dbf408926 100644 --- a/src/Sarif/ExternalProcess.cs +++ b/src/Sarif/ExternalProcess.cs @@ -67,4 +67,4 @@ public ExternalProcess( } } } -} \ No newline at end of file +} diff --git a/src/Sarif/FileRegionsCache.cs b/src/Sarif/FileRegionsCache.cs index 4bd576aac..b04e25d5a 100644 --- a/src/Sarif/FileRegionsCache.cs +++ b/src/Sarif/FileRegionsCache.cs @@ -326,4 +326,4 @@ private static void Assert(bool condition) //Debug.Assert(condition); } } -} \ No newline at end of file +} diff --git a/src/Sarif/GlobalSuppressions.cs b/src/Sarif/GlobalSuppressions.cs index b017c3b4d..5521cd7a4 100644 --- a/src/Sarif/GlobalSuppressions.cs +++ b/src/Sarif/GlobalSuppressions.cs @@ -3,4 +3,4 @@ using System.Diagnostics.CodeAnalysis; -[module: SuppressMessage("Microsoft.Security.Xml", "CA3053:UseXmlSecureResolver", Scope = "member", Target = "Microsoft.CodeAnalysis.Sarif.PropertiesDictionary.#LoadFromXml(System.IO.Stream)")] \ No newline at end of file +[module: SuppressMessage("Microsoft.Security.Xml", "CA3053:UseXmlSecureResolver", Scope = "member", Target = "Microsoft.CodeAnalysis.Sarif.PropertiesDictionary.#LoadFromXml(System.IO.Stream)")] diff --git a/src/Sarif/IConsoleCapture.cs b/src/Sarif/IConsoleCapture.cs index f7ce2d69f..0abdcf528 100644 --- a/src/Sarif/IConsoleCapture.cs +++ b/src/Sarif/IConsoleCapture.cs @@ -12,4 +12,4 @@ public interface IConsoleCapture string Text { get; } Task Capture(StreamReader reader, CancellationToken cancellationToken); } -} \ No newline at end of file +} diff --git a/src/Sarif/IOptionsProvider.cs b/src/Sarif/IOptionsProvider.cs index cbc143004..157c6b4f9 100644 --- a/src/Sarif/IOptionsProvider.cs +++ b/src/Sarif/IOptionsProvider.cs @@ -10,4 +10,4 @@ public interface IOptionsProvider [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate", Justification = "This method is expensive and so should not be a property")] IEnumerable GetOptions(); } -} \ No newline at end of file +} diff --git a/src/Sarif/IntegerSet.cs b/src/Sarif/IntegerSet.cs index 0d2ad6aca..4418b4b38 100644 --- a/src/Sarif/IntegerSet.cs +++ b/src/Sarif/IntegerSet.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.Runtime.Serialization; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Sarif/NotYetAutoGenerated/Address.cs b/src/Sarif/NotYetAutoGenerated/Address.cs index ddaef8100..0538ddc2f 100644 --- a/src/Sarif/NotYetAutoGenerated/Address.cs +++ b/src/Sarif/NotYetAutoGenerated/Address.cs @@ -6,7 +6,9 @@ using System.Collections.Generic; using System.ComponentModel; using System.Runtime.Serialization; + using Microsoft.CodeAnalysis.Sarif.Readers; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif @@ -204,4 +206,4 @@ private void Init(int absoluteAddress, int? relativeAddress, int? length, string } } } -} \ No newline at end of file +} diff --git a/src/Sarif/NotYetAutoGenerated/Invocation.cs b/src/Sarif/NotYetAutoGenerated/Invocation.cs index b40d01327..f877a5e98 100644 --- a/src/Sarif/NotYetAutoGenerated/Invocation.cs +++ b/src/Sarif/NotYetAutoGenerated/Invocation.cs @@ -5,7 +5,9 @@ using System.CodeDom.Compiler; using System.Collections.Generic; using System.Runtime.Serialization; + using Microsoft.CodeAnalysis.Sarif.Readers; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif @@ -487,4 +489,4 @@ protected virtual void Init(string commandLine, IEnumerable arguments, I } } } -} \ No newline at end of file +} diff --git a/src/Sarif/NotYetAutoGenerated/ReportingConfiguration.cs b/src/Sarif/NotYetAutoGenerated/ReportingConfiguration.cs index a560cbffa..320ca9201 100644 --- a/src/Sarif/NotYetAutoGenerated/ReportingConfiguration.cs +++ b/src/Sarif/NotYetAutoGenerated/ReportingConfiguration.cs @@ -6,7 +6,9 @@ using System.Collections.Generic; using System.ComponentModel; using System.Runtime.Serialization; + using Microsoft.CodeAnalysis.Sarif.Readers; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif @@ -157,4 +159,4 @@ private void Init(bool enabled, FailureLevel level, double rank, IDictionary deprecatedIds, string guid, IEn } } } -} \ No newline at end of file +} diff --git a/src/Sarif/NotYetAutoGenerated/Result.cs b/src/Sarif/NotYetAutoGenerated/Result.cs index cae285333..451e10051 100644 --- a/src/Sarif/NotYetAutoGenerated/Result.cs +++ b/src/Sarif/NotYetAutoGenerated/Result.cs @@ -6,7 +6,9 @@ using System.Collections.Generic; using System.ComponentModel; using System.Runtime.Serialization; + using Microsoft.CodeAnalysis.Sarif.Readers; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif @@ -666,4 +668,4 @@ private void Init(string ruleId, int ruleIndex, ReportingDescriptorReference rul } } } -} \ No newline at end of file +} diff --git a/src/Sarif/NotYetAutoGenerated/Run.cs b/src/Sarif/NotYetAutoGenerated/Run.cs index 424ef49f0..e6e75f668 100644 --- a/src/Sarif/NotYetAutoGenerated/Run.cs +++ b/src/Sarif/NotYetAutoGenerated/Run.cs @@ -6,7 +6,9 @@ using System.Collections.Generic; using System.ComponentModel; using System.Runtime.Serialization; + using Microsoft.CodeAnalysis.Sarif.Readers; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif @@ -682,4 +684,4 @@ private void Init(Tool tool, IEnumerable invocations, Conversion con } } } -} \ No newline at end of file +} diff --git a/src/Sarif/NotYetAutoGenerated/SarifLog.cs b/src/Sarif/NotYetAutoGenerated/SarifLog.cs index 9a94b3602..97611a7e2 100644 --- a/src/Sarif/NotYetAutoGenerated/SarifLog.cs +++ b/src/Sarif/NotYetAutoGenerated/SarifLog.cs @@ -5,7 +5,9 @@ using System.CodeDom.Compiler; using System.Collections.Generic; using System.Runtime.Serialization; + using Microsoft.CodeAnalysis.Sarif.Readers; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif @@ -186,4 +188,4 @@ private void Init(Uri schemaUri, SarifVersion version, IEnumerable runs, IE } } } -} \ No newline at end of file +} diff --git a/src/Sarif/Notes.cs b/src/Sarif/Notes.cs index 10595d30c..48529a550 100644 --- a/src/Sarif/Notes.cs +++ b/src/Sarif/Notes.cs @@ -31,4 +31,4 @@ public static void LogNotApplicableToSpecifiedTarget(IAnalysisContext context, s context.RuntimeErrors |= RuntimeConditions.RuleNotApplicableToTarget; } } -} \ No newline at end of file +} diff --git a/src/Sarif/PerLanguageOption.cs b/src/Sarif/PerLanguageOption.cs index 7f81a6fef..ca055917c 100644 --- a/src/Sarif/PerLanguageOption.cs +++ b/src/Sarif/PerLanguageOption.cs @@ -83,4 +83,4 @@ public override string ToString() return string.Format(CultureInfo.InvariantCulture, "{0} - {1}", this.Feature, this.Name); } } -} \ No newline at end of file +} diff --git a/src/Sarif/Processors/Log/SarifLogExtensionMethods.cs b/src/Sarif/Processors/Log/SarifLogExtensionMethods.cs index d5ec66d07..f924291ed 100644 --- a/src/Sarif/Processors/Log/SarifLogExtensionMethods.cs +++ b/src/Sarif/Processors/Log/SarifLogExtensionMethods.cs @@ -1,12 +1,12 @@ // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using Microsoft.CodeAnalysis.Sarif.Visitors; - using System; using System.Collections.Generic; using System.Linq; +using Microsoft.CodeAnalysis.Sarif.Visitors; + namespace Microsoft.CodeAnalysis.Sarif.Processors { /// diff --git a/src/Sarif/Processors/Log/SarifLogPipeline.cs b/src/Sarif/Processors/Log/SarifLogPipeline.cs index 6e59d9ba7..94fb90c6b 100644 --- a/src/Sarif/Processors/Log/SarifLogPipeline.cs +++ b/src/Sarif/Processors/Log/SarifLogPipeline.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.Linq; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.Processors diff --git a/src/Sarif/Properties/AssemblyInfo.cs b/src/Sarif/Properties/AssemblyInfo.cs index f14fe0b91..3fd1bec8e 100644 --- a/src/Sarif/Properties/AssemblyInfo.cs +++ b/src/Sarif/Properties/AssemblyInfo.cs @@ -1,2 +1,2 @@ // Copyright (c) Microsoft. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. \ No newline at end of file +// Licensed under the MIT license. See LICENSE file in the project root for full license information. diff --git a/src/Sarif/PropertiesDictionary.cs b/src/Sarif/PropertiesDictionary.cs index 8fb66d339..7cbbe9f19 100644 --- a/src/Sarif/PropertiesDictionary.cs +++ b/src/Sarif/PropertiesDictionary.cs @@ -8,6 +8,7 @@ using System.IO; using System.Runtime.Serialization; using System.Xml; + using Newtonsoft.Json; using Newtonsoft.Json.Linq; diff --git a/src/Sarif/Query/Evaluators/PropertyBagPropertyEvaluator.cs b/src/Sarif/Query/Evaluators/PropertyBagPropertyEvaluator.cs index 5498f9bc3..428798c0d 100644 --- a/src/Sarif/Query/Evaluators/PropertyBagPropertyEvaluator.cs +++ b/src/Sarif/Query/Evaluators/PropertyBagPropertyEvaluator.cs @@ -8,6 +8,7 @@ using System.Globalization; using System.Linq; using System.Text.RegularExpressions; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.Query.Evaluators diff --git a/src/Sarif/Readers/DateTimeConverter.cs b/src/Sarif/Readers/DateTimeConverter.cs index add0e22e4..cd3280caa 100644 --- a/src/Sarif/Readers/DateTimeConverter.cs +++ b/src/Sarif/Readers/DateTimeConverter.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Globalization; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.Readers diff --git a/src/Sarif/Readers/DeferredDictionaryConverter.cs b/src/Sarif/Readers/DeferredDictionaryConverter.cs index ff1993d1e..26ff7f943 100644 --- a/src/Sarif/Readers/DeferredDictionaryConverter.cs +++ b/src/Sarif/Readers/DeferredDictionaryConverter.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Collections.Generic; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.Readers diff --git a/src/Sarif/Readers/DeferredListConverter.cs b/src/Sarif/Readers/DeferredListConverter.cs index ab2199aec..1bb0be419 100644 --- a/src/Sarif/Readers/DeferredListConverter.cs +++ b/src/Sarif/Readers/DeferredListConverter.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Collections.Generic; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.Readers diff --git a/src/Sarif/Readers/EnumConverter.cs b/src/Sarif/Readers/EnumConverter.cs index 4a7f570c5..a5ea956d4 100644 --- a/src/Sarif/Readers/EnumConverter.cs +++ b/src/Sarif/Readers/EnumConverter.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.Readers diff --git a/src/Sarif/Readers/JsonPositionedTextReader.cs b/src/Sarif/Readers/JsonPositionedTextReader.cs index 75b766e0e..df2432564 100644 --- a/src/Sarif/Readers/JsonPositionedTextReader.cs +++ b/src/Sarif/Readers/JsonPositionedTextReader.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.IO; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.Readers diff --git a/src/Sarif/Readers/LineMappingStreamReader.cs b/src/Sarif/Readers/LineMappingStreamReader.cs index 40374ac66..bdebdfa94 100644 --- a/src/Sarif/Readers/LineMappingStreamReader.cs +++ b/src/Sarif/Readers/LineMappingStreamReader.cs @@ -67,15 +67,15 @@ private static Stream FindBomWidth(Stream stream, out int bomWidth) { bomWidth = 2; } - else if(buffer[0] == 0xFF && buffer[1] == 0xFE) + else if (buffer[0] == 0xFF && buffer[1] == 0xFE) { bomWidth = 2; } - else if(buffer[0] == 0xEF && buffer[1] == 0xBB && buffer[2] == 0xBF) + else if (buffer[0] == 0xEF && buffer[1] == 0xBB && buffer[2] == 0xBF) { bomWidth = 3; } - else if(buffer[0] == 0x00 && buffer[1] == 0x00 && buffer[2] == 0xFE && buffer[3] == 0xFF) + else if (buffer[0] == 0x00 && buffer[1] == 0x00 && buffer[2] == 0xFE && buffer[3] == 0xFF) { bomWidth = 4; } diff --git a/src/Sarif/Readers/PropertyBagConverter.cs b/src/Sarif/Readers/PropertyBagConverter.cs index e96baab23..d3e95de43 100644 --- a/src/Sarif/Readers/PropertyBagConverter.cs +++ b/src/Sarif/Readers/PropertyBagConverter.cs @@ -28,7 +28,7 @@ public override object ReadJson(JsonReader reader, Type objectType, object exist reader.Read(); - while(reader.TokenType == JsonToken.PropertyName) + while (reader.TokenType == JsonToken.PropertyName) { string name = (string)reader.Value; reader.Read(); diff --git a/src/Sarif/Readers/SarifContractResolver.cs b/src/Sarif/Readers/SarifContractResolver.cs index 99c62a0fb..93fa65dc3 100644 --- a/src/Sarif/Readers/SarifContractResolver.cs +++ b/src/Sarif/Readers/SarifContractResolver.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; + using Newtonsoft.Json.Serialization; namespace Microsoft.CodeAnalysis.Sarif.Readers diff --git a/src/Sarif/Readers/SarifDeferredContractResolver.cs b/src/Sarif/Readers/SarifDeferredContractResolver.cs index afd776a72..af80c1147 100644 --- a/src/Sarif/Readers/SarifDeferredContractResolver.cs +++ b/src/Sarif/Readers/SarifDeferredContractResolver.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Collections.Generic; + using Newtonsoft.Json.Serialization; namespace Microsoft.CodeAnalysis.Sarif.Readers diff --git a/src/Sarif/Readers/SarifVersionConverter.cs b/src/Sarif/Readers/SarifVersionConverter.cs index 66eddbc59..4ef3f101b 100644 --- a/src/Sarif/Readers/SarifVersionConverter.cs +++ b/src/Sarif/Readers/SarifVersionConverter.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.Readers diff --git a/src/Sarif/Readers/UriConverter.cs b/src/Sarif/Readers/UriConverter.cs index 047a69555..1b2128235 100644 --- a/src/Sarif/Readers/UriConverter.cs +++ b/src/Sarif/Readers/UriConverter.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Collections.Generic; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.Readers @@ -58,7 +59,7 @@ public override void WriteJson(JsonWriter writer, object value, JsonSerializer s uri.IsAbsoluteUri && uri.Scheme.Equals(UriUtilities.FileScheme, StringComparison.Ordinal) && !uri.OriginalString.StartsWith(UriUtilities.FileScheme.WithColon(), StringComparison.Ordinal); - + string serializedValue = useAbsoluteUri ? uri.AbsoluteUri : uri.OriginalString; writer.WriteValue(serializedValue); diff --git a/src/Sarif/RuleUtilities.cs b/src/Sarif/RuleUtilities.cs index 8fa2c425d..c0c40a37a 100644 --- a/src/Sarif/RuleUtilities.cs +++ b/src/Sarif/RuleUtilities.cs @@ -164,4 +164,4 @@ public static string NormalizeRuleMessageId(string ruleMessageId, string ruleId, return ruleMessageId; } } -} \ No newline at end of file +} diff --git a/src/Sarif/SplittingStrategy.cs b/src/Sarif/SplittingStrategy.cs index ae36aa07b..09292ed16 100644 --- a/src/Sarif/SplittingStrategy.cs +++ b/src/Sarif/SplittingStrategy.cs @@ -64,4 +64,4 @@ public enum SplittingStrategy /// PerRunPerOrgPerEntityTypePerRepositoryPerPartialFingerprint, } -} \ No newline at end of file +} diff --git a/src/Sarif/StringSet.cs b/src/Sarif/StringSet.cs index e0fa9d1be..d90c88795 100644 --- a/src/Sarif/StringSet.cs +++ b/src/Sarif/StringSet.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.Runtime.Serialization; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Sarif/TypedPropertiesDictionary.cs b/src/Sarif/TypedPropertiesDictionary.cs index 1b4705748..5e8360c23 100644 --- a/src/Sarif/TypedPropertiesDictionary.cs +++ b/src/Sarif/TypedPropertiesDictionary.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.Runtime.Serialization; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Sarif/TypedPropertiesDictionaryConverter.cs b/src/Sarif/TypedPropertiesDictionaryConverter.cs index 322332116..37a81fe7e 100644 --- a/src/Sarif/TypedPropertiesDictionaryConverter.cs +++ b/src/Sarif/TypedPropertiesDictionaryConverter.cs @@ -5,6 +5,7 @@ using System.Collections; using System.Diagnostics; using System.Linq; + using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; diff --git a/src/Sarif/VersionConstants.cs b/src/Sarif/VersionConstants.cs index c65777505..a548b060a 100644 --- a/src/Sarif/VersionConstants.cs +++ b/src/Sarif/VersionConstants.cs @@ -8,4 +8,4 @@ public static class VersionConstants public const string SchemaVersionAsPublishedToSchemaStoreOrg = "2.1.0-rtm.5"; public const string StableSarifVersion = "2.1.0"; } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/AlgorithmKindVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/AlgorithmKindVersionOne.cs index 1573a87c4..29932f938 100644 --- a/src/Sarif/VersionOne/Autogenerated/AlgorithmKindVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/AlgorithmKindVersionOne.cs @@ -47,4 +47,4 @@ public enum AlgorithmKindVersionOne Tlsh, Whirlpool } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/AnnotatedCodeLocationImportanceVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/AnnotatedCodeLocationImportanceVersionOne.cs index da735066f..830c4a214 100644 --- a/src/Sarif/VersionOne/Autogenerated/AnnotatedCodeLocationImportanceVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/AnnotatedCodeLocationImportanceVersionOne.cs @@ -15,4 +15,4 @@ public enum AnnotatedCodeLocationImportanceVersionOne Essential, Unimportant } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/AnnotatedCodeLocationKindVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/AnnotatedCodeLocationKindVersionOne.cs index 871a34966..6090247da 100644 --- a/src/Sarif/VersionOne/Autogenerated/AnnotatedCodeLocationKindVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/AnnotatedCodeLocationKindVersionOne.cs @@ -24,4 +24,4 @@ public enum AnnotatedCodeLocationKindVersionOne FunctionReturn, Usage } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/AnnotatedCodeLocationVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/AnnotatedCodeLocationVersionOne.cs index 70ad5d8e5..74c699a91 100644 --- a/src/Sarif/VersionOne/Autogenerated/AnnotatedCodeLocationVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/AnnotatedCodeLocationVersionOne.cs @@ -5,6 +5,7 @@ using System.CodeDom.Compiler; using System.Collections.Generic; using System.Runtime.Serialization; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.VersionOne @@ -318,4 +319,4 @@ private void Init(int id, int step, PhysicalLocationVersionOne physicalLocation, } } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/AnnotatedCodeLocationVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/AnnotatedCodeLocationVersionOneEqualityComparer.cs index bb9c850c2..19b59db9d 100644 --- a/src/Sarif/VersionOne/Autogenerated/AnnotatedCodeLocationVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/AnnotatedCodeLocationVersionOneEqualityComparer.cs @@ -307,4 +307,4 @@ public int GetHashCode(AnnotatedCodeLocationVersionOne obj) return result; } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/AnnotationVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/AnnotationVersionOne.cs index 84060bc5c..9cdb88a1f 100644 --- a/src/Sarif/VersionOne/Autogenerated/AnnotationVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/AnnotationVersionOne.cs @@ -120,4 +120,4 @@ private void Init(string message, IEnumerable locati } } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/AnnotationVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/AnnotationVersionOneEqualityComparer.cs index b0df81fc7..9cc223f58 100644 --- a/src/Sarif/VersionOne/Autogenerated/AnnotationVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/AnnotationVersionOneEqualityComparer.cs @@ -86,4 +86,4 @@ public int GetHashCode(AnnotationVersionOne obj) return result; } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/BaselineStateVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/BaselineStateVersionOne.cs index e774b04ba..3ae7da2f3 100644 --- a/src/Sarif/VersionOne/Autogenerated/BaselineStateVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/BaselineStateVersionOne.cs @@ -16,4 +16,4 @@ public enum BaselineStateVersionOne New, Absent } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/CodeFlowVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/CodeFlowVersionOne.cs index d7bf1b86c..f3a89c9fe 100644 --- a/src/Sarif/VersionOne/Autogenerated/CodeFlowVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/CodeFlowVersionOne.cs @@ -134,4 +134,4 @@ private void Init(string message, IEnumerable l } } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/CodeFlowVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/CodeFlowVersionOneEqualityComparer.cs index 35c1184df..5ed5261c8 100644 --- a/src/Sarif/VersionOne/Autogenerated/CodeFlowVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/CodeFlowVersionOneEqualityComparer.cs @@ -124,4 +124,4 @@ public int GetHashCode(CodeFlowVersionOne obj) return result; } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/ExceptionDataVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/ExceptionDataVersionOne.cs index 0bcc22af1..e9eff284e 100644 --- a/src/Sarif/VersionOne/Autogenerated/ExceptionDataVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/ExceptionDataVersionOne.cs @@ -144,4 +144,4 @@ private void Init(string kind, string message, StackVersionOne stack, IEnumerabl } } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/ExceptionDataVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/ExceptionDataVersionOneEqualityComparer.cs index 780fc5730..9d1889905 100644 --- a/src/Sarif/VersionOne/Autogenerated/ExceptionDataVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/ExceptionDataVersionOneEqualityComparer.cs @@ -106,4 +106,4 @@ public int GetHashCode(ExceptionDataVersionOne obj) return result; } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/FileChangeVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/FileChangeVersionOne.cs index b738fee2b..2a960098a 100644 --- a/src/Sarif/VersionOne/Autogenerated/FileChangeVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/FileChangeVersionOne.cs @@ -137,4 +137,4 @@ private void Init(Uri uri, string uriBaseId, IEnumerable } } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/FileChangeVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/FileChangeVersionOneEqualityComparer.cs index a7eb5ee67..98ac6d20a 100644 --- a/src/Sarif/VersionOne/Autogenerated/FileChangeVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/FileChangeVersionOneEqualityComparer.cs @@ -96,4 +96,4 @@ public int GetHashCode(FileChangeVersionOne obj) return result; } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/FileDataVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/FileDataVersionOne.cs index d7a6e53a7..21b152797 100644 --- a/src/Sarif/VersionOne/Autogenerated/FileDataVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/FileDataVersionOne.cs @@ -201,4 +201,4 @@ private void Init(Uri uri, string uriBaseId, string parentKey, int offset, int l } } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/FileDataVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/FileDataVersionOneEqualityComparer.cs index 7765b1ff6..9af96bf7f 100644 --- a/src/Sarif/VersionOne/Autogenerated/FileDataVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/FileDataVersionOneEqualityComparer.cs @@ -176,4 +176,4 @@ public int GetHashCode(FileDataVersionOne obj) return result; } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/FixVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/FixVersionOne.cs index 0bfd0e8f0..26e604e50 100644 --- a/src/Sarif/VersionOne/Autogenerated/FixVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/FixVersionOne.cs @@ -123,4 +123,4 @@ private void Init(string description, IEnumerable fileChan } } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/FixVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/FixVersionOneEqualityComparer.cs index f65c644a9..07fb8430f 100644 --- a/src/Sarif/VersionOne/Autogenerated/FixVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/FixVersionOneEqualityComparer.cs @@ -86,4 +86,4 @@ public int GetHashCode(FixVersionOne obj) return result; } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/FormattedRuleMessageVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/FormattedRuleMessageVersionOne.cs index 6ee19bbe5..da58283b6 100644 --- a/src/Sarif/VersionOne/Autogenerated/FormattedRuleMessageVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/FormattedRuleMessageVersionOne.cs @@ -116,4 +116,4 @@ private void Init(string formatId, IEnumerable arguments) } } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/FormattedRuleMessageVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/FormattedRuleMessageVersionOneEqualityComparer.cs index 366ef508c..30d91871a 100644 --- a/src/Sarif/VersionOne/Autogenerated/FormattedRuleMessageVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/FormattedRuleMessageVersionOneEqualityComparer.cs @@ -86,4 +86,4 @@ public int GetHashCode(FormattedRuleMessageVersionOne obj) return result; } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/HashVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/HashVersionOne.cs index ddddf352d..abbf3be35 100644 --- a/src/Sarif/VersionOne/Autogenerated/HashVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/HashVersionOne.cs @@ -107,4 +107,4 @@ private void Init(string value, AlgorithmKindVersionOne algorithm) Algorithm = algorithm; } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/HashVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/HashVersionOneEqualityComparer.cs index dd0822cb6..31fc3f58b 100644 --- a/src/Sarif/VersionOne/Autogenerated/HashVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/HashVersionOneEqualityComparer.cs @@ -60,4 +60,4 @@ public int GetHashCode(HashVersionOne obj) return result; } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/IRuleVersionOneVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/IRuleVersionOneVersionOne.cs index 98b7fc28d..4417b37a3 100644 --- a/src/Sarif/VersionOne/Autogenerated/IRuleVersionOneVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/IRuleVersionOneVersionOne.cs @@ -53,4 +53,4 @@ public partial interface IRuleVersionOneVersionOne /// Uri HelpUri { get; } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/ISarifNodeVersionOneVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/ISarifNodeVersionOneVersionOne.cs index 8295b065f..2703ecb6c 100644 --- a/src/Sarif/VersionOne/Autogenerated/ISarifNodeVersionOneVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/ISarifNodeVersionOneVersionOne.cs @@ -21,4 +21,4 @@ public interface ISarifNodeVersionOne /// ISarifNodeVersionOne DeepClone(); } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/InvocationVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/InvocationVersionOne.cs index 40660738e..80ef2c8b1 100644 --- a/src/Sarif/VersionOne/Autogenerated/InvocationVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/InvocationVersionOne.cs @@ -208,4 +208,4 @@ private void Init(string commandLine, IDictionary responseFiles, } } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/InvocationVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/InvocationVersionOneEqualityComparer.cs index a1d2a4412..6489c5e30 100644 --- a/src/Sarif/VersionOne/Autogenerated/InvocationVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/InvocationVersionOneEqualityComparer.cs @@ -225,4 +225,4 @@ public int GetHashCode(InvocationVersionOne obj) return result; } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/LocationVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/LocationVersionOne.cs index ecf642b12..5395f4ae0 100644 --- a/src/Sarif/VersionOne/Autogenerated/LocationVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/LocationVersionOne.cs @@ -158,4 +158,4 @@ private void Init(PhysicalLocationVersionOne analysisTarget, PhysicalLocationVer } } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/LocationVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/LocationVersionOneEqualityComparer.cs index cd3431753..fedc6845a 100644 --- a/src/Sarif/VersionOne/Autogenerated/LocationVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/LocationVersionOneEqualityComparer.cs @@ -131,4 +131,4 @@ public int GetHashCode(LocationVersionOne obj) return result; } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/LogicalLocationVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/LogicalLocationVersionOne.cs index dfdb52b22..a7432b782 100644 --- a/src/Sarif/VersionOne/Autogenerated/LogicalLocationVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/LogicalLocationVersionOne.cs @@ -117,4 +117,4 @@ private void Init(string name, string parentKey, string kind) Kind = kind; } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/LogicalLocationVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/LogicalLocationVersionOneEqualityComparer.cs index a6d92aaf5..750cbaebd 100644 --- a/src/Sarif/VersionOne/Autogenerated/LogicalLocationVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/LogicalLocationVersionOneEqualityComparer.cs @@ -73,4 +73,4 @@ public int GetHashCode(LogicalLocationVersionOne obj) return result; } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/NotificationLevelVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/NotificationLevelVersionOne.cs index d1f943999..d409ec3ff 100644 --- a/src/Sarif/VersionOne/Autogenerated/NotificationLevelVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/NotificationLevelVersionOne.cs @@ -15,4 +15,4 @@ public enum NotificationLevelVersionOne Note, Error } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/NotificationVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/NotificationVersionOne.cs index ed1a52247..8e7f57474 100644 --- a/src/Sarif/VersionOne/Autogenerated/NotificationVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/NotificationVersionOne.cs @@ -198,4 +198,4 @@ private void Init(string id, string ruleId, string ruleKey, PhysicalLocationVers } } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/NotificationVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/NotificationVersionOneEqualityComparer.cs index e57aa5ae9..59a41a647 100644 --- a/src/Sarif/VersionOne/Autogenerated/NotificationVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/NotificationVersionOneEqualityComparer.cs @@ -159,4 +159,4 @@ public int GetHashCode(NotificationVersionOne obj) return result; } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/PhysicalLocationVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/PhysicalLocationVersionOne.cs index ad4975291..4dd3de40e 100644 --- a/src/Sarif/VersionOne/Autogenerated/PhysicalLocationVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/PhysicalLocationVersionOne.cs @@ -124,4 +124,4 @@ private void Init(Uri uri, string uriBaseId, RegionVersionOne region) } } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/PhysicalLocationVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/PhysicalLocationVersionOneEqualityComparer.cs index d44761929..f9882b975 100644 --- a/src/Sarif/VersionOne/Autogenerated/PhysicalLocationVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/PhysicalLocationVersionOneEqualityComparer.cs @@ -73,4 +73,4 @@ public int GetHashCode(PhysicalLocationVersionOne obj) return result; } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/RegionVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/RegionVersionOne.cs index ea2ceee12..98a5d8304 100644 --- a/src/Sarif/VersionOne/Autogenerated/RegionVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/RegionVersionOne.cs @@ -147,4 +147,4 @@ private void Init(int startLine, int startColumn, int endLine, int endColumn, in Length = length; } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/RegionVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/RegionVersionOneEqualityComparer.cs index 12c58789e..02424b9c3 100644 --- a/src/Sarif/VersionOne/Autogenerated/RegionVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/RegionVersionOneEqualityComparer.cs @@ -80,4 +80,4 @@ public int GetHashCode(RegionVersionOne obj) return result; } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/ReplacementVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/ReplacementVersionOne.cs index 80d9c671b..fadaef1d8 100644 --- a/src/Sarif/VersionOne/Autogenerated/ReplacementVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/ReplacementVersionOne.cs @@ -117,4 +117,4 @@ private void Init(int offset, int deletedLength, string insertedBytes) InsertedBytes = insertedBytes; } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/ReplacementVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/ReplacementVersionOneEqualityComparer.cs index 569287048..06b55ad36 100644 --- a/src/Sarif/VersionOne/Autogenerated/ReplacementVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/ReplacementVersionOneEqualityComparer.cs @@ -65,4 +65,4 @@ public int GetHashCode(ReplacementVersionOne obj) return result; } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/ResultLevelVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/ResultLevelVersionOne.cs index 1e1638f59..fe7b82fe1 100644 --- a/src/Sarif/VersionOne/Autogenerated/ResultLevelVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/ResultLevelVersionOne.cs @@ -18,4 +18,4 @@ public enum ResultLevelVersionOne Warning, Error } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/ResultVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/ResultVersionOne.cs index 1df918f85..656bceb8d 100644 --- a/src/Sarif/VersionOne/Autogenerated/ResultVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/ResultVersionOne.cs @@ -337,4 +337,4 @@ private void Init(string ruleId, string ruleKey, ResultLevelVersionOne level, st public bool ShouldSerializeLevel() { return this.Level != ResultLevelVersionOne.Warning; } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/ResultVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/ResultVersionOneEqualityComparer.cs index 782077c8e..811ce1b5b 100644 --- a/src/Sarif/VersionOne/Autogenerated/ResultVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/ResultVersionOneEqualityComparer.cs @@ -334,4 +334,4 @@ public int GetHashCode(ResultVersionOne obj) return result; } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/RuleConfigurationVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/RuleConfigurationVersionOne.cs index 5ebed7aa7..62d672952 100644 --- a/src/Sarif/VersionOne/Autogenerated/RuleConfigurationVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/RuleConfigurationVersionOne.cs @@ -15,4 +15,4 @@ public enum RuleConfigurationVersionOne Enabled, Disabled } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/RuleVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/RuleVersionOne.cs index dcc061e27..8db619a6f 100644 --- a/src/Sarif/VersionOne/Autogenerated/RuleVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/RuleVersionOne.cs @@ -188,4 +188,4 @@ private void Init(string id, string name, string shortDescription, string fullDe } } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/RuleVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/RuleVersionOneEqualityComparer.cs index d186f1cc9..8a5d17984 100644 --- a/src/Sarif/VersionOne/Autogenerated/RuleVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/RuleVersionOneEqualityComparer.cs @@ -181,4 +181,4 @@ public int GetHashCode(RuleVersionOne obj) return result; } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/RunVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/RunVersionOne.cs index bb7fa9ada..c0dd9fdc1 100644 --- a/src/Sarif/VersionOne/Autogenerated/RunVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/RunVersionOne.cs @@ -313,4 +313,4 @@ private void Init(ToolVersionOne tool, InvocationVersionOne invocation, IDiction } } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/RunVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/RunVersionOneEqualityComparer.cs index 1747f2095..387bd7ea9 100644 --- a/src/Sarif/VersionOne/Autogenerated/RunVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/RunVersionOneEqualityComparer.cs @@ -364,4 +364,4 @@ public int GetHashCode(RunVersionOne obj) return result; } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/SarifLogVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/SarifLogVersionOne.cs index 06b32a047..91fc655ba 100644 --- a/src/Sarif/VersionOne/Autogenerated/SarifLogVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/SarifLogVersionOne.cs @@ -137,4 +137,4 @@ private void Init(Uri schemaUri, SarifVersionVersionOne version, IEnumerable ToolVersionOne } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/SarifRewritingVisitorVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/SarifRewritingVisitorVersionOne.cs index 14ea2de84..28e84950c 100644 --- a/src/Sarif/VersionOne/Autogenerated/SarifRewritingVisitorVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/SarifRewritingVisitorVersionOne.cs @@ -487,4 +487,4 @@ public virtual ToolVersionOne VisitToolVersionOne(ToolVersionOne node) return node; } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/SarifVersionVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/SarifVersionVersionOne.cs index ce8923a4c..78e81c3e3 100644 --- a/src/Sarif/VersionOne/Autogenerated/SarifVersionVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/SarifVersionVersionOne.cs @@ -14,4 +14,4 @@ public enum SarifVersionVersionOne Unknown, OneZeroZero } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/StackFrameVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/StackFrameVersionOne.cs index 057c74a0e..598b14f5a 100644 --- a/src/Sarif/VersionOne/Autogenerated/StackFrameVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/StackFrameVersionOne.cs @@ -234,4 +234,4 @@ private void Init(string message, Uri uri, string uriBaseId, int line, int colum } } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/StackFrameVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/StackFrameVersionOneEqualityComparer.cs index fd9c92f07..5dee181bf 100644 --- a/src/Sarif/VersionOne/Autogenerated/StackFrameVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/StackFrameVersionOneEqualityComparer.cs @@ -204,4 +204,4 @@ public int GetHashCode(StackFrameVersionOne obj) return result; } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/StackVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/StackVersionOne.cs index 898f4c17c..f1ced11ed 100644 --- a/src/Sarif/VersionOne/Autogenerated/StackVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/StackVersionOne.cs @@ -137,4 +137,4 @@ private void Init(string message, IEnumerable frames, IDic } } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/StackVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/StackVersionOneEqualityComparer.cs index 362b78f4b..3d3d5ed59 100644 --- a/src/Sarif/VersionOne/Autogenerated/StackVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/StackVersionOneEqualityComparer.cs @@ -124,4 +124,4 @@ public int GetHashCode(StackVersionOne obj) return result; } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/SuppressionStatesVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/SuppressionStatesVersionOne.cs index 79d52ec03..7a5bf76a0 100644 --- a/src/Sarif/VersionOne/Autogenerated/SuppressionStatesVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/SuppressionStatesVersionOne.cs @@ -17,4 +17,4 @@ public enum SuppressionStatesVersionOne SuppressedInSource, SuppressedExternally } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/TaintKindVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/TaintKindVersionOne.cs index f92fe044e..140a81d6b 100644 --- a/src/Sarif/VersionOne/Autogenerated/TaintKindVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/TaintKindVersionOne.cs @@ -16,4 +16,4 @@ public enum TaintKindVersionOne Source, Sanitizer } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/ToolVersionOne.cs b/src/Sarif/VersionOne/Autogenerated/ToolVersionOne.cs index b0830c61b..076143638 100644 --- a/src/Sarif/VersionOne/Autogenerated/ToolVersionOne.cs +++ b/src/Sarif/VersionOne/Autogenerated/ToolVersionOne.cs @@ -170,4 +170,4 @@ private void Init(string name, string fullName, string version, string semanticV } } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Autogenerated/ToolVersionOneEqualityComparer.cs b/src/Sarif/VersionOne/Autogenerated/ToolVersionOneEqualityComparer.cs index 0b0a86cd2..2610f7018 100644 --- a/src/Sarif/VersionOne/Autogenerated/ToolVersionOneEqualityComparer.cs +++ b/src/Sarif/VersionOne/Autogenerated/ToolVersionOneEqualityComparer.cs @@ -151,4 +151,4 @@ public int GetHashCode(ToolVersionOne obj) return result; } } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Core/IPropertyBagHolderVersionOne.cs b/src/Sarif/VersionOne/Core/IPropertyBagHolderVersionOne.cs index 50e8eace5..5b1b21211 100644 --- a/src/Sarif/VersionOne/Core/IPropertyBagHolderVersionOne.cs +++ b/src/Sarif/VersionOne/Core/IPropertyBagHolderVersionOne.cs @@ -19,4 +19,4 @@ public interface IPropertyBagHolderVersionOne void SetPropertiesFrom(IPropertyBagHolderVersionOne other); void RemoveProperty(string propertyName); } -} \ No newline at end of file +} diff --git a/src/Sarif/VersionOne/Core/PropertyBagHolderVersionOne.cs b/src/Sarif/VersionOne/Core/PropertyBagHolderVersionOne.cs index dc7622434..8fb236092 100644 --- a/src/Sarif/VersionOne/Core/PropertyBagHolderVersionOne.cs +++ b/src/Sarif/VersionOne/Core/PropertyBagHolderVersionOne.cs @@ -6,7 +6,9 @@ using System.Diagnostics; using System.Globalization; using System.Linq; + using Microsoft.CodeAnalysis.Sarif.Readers; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.VersionOne diff --git a/src/Sarif/VersionOne/Readers/AnnotatedCodeLocationIdConverter.cs b/src/Sarif/VersionOne/Readers/AnnotatedCodeLocationIdConverter.cs index da75839ab..ca52b7d17 100644 --- a/src/Sarif/VersionOne/Readers/AnnotatedCodeLocationIdConverter.cs +++ b/src/Sarif/VersionOne/Readers/AnnotatedCodeLocationIdConverter.cs @@ -3,6 +3,7 @@ using System; using System.Globalization; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.VersionOne.Readers diff --git a/src/Sarif/VersionOne/Readers/SarifContractResolverVersionOne.cs b/src/Sarif/VersionOne/Readers/SarifContractResolverVersionOne.cs index 8de697f98..ec3045a6d 100644 --- a/src/Sarif/VersionOne/Readers/SarifContractResolverVersionOne.cs +++ b/src/Sarif/VersionOne/Readers/SarifContractResolverVersionOne.cs @@ -3,7 +3,9 @@ using System; using System.Collections.Generic; + using Microsoft.CodeAnalysis.Sarif.VersionOne; + using Newtonsoft.Json.Serialization; namespace Microsoft.CodeAnalysis.Sarif.Readers diff --git a/src/Sarif/VersionOne/SarifUtilitiesVersionOne.cs b/src/Sarif/VersionOne/SarifUtilitiesVersionOne.cs index 0946745cc..2839582b0 100644 --- a/src/Sarif/VersionOne/SarifUtilitiesVersionOne.cs +++ b/src/Sarif/VersionOne/SarifUtilitiesVersionOne.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; + using Microsoft.CodeAnalysis.Sarif.VersionOne; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Sarif/Visitors/PartitioningVisitor.cs b/src/Sarif/Visitors/PartitioningVisitor.cs index 739738ecd..3321145b1 100644 --- a/src/Sarif/Visitors/PartitioningVisitor.cs +++ b/src/Sarif/Visitors/PartitioningVisitor.cs @@ -490,4 +490,4 @@ public override Artifact VisitArtifact(Artifact node) } } } -} \ No newline at end of file +} diff --git a/src/Sarif/Visitors/SarifCurrentToVersionOneVisitor.cs b/src/Sarif/Visitors/SarifCurrentToVersionOneVisitor.cs index 6d5dc5fcf..21168da5e 100644 --- a/src/Sarif/Visitors/SarifCurrentToVersionOneVisitor.cs +++ b/src/Sarif/Visitors/SarifCurrentToVersionOneVisitor.cs @@ -7,8 +7,10 @@ using System.Linq; using System.Security; using System.Text; + using Microsoft.CodeAnalysis.Sarif.VersionOne; using Microsoft.CodeAnalysis.Sarif.Writers; + using Utilities = Microsoft.CodeAnalysis.Sarif.Visitors.SarifTransformerUtilities; namespace Microsoft.CodeAnalysis.Sarif.Visitors diff --git a/src/Sarif/Visitors/SarifTransformerUtilities.cs b/src/Sarif/Visitors/SarifTransformerUtilities.cs index 519e814ab..ae99d99fe 100644 --- a/src/Sarif/Visitors/SarifTransformerUtilities.cs +++ b/src/Sarif/Visitors/SarifTransformerUtilities.cs @@ -3,8 +3,10 @@ using System.Collections.Generic; using System.Globalization; + using Microsoft.CodeAnalysis.Sarif.Readers; using Microsoft.CodeAnalysis.Sarif.VersionOne; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.Visitors @@ -310,4 +312,4 @@ public static AnnotatedCodeLocationImportanceVersionOne CreateAnnotatedCodeLocat } } } -} \ No newline at end of file +} diff --git a/src/Sarif/Visitors/SarifVersionOneToCurrentVisitor.cs b/src/Sarif/Visitors/SarifVersionOneToCurrentVisitor.cs index 7ef6ae15c..6e39dede7 100644 --- a/src/Sarif/Visitors/SarifVersionOneToCurrentVisitor.cs +++ b/src/Sarif/Visitors/SarifVersionOneToCurrentVisitor.cs @@ -6,8 +6,10 @@ using System.Globalization; using System.Linq; using System.Text.RegularExpressions; + using Microsoft.CodeAnalysis.Sarif.VersionOne; using Microsoft.CodeAnalysis.Sarif.Writers; + using Utilities = Microsoft.CodeAnalysis.Sarif.Visitors.SarifTransformerUtilities; namespace Microsoft.CodeAnalysis.Sarif.Visitors diff --git a/src/Sarif/Visitors/UnknownEncodingException.cs b/src/Sarif/Visitors/UnknownEncodingException.cs index 32bb3b598..ebe5397ff 100644 --- a/src/Sarif/Visitors/UnknownEncodingException.cs +++ b/src/Sarif/Visitors/UnknownEncodingException.cs @@ -16,4 +16,4 @@ public UnknownEncodingException(string encodingName) EncodingName = encodingName; } } -} \ No newline at end of file +} diff --git a/src/Sarif/Visitors/UpdateIndicesFromLegacyDataVisitor.cs b/src/Sarif/Visitors/UpdateIndicesFromLegacyDataVisitor.cs index 9bb20bbd8..e839da046 100644 --- a/src/Sarif/Visitors/UpdateIndicesFromLegacyDataVisitor.cs +++ b/src/Sarif/Visitors/UpdateIndicesFromLegacyDataVisitor.cs @@ -89,4 +89,4 @@ public override ArtifactLocation VisitArtifactLocation(ArtifactLocation node) return base.VisitArtifactLocation(node); } } -} \ No newline at end of file +} diff --git a/src/Sarif/Visitors/VersionOneLogicalLocationKeyToLogicalLocationDataVisitor.cs b/src/Sarif/Visitors/VersionOneLogicalLocationKeyToLogicalLocationDataVisitor.cs index 2e02f25a8..a111ba4f3 100644 --- a/src/Sarif/Visitors/VersionOneLogicalLocationKeyToLogicalLocationDataVisitor.cs +++ b/src/Sarif/Visitors/VersionOneLogicalLocationKeyToLogicalLocationDataVisitor.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; + using Microsoft.CodeAnalysis.Sarif.VersionOne; namespace Microsoft.CodeAnalysis.Sarif.Visitors diff --git a/src/Sarif/Warnings.cs b/src/Sarif/Warnings.cs index ee22e217c..d0e36baac 100644 --- a/src/Sarif/Warnings.cs +++ b/src/Sarif/Warnings.cs @@ -123,4 +123,4 @@ public static void LogRuleExplicitlyDisabled(IAnalysisContext context, string ru context.RuntimeErrors |= RuntimeConditions.RuleWasExplicitlyDisabled; } } -} \ No newline at end of file +} diff --git a/src/Sarif/Writers/PrereleaseCompatibilityTransformer.cs b/src/Sarif/Writers/PrereleaseCompatibilityTransformer.cs index 4684761db..375e719de 100644 --- a/src/Sarif/Writers/PrereleaseCompatibilityTransformer.cs +++ b/src/Sarif/Writers/PrereleaseCompatibilityTransformer.cs @@ -2,8 +2,10 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Collections.Generic; + using Microsoft.CodeAnalysis.Sarif.VersionOne; using Microsoft.CodeAnalysis.Sarif.Visitors; + using Newtonsoft.Json; using Newtonsoft.Json.Linq; @@ -2690,4 +2692,4 @@ private static void SplitCurrentNodeNameAndRemainingLeafNodePath(string fullPath } } } -} \ No newline at end of file +} diff --git a/src/Sarif/Writers/ResultLogJsonWriter.cs b/src/Sarif/Writers/ResultLogJsonWriter.cs index 73071fbb7..a5e0ab0fc 100644 --- a/src/Sarif/Writers/ResultLogJsonWriter.cs +++ b/src/Sarif/Writers/ResultLogJsonWriter.cs @@ -5,6 +5,7 @@ using System.Collections.Generic; using System.Globalization; using System.Linq; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.Writers @@ -258,7 +259,7 @@ public void WriteResults(IEnumerable results) { OpenResults(); } - } + } } public void CloseResults() diff --git a/src/Sarif/Writers/SarifLogger.cs b/src/Sarif/Writers/SarifLogger.cs index 345b8608d..dee791303 100644 --- a/src/Sarif/Writers/SarifLogger.cs +++ b/src/Sarif/Writers/SarifLogger.cs @@ -7,6 +7,7 @@ using System.IO; using System.Linq; using System.Text; + using Microsoft.CodeAnalysis.Sarif.Readers; using Microsoft.CodeAnalysis.Sarif.Visitors; @@ -576,4 +577,4 @@ private static Uri Redact(Uri uri, IEnumerable tokensToRedact) return new Uri(uriText, UriKind.RelativeOrAbsolute); } } -} \ No newline at end of file +} diff --git a/src/Sarif/Writers/SarifOneZeroZeroLogger.cs b/src/Sarif/Writers/SarifOneZeroZeroLogger.cs index 71f645b51..859b3f441 100644 --- a/src/Sarif/Writers/SarifOneZeroZeroLogger.cs +++ b/src/Sarif/Writers/SarifOneZeroZeroLogger.cs @@ -3,8 +3,10 @@ using System.Collections.Generic; using System.IO; + using Microsoft.CodeAnalysis.Sarif.Readers; using Microsoft.CodeAnalysis.Sarif.Visitors; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.Writers diff --git a/src/Sarif/Writers/SarifPartitioner.cs b/src/Sarif/Writers/SarifPartitioner.cs index 243539c58..5a623fa36 100644 --- a/src/Sarif/Writers/SarifPartitioner.cs +++ b/src/Sarif/Writers/SarifPartitioner.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; + using Microsoft.CodeAnalysis.Sarif.Visitors; namespace Microsoft.CodeAnalysis.Sarif.Writers diff --git a/src/Test.EndToEnd.Baselining/BaseliningDetailLogger.cs b/src/Test.EndToEnd.Baselining/BaseliningDetailLogger.cs index 39872fd2c..d233971d7 100644 --- a/src/Test.EndToEnd.Baselining/BaseliningDetailLogger.cs +++ b/src/Test.EndToEnd.Baselining/BaseliningDetailLogger.cs @@ -48,7 +48,7 @@ private static string RelativeSeriesPath(string seriesPath) public void Write(SarifLog newBaselineLog, SarifLog baselineLog, BaseliningSummary summary) { Dictionary baselineResultsByGuid = new Dictionary(); - foreach(Result result in baselineLog.EnumerateResults()) + foreach (Result result in baselineLog.EnumerateResults()) { baselineResultsByGuid[result.CorrelationGuid ?? result.Guid] = result; } diff --git a/src/Test.EndToEnd.Baselining/Extensions/ResultTextFormatter.cs b/src/Test.EndToEnd.Baselining/Extensions/ResultTextFormatter.cs index 82c106309..c1382ed37 100644 --- a/src/Test.EndToEnd.Baselining/Extensions/ResultTextFormatter.cs +++ b/src/Test.EndToEnd.Baselining/Extensions/ResultTextFormatter.cs @@ -42,7 +42,7 @@ public static string Snippet(this Result result, int lengthLimit = -1) { string value = result?.EnumeratePhysicalLocations().FirstOrDefault()?.Region?.Snippet?.Text ?? ""; value = value.Replace("\n", "").Replace("\r", "").TrimStart(); - + if (lengthLimit > 0 && value.Length > lengthLimit) { value = value.Substring(0, lengthLimit); } return value; } diff --git a/src/Test.EndToEnd.Baselining/Program.cs b/src/Test.EndToEnd.Baselining/Program.cs index 5e8082681..5a58ed4bd 100644 --- a/src/Test.EndToEnd.Baselining/Program.cs +++ b/src/Test.EndToEnd.Baselining/Program.cs @@ -104,7 +104,7 @@ private static int Run(RunOptions options) { BaseliningTester tester = new BaseliningTester(); BaseliningSummary overallSummary = tester.RunAll(options.TestRootPath); - + return 0; } @@ -124,4 +124,4 @@ private static int CreateDebugLogs(RebuildDebugLogsOptions options) return 0; } } -} \ No newline at end of file +} diff --git a/src/Test.FunctionalTests.Sarif/DefaultObjectPopulatingVisitor.cs b/src/Test.FunctionalTests.Sarif/DefaultObjectPopulatingVisitor.cs index 712e1ad82..bf7612bfb 100644 --- a/src/Test.FunctionalTests.Sarif/DefaultObjectPopulatingVisitor.cs +++ b/src/Test.FunctionalTests.Sarif/DefaultObjectPopulatingVisitor.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.Reflection; + using Microsoft.Json.Schema; namespace Microsoft.CodeAnalysis.Sarif @@ -491,4 +492,4 @@ private string GetPropertyFormatPattern(string objectTypeName, string propertyNa return propertySchema.Properties.ContainsKey(jsonPropertyName) ? propertySchema.Properties[jsonPropertyName].Pattern : null; } } -} \ No newline at end of file +} diff --git a/src/Test.FunctionalTests.Sarif/Multitool/ValidateCommandTests.cs b/src/Test.FunctionalTests.Sarif/Multitool/ValidateCommandTests.cs index ef4cf34cb..d11d9a36d 100644 --- a/src/Test.FunctionalTests.Sarif/Multitool/ValidateCommandTests.cs +++ b/src/Test.FunctionalTests.Sarif/Multitool/ValidateCommandTests.cs @@ -414,7 +414,7 @@ private void RunArrayLimitTest(string testFileNameSuffix) private void RunValidTestForRule(string ruleId) => RunTestForRule(ruleId, ValidTestFileNameSuffix); - + private void RunInvalidTestForRule(string ruleId) => RunTestForRule(ruleId, InvalidTestFileNameSuffix); @@ -594,7 +594,7 @@ private IList GetValidationRules() // Select one rule arbitrarily, find out what assembly it's in, and get all the other // rules from that assembly. Assembly validationRuleAssembly = typeof(RuleIdentifiersMustBeValid).Assembly; - + return CompositionUtilities.GetExports( new Assembly[] { diff --git a/src/Test.FunctionalTests.Sarif/MultitoolCommandLineTests.cs b/src/Test.FunctionalTests.Sarif/MultitoolCommandLineTests.cs index 5ba2956d0..7adc97115 100644 --- a/src/Test.FunctionalTests.Sarif/MultitoolCommandLineTests.cs +++ b/src/Test.FunctionalTests.Sarif/MultitoolCommandLineTests.cs @@ -3,7 +3,9 @@ using System.Diagnostics; using System.IO; + using FluentAssertions; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Test.FunctionalTests.Sarif/PropertyBagConverterTests.cs b/src/Test.FunctionalTests.Sarif/PropertyBagConverterTests.cs index 47c13f4fc..8549ce47b 100644 --- a/src/Test.FunctionalTests.Sarif/PropertyBagConverterTests.cs +++ b/src/Test.FunctionalTests.Sarif/PropertyBagConverterTests.cs @@ -3,8 +3,11 @@ using System; using System.Collections.Generic; + using FluentAssertions; + using Newtonsoft.Json; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Test.FunctionalTests.Sarif/SarifConverterTests.cs b/src/Test.FunctionalTests.Sarif/SarifConverterTests.cs index d780fe6ed..0b5380568 100644 --- a/src/Test.FunctionalTests.Sarif/SarifConverterTests.cs +++ b/src/Test.FunctionalTests.Sarif/SarifConverterTests.cs @@ -7,9 +7,12 @@ using System.Text; using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif.Visitors; using Microsoft.CodeAnalysis.Sarif.Writers; + using Newtonsoft.Json; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Converters diff --git a/src/Test.FunctionalTests.Sarif/SarifLogEqualityComparerTests.cs b/src/Test.FunctionalTests.Sarif/SarifLogEqualityComparerTests.cs index ee8bff03a..a388c1c87 100644 --- a/src/Test.FunctionalTests.Sarif/SarifLogEqualityComparerTests.cs +++ b/src/Test.FunctionalTests.Sarif/SarifLogEqualityComparerTests.cs @@ -2,9 +2,13 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.IO; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif.Writers; + using Newtonsoft.Json; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Test.FunctionalTests.Sarif/SarifValidatorTests.cs b/src/Test.FunctionalTests.Sarif/SarifValidatorTests.cs index ce6160bca..73473fcf1 100644 --- a/src/Test.FunctionalTests.Sarif/SarifValidatorTests.cs +++ b/src/Test.FunctionalTests.Sarif/SarifValidatorTests.cs @@ -6,12 +6,16 @@ using System.IO; using System.Linq; using System.Text; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif.Writers; using Microsoft.Json.Schema; using Microsoft.Json.Schema.Validation; + using Newtonsoft.Json; using Newtonsoft.Json.Linq; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Test.FunctionalTests.Sarif/Writers/FilterByPredicateTests.cs b/src/Test.FunctionalTests.Sarif/Writers/FilterByPredicateTests.cs index a991d76eb..5821fa34f 100644 --- a/src/Test.FunctionalTests.Sarif/Writers/FilterByPredicateTests.cs +++ b/src/Test.FunctionalTests.Sarif/Writers/FilterByPredicateTests.cs @@ -2,9 +2,12 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; + using Microsoft.CodeAnalysis.Sarif.Visitors; using Microsoft.CodeAnalysis.Test.Utilities.Sarif; + using Newtonsoft.Json; + using Xunit; using Xunit.Abstractions; diff --git a/src/Test.FunctionalTests.Sarif/Writers/PartitionTests.cs b/src/Test.FunctionalTests.Sarif/Writers/PartitionTests.cs index f34f11541..c7a9cf97f 100644 --- a/src/Test.FunctionalTests.Sarif/Writers/PartitionTests.cs +++ b/src/Test.FunctionalTests.Sarif/Writers/PartitionTests.cs @@ -3,9 +3,13 @@ using System.Collections.Generic; using System.Linq; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif.Visitors; + using Newtonsoft.Json; + using Xunit; using Xunit.Abstractions; diff --git a/src/Test.FunctionalTests.Sarif/v2/ConverterTestData/FortifyFpr/src/ContentFileViewModel.cs b/src/Test.FunctionalTests.Sarif/v2/ConverterTestData/FortifyFpr/src/ContentFileViewModel.cs index 0fbf83f6e..14bc05a40 100644 --- a/src/Test.FunctionalTests.Sarif/v2/ConverterTestData/FortifyFpr/src/ContentFileViewModel.cs +++ b/src/Test.FunctionalTests.Sarif/v2/ConverterTestData/FortifyFpr/src/ContentFileViewModel.cs @@ -14,4 +14,4 @@ public class ContentFileViewModel : BaseViewModel public DateTime ExpiryDate { get; set; } #endregion } -} \ No newline at end of file +} diff --git a/src/Test.FunctionalTests.Sarif/v2/ConverterTestData/FortifyFpr/src/Controllers/ContentFileHandlingController.cs b/src/Test.FunctionalTests.Sarif/v2/ConverterTestData/FortifyFpr/src/Controllers/ContentFileHandlingController.cs index 6a6dd9c68..49bc8de92 100644 --- a/src/Test.FunctionalTests.Sarif/v2/ConverterTestData/FortifyFpr/src/Controllers/ContentFileHandlingController.cs +++ b/src/Test.FunctionalTests.Sarif/v2/ConverterTestData/FortifyFpr/src/Controllers/ContentFileHandlingController.cs @@ -41,4 +41,4 @@ public void SomeMethod() System.IO.MemoryStream streamPackage = new System.IO.MemoryStream(); } } -} \ No newline at end of file +} diff --git a/src/Test.FunctionalTests.Sarif/v2/ConverterTestData/FortifyFpr/src/DocumentValidator.cs b/src/Test.FunctionalTests.Sarif/v2/ConverterTestData/FortifyFpr/src/DocumentValidator.cs index 15ece6f60..f009527bf 100644 --- a/src/Test.FunctionalTests.Sarif/v2/ConverterTestData/FortifyFpr/src/DocumentValidator.cs +++ b/src/Test.FunctionalTests.Sarif/v2/ConverterTestData/FortifyFpr/src/DocumentValidator.cs @@ -18,4 +18,4 @@ private void IsDocumentValid() } } -} \ No newline at end of file +} diff --git a/src/Test.Plugins/TestWorkItemModelTransformer.cs b/src/Test.Plugins/TestWorkItemModelTransformer.cs index 8b2dc495e..a6afd57c4 100644 --- a/src/Test.Plugins/TestWorkItemModelTransformer.cs +++ b/src/Test.Plugins/TestWorkItemModelTransformer.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; + using Microsoft.CodeAnalysis.Sarif; using Microsoft.CodeAnalysis.Sarif.WorkItems; diff --git a/src/Test.UnitTests.Sarif.Converters/AndroidStudioConverterTests.cs b/src/Test.UnitTests.Sarif.Converters/AndroidStudioConverterTests.cs index 8a1a71527..a8b79ffa4 100644 --- a/src/Test.UnitTests.Sarif.Converters/AndroidStudioConverterTests.cs +++ b/src/Test.UnitTests.Sarif.Converters/AndroidStudioConverterTests.cs @@ -7,9 +7,11 @@ using System.IO; using System.Linq; using System.Xml; + using FluentAssertions; using Microsoft.CodeAnalysis.Sarif.Writers; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Converters diff --git a/src/Test.UnitTests.Sarif.Converters/AndroidStudioProblemTests.cs b/src/Test.UnitTests.Sarif.Converters/AndroidStudioProblemTests.cs index dd03d3acb..8422fc266 100644 --- a/src/Test.UnitTests.Sarif.Converters/AndroidStudioProblemTests.cs +++ b/src/Test.UnitTests.Sarif.Converters/AndroidStudioProblemTests.cs @@ -7,8 +7,11 @@ using System.Linq; using System.Xml; using System.Xml.Linq; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif.Driver; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Converters diff --git a/src/Test.UnitTests.Sarif.Converters/AndroidStudioStringsTests.cs b/src/Test.UnitTests.Sarif.Converters/AndroidStudioStringsTests.cs index 549cbcb64..474b735ed 100644 --- a/src/Test.UnitTests.Sarif.Converters/AndroidStudioStringsTests.cs +++ b/src/Test.UnitTests.Sarif.Converters/AndroidStudioStringsTests.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Xml; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Converters diff --git a/src/Test.UnitTests.Sarif.Converters/BuiltinConverterFactoryTests.cs b/src/Test.UnitTests.Sarif.Converters/BuiltinConverterFactoryTests.cs index c023826b6..dd008daba 100644 --- a/src/Test.UnitTests.Sarif.Converters/BuiltinConverterFactoryTests.cs +++ b/src/Test.UnitTests.Sarif.Converters/BuiltinConverterFactoryTests.cs @@ -4,7 +4,9 @@ using System; using System.Collections.Generic; using System.Linq; + using Microsoft.CodeAnalysis.Sarif.Converters; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Test.UnitTests.Sarif.Converters/ClangAnalyzerConverterTests.cs b/src/Test.UnitTests.Sarif.Converters/ClangAnalyzerConverterTests.cs index cf0a9ad11..f21285684 100644 --- a/src/Test.UnitTests.Sarif.Converters/ClangAnalyzerConverterTests.cs +++ b/src/Test.UnitTests.Sarif.Converters/ClangAnalyzerConverterTests.cs @@ -3,7 +3,9 @@ using System; using System.IO; + using Microsoft.CodeAnalysis.Sarif.Writers; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Converters diff --git a/src/Test.UnitTests.Sarif.Converters/ConverterTestsBase.cs b/src/Test.UnitTests.Sarif.Converters/ConverterTestsBase.cs index 502a04f7c..41cc44362 100644 --- a/src/Test.UnitTests.Sarif.Converters/ConverterTestsBase.cs +++ b/src/Test.UnitTests.Sarif.Converters/ConverterTestsBase.cs @@ -2,10 +2,12 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; + using FluentAssertions; using Microsoft.CodeAnalysis.Sarif.Converters; using Microsoft.CodeAnalysis.Sarif.Writers; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Test.UnitTests.Sarif.Converters/CppCheckConverterTests.cs b/src/Test.UnitTests.Sarif.Converters/CppCheckConverterTests.cs index dfd701a9b..81b186ac1 100644 --- a/src/Test.UnitTests.Sarif.Converters/CppCheckConverterTests.cs +++ b/src/Test.UnitTests.Sarif.Converters/CppCheckConverterTests.cs @@ -4,8 +4,11 @@ using System; using System.IO; using System.Xml; + using Microsoft.CodeAnalysis.Sarif.Writers; + using Newtonsoft.Json; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Converters diff --git a/src/Test.UnitTests.Sarif.Converters/CppCheckErrorTests.cs b/src/Test.UnitTests.Sarif.Converters/CppCheckErrorTests.cs index dc22e3e5a..0581f6a5f 100644 --- a/src/Test.UnitTests.Sarif.Converters/CppCheckErrorTests.cs +++ b/src/Test.UnitTests.Sarif.Converters/CppCheckErrorTests.cs @@ -5,7 +5,9 @@ using System.Collections.Immutable; using System.Linq; using System.Xml; + using FluentAssertions; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Converters diff --git a/src/Test.UnitTests.Sarif.Converters/CppCheckLocationTests.cs b/src/Test.UnitTests.Sarif.Converters/CppCheckLocationTests.cs index cef72f948..da79b69f7 100644 --- a/src/Test.UnitTests.Sarif.Converters/CppCheckLocationTests.cs +++ b/src/Test.UnitTests.Sarif.Converters/CppCheckLocationTests.cs @@ -3,7 +3,9 @@ using System; using System.Xml; + using FluentAssertions; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Converters diff --git a/src/Test.UnitTests.Sarif.Converters/CppCheckStringsTests.cs b/src/Test.UnitTests.Sarif.Converters/CppCheckStringsTests.cs index 2c4e260b5..ebc2e9c2a 100644 --- a/src/Test.UnitTests.Sarif.Converters/CppCheckStringsTests.cs +++ b/src/Test.UnitTests.Sarif.Converters/CppCheckStringsTests.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Xml; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Converters diff --git a/src/Test.UnitTests.Sarif.Converters/FlawFinderCsvConverterTests.cs b/src/Test.UnitTests.Sarif.Converters/FlawFinderCsvConverterTests.cs index 3dbaf4059..c9b5cc9b9 100644 --- a/src/Test.UnitTests.Sarif.Converters/FlawFinderCsvConverterTests.cs +++ b/src/Test.UnitTests.Sarif.Converters/FlawFinderCsvConverterTests.cs @@ -3,10 +3,14 @@ using System; using System.IO; + using CsvHelper; using CsvHelper.TypeConversion; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif.Writers; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Converters diff --git a/src/Test.UnitTests.Sarif.Converters/FortifyConverterTests.cs b/src/Test.UnitTests.Sarif.Converters/FortifyConverterTests.cs index 3327a465f..d5e4c02df 100644 --- a/src/Test.UnitTests.Sarif.Converters/FortifyConverterTests.cs +++ b/src/Test.UnitTests.Sarif.Converters/FortifyConverterTests.cs @@ -6,7 +6,9 @@ using System.Collections.Immutable; using System.IO; using System.Linq; + using FluentAssertions; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Converters diff --git a/src/Test.UnitTests.Sarif.Converters/FortifyFprConverterTests.cs b/src/Test.UnitTests.Sarif.Converters/FortifyFprConverterTests.cs index b55fb5604..2460924f2 100644 --- a/src/Test.UnitTests.Sarif.Converters/FortifyFprConverterTests.cs +++ b/src/Test.UnitTests.Sarif.Converters/FortifyFprConverterTests.cs @@ -2,7 +2,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; + using FluentAssertions; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Converters diff --git a/src/Test.UnitTests.Sarif.Converters/FortifyFprStringsTests.cs b/src/Test.UnitTests.Sarif.Converters/FortifyFprStringsTests.cs index 54050e2d7..020b5ccf3 100644 --- a/src/Test.UnitTests.Sarif.Converters/FortifyFprStringsTests.cs +++ b/src/Test.UnitTests.Sarif.Converters/FortifyFprStringsTests.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Xml; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Converters diff --git a/src/Test.UnitTests.Sarif.Converters/FortifyIssueTests.cs b/src/Test.UnitTests.Sarif.Converters/FortifyIssueTests.cs index 8ebe79c1b..af4a6a83b 100644 --- a/src/Test.UnitTests.Sarif.Converters/FortifyIssueTests.cs +++ b/src/Test.UnitTests.Sarif.Converters/FortifyIssueTests.cs @@ -5,7 +5,9 @@ using System.Collections.Immutable; using System.Xml; using System.Xml.Linq; + using FluentAssertions; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Converters diff --git a/src/Test.UnitTests.Sarif.Converters/FortifyPathElementTests.cs b/src/Test.UnitTests.Sarif.Converters/FortifyPathElementTests.cs index 9b41d0034..12c9a4681 100644 --- a/src/Test.UnitTests.Sarif.Converters/FortifyPathElementTests.cs +++ b/src/Test.UnitTests.Sarif.Converters/FortifyPathElementTests.cs @@ -3,6 +3,7 @@ using System; using System.Xml; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Converters diff --git a/src/Test.UnitTests.Sarif.Converters/FortifyStringsTests.cs b/src/Test.UnitTests.Sarif.Converters/FortifyStringsTests.cs index 3cf17a470..a9d2ac5de 100644 --- a/src/Test.UnitTests.Sarif.Converters/FortifyStringsTests.cs +++ b/src/Test.UnitTests.Sarif.Converters/FortifyStringsTests.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Xml; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Converters diff --git a/src/Test.UnitTests.Sarif.Converters/FxCopConverterTests.cs b/src/Test.UnitTests.Sarif.Converters/FxCopConverterTests.cs index ed4f26ace..fcc4356f8 100644 --- a/src/Test.UnitTests.Sarif.Converters/FxCopConverterTests.cs +++ b/src/Test.UnitTests.Sarif.Converters/FxCopConverterTests.cs @@ -6,7 +6,9 @@ using System.IO; using System.Linq; using System.Xml; + using FluentAssertions; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Converters diff --git a/src/Test.UnitTests.Sarif.Converters/PylintConverterTests.cs b/src/Test.UnitTests.Sarif.Converters/PylintConverterTests.cs index 04e4bdd59..f870e15d3 100644 --- a/src/Test.UnitTests.Sarif.Converters/PylintConverterTests.cs +++ b/src/Test.UnitTests.Sarif.Converters/PylintConverterTests.cs @@ -5,11 +5,15 @@ using System.Collections.Generic; using System.IO; using System.Text; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif; using Microsoft.CodeAnalysis.Sarif.Converters; using Microsoft.CodeAnalysis.Sarif.Converters.PylintObjectModel; + using Moq; + using Xunit; namespace Sarif.Converters.UnitTests diff --git a/src/Test.UnitTests.Sarif.Converters/TSLintConverterTests.cs b/src/Test.UnitTests.Sarif.Converters/TSLintConverterTests.cs index 97a40d6d9..e46d40599 100644 --- a/src/Test.UnitTests.Sarif.Converters/TSLintConverterTests.cs +++ b/src/Test.UnitTests.Sarif.Converters/TSLintConverterTests.cs @@ -5,9 +5,13 @@ using System.Collections.Generic; using System.IO; using System.Text; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif.Converters.TSLintObjectModel; + using Moq; + using Xunit; diff --git a/src/Test.UnitTests.Sarif.Converters/TSLintLogReaderTests.cs b/src/Test.UnitTests.Sarif.Converters/TSLintLogReaderTests.cs index 05788b7fe..56b2f593c 100644 --- a/src/Test.UnitTests.Sarif.Converters/TSLintLogReaderTests.cs +++ b/src/Test.UnitTests.Sarif.Converters/TSLintLogReaderTests.cs @@ -4,9 +4,13 @@ using System; using System.Collections.Generic; using System.IO; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif.Converters.TSLintObjectModel; + using Newtonsoft.Json.Linq; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Converters diff --git a/src/Test.UnitTests.Sarif.Converters/ToolFileConverterBaseTests.cs b/src/Test.UnitTests.Sarif.Converters/ToolFileConverterBaseTests.cs index b9d711b55..2ab1a7c62 100644 --- a/src/Test.UnitTests.Sarif.Converters/ToolFileConverterBaseTests.cs +++ b/src/Test.UnitTests.Sarif.Converters/ToolFileConverterBaseTests.cs @@ -3,7 +3,9 @@ using System; using System.IO; + using FluentAssertions; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Converters diff --git a/src/Test.UnitTests.Sarif.Converters/ToolFormatConverterTests.cs b/src/Test.UnitTests.Sarif.Converters/ToolFormatConverterTests.cs index d844cbff5..f246a75b1 100644 --- a/src/Test.UnitTests.Sarif.Converters/ToolFormatConverterTests.cs +++ b/src/Test.UnitTests.Sarif.Converters/ToolFormatConverterTests.cs @@ -6,10 +6,13 @@ using System.IO; using System.Reflection; using System.Text; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif.Converters; using Microsoft.CodeAnalysis.Sarif.Driver; using Microsoft.CodeAnalysis.Sarif.Writers; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Test.UnitTests.Sarif.Driver/DriverExtensionMethodsTests.cs b/src/Test.UnitTests.Sarif.Driver/DriverExtensionMethodsTests.cs index 41229e97c..f8f472692 100644 --- a/src/Test.UnitTests.Sarif.Driver/DriverExtensionMethodsTests.cs +++ b/src/Test.UnitTests.Sarif.Driver/DriverExtensionMethodsTests.cs @@ -3,8 +3,11 @@ using System.Collections.Generic; using System.Collections.ObjectModel; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif.Writers; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Driver diff --git a/src/Test.UnitTests.Sarif.Driver/DriverUtilitiesTests.cs b/src/Test.UnitTests.Sarif.Driver/DriverUtilitiesTests.cs index 9b02f41ce..a110d32db 100644 --- a/src/Test.UnitTests.Sarif.Driver/DriverUtilitiesTests.cs +++ b/src/Test.UnitTests.Sarif.Driver/DriverUtilitiesTests.cs @@ -2,8 +2,11 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; + using CommandLine; + using FluentAssertions; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Driver diff --git a/src/Test.UnitTests.Sarif.Driver/FileSpecifierTests.cs b/src/Test.UnitTests.Sarif.Driver/FileSpecifierTests.cs index 0ef0d672f..1607d2877 100644 --- a/src/Test.UnitTests.Sarif.Driver/FileSpecifierTests.cs +++ b/src/Test.UnitTests.Sarif.Driver/FileSpecifierTests.cs @@ -3,7 +3,9 @@ using System; using System.IO; + using FluentAssertions; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Driver diff --git a/src/Test.UnitTests.Sarif.Driver/FunctionlessTestRule.cs b/src/Test.UnitTests.Sarif.Driver/FunctionlessTestRule.cs index 52a840ab2..f7ef2d88b 100644 --- a/src/Test.UnitTests.Sarif.Driver/FunctionlessTestRule.cs +++ b/src/Test.UnitTests.Sarif.Driver/FunctionlessTestRule.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using System.Composition; using System.Resources; + using Microsoft.CodeAnalysis.Sarif.Driver; using Microsoft.CodeAnalysis.Test.UnitTests.Sarif.Driver.Sdk; diff --git a/src/Test.UnitTests.Sarif.Driver/Sdk/AnalyzeCommandBaseTests.cs b/src/Test.UnitTests.Sarif.Driver/Sdk/AnalyzeCommandBaseTests.cs index e31d701c4..ea28c9286 100644 --- a/src/Test.UnitTests.Sarif.Driver/Sdk/AnalyzeCommandBaseTests.cs +++ b/src/Test.UnitTests.Sarif.Driver/Sdk/AnalyzeCommandBaseTests.cs @@ -7,13 +7,18 @@ using System.Linq; using System.Reflection; using System.Text; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif.Converters; using Microsoft.CodeAnalysis.Sarif.Readers; using Microsoft.CodeAnalysis.Sarif.VersionOne; using Microsoft.CodeAnalysis.Sarif.Writers; + using Moq; + using Newtonsoft.Json; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Driver @@ -1196,4 +1201,4 @@ public IFileSystem FileSystem } #endregion ResultsCachingTestsAndHelpers } -} \ No newline at end of file +} diff --git a/src/Test.UnitTests.Sarif.Driver/Sdk/DriverSdkExtensionsTests.cs b/src/Test.UnitTests.Sarif.Driver/Sdk/DriverSdkExtensionsTests.cs index 6a0f7e935..051459e44 100644 --- a/src/Test.UnitTests.Sarif.Driver/Sdk/DriverSdkExtensionsTests.cs +++ b/src/Test.UnitTests.Sarif.Driver/Sdk/DriverSdkExtensionsTests.cs @@ -4,8 +4,11 @@ using System; using System.Collections.Generic; using System.Linq; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif.Driver.Sdk; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Driver diff --git a/src/Test.UnitTests.Sarif.Driver/Sdk/EntryPointUtilitiesTests.cs b/src/Test.UnitTests.Sarif.Driver/Sdk/EntryPointUtilitiesTests.cs index 51a9362eb..9a6cebc38 100644 --- a/src/Test.UnitTests.Sarif.Driver/Sdk/EntryPointUtilitiesTests.cs +++ b/src/Test.UnitTests.Sarif.Driver/Sdk/EntryPointUtilitiesTests.cs @@ -7,6 +7,7 @@ using System.IO; using FluentAssertions; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Driver diff --git a/src/Test.UnitTests.Sarif.Driver/Sdk/ExportConfigurationCommandBaseTests.cs b/src/Test.UnitTests.Sarif.Driver/Sdk/ExportConfigurationCommandBaseTests.cs index 0e9deb428..e8d9f6020 100644 --- a/src/Test.UnitTests.Sarif.Driver/Sdk/ExportConfigurationCommandBaseTests.cs +++ b/src/Test.UnitTests.Sarif.Driver/Sdk/ExportConfigurationCommandBaseTests.cs @@ -6,6 +6,7 @@ using System.Reflection; using FluentAssertions; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Driver diff --git a/src/Test.UnitTests.Sarif.Driver/Sdk/FormatForVisualStudioTests.cs b/src/Test.UnitTests.Sarif.Driver/Sdk/FormatForVisualStudioTests.cs index 5b2da8a1c..b90c5793e 100644 --- a/src/Test.UnitTests.Sarif.Driver/Sdk/FormatForVisualStudioTests.cs +++ b/src/Test.UnitTests.Sarif.Driver/Sdk/FormatForVisualStudioTests.cs @@ -3,8 +3,11 @@ using System; using System.Collections.Generic; + using FluentAssertions; + using Microsoft.CodeAnalysis.Test.Utilities.Sarif; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Driver diff --git a/src/Test.UnitTests.Sarif.Driver/Sdk/RuleUtilitiesTests.cs b/src/Test.UnitTests.Sarif.Driver/Sdk/RuleUtilitiesTests.cs index 3ed052883..19c6359df 100644 --- a/src/Test.UnitTests.Sarif.Driver/Sdk/RuleUtilitiesTests.cs +++ b/src/Test.UnitTests.Sarif.Driver/Sdk/RuleUtilitiesTests.cs @@ -2,7 +2,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; + using FluentAssertions; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Driver diff --git a/src/Test.UnitTests.Sarif.Driver/Sdk/SarifLoggerTests.cs b/src/Test.UnitTests.Sarif.Driver/Sdk/SarifLoggerTests.cs index 8de2c4d92..f6796dcd1 100644 --- a/src/Test.UnitTests.Sarif.Driver/Sdk/SarifLoggerTests.cs +++ b/src/Test.UnitTests.Sarif.Driver/Sdk/SarifLoggerTests.cs @@ -3,8 +3,11 @@ using System.IO; using System.Linq; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif.Writers; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Driver diff --git a/src/Test.UnitTests.Sarif.Driver/Sdk/SkimmerBaseTests.cs b/src/Test.UnitTests.Sarif.Driver/Sdk/SkimmerBaseTests.cs index 56cfb133e..698afc345 100644 --- a/src/Test.UnitTests.Sarif.Driver/Sdk/SkimmerBaseTests.cs +++ b/src/Test.UnitTests.Sarif.Driver/Sdk/SkimmerBaseTests.cs @@ -2,8 +2,11 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Linq; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif; + using Xunit; namespace Microsoft.CodeAnalysis.Test.UnitTests.Sarif.Driver.Sdk diff --git a/src/Test.UnitTests.Sarif.Driver/Sdk/TestSkimmerBase.cs b/src/Test.UnitTests.Sarif.Driver/Sdk/TestSkimmerBase.cs index 1c1612f57..c41bfd281 100644 --- a/src/Test.UnitTests.Sarif.Driver/Sdk/TestSkimmerBase.cs +++ b/src/Test.UnitTests.Sarif.Driver/Sdk/TestSkimmerBase.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.Resources; + using Microsoft.CodeAnalysis.Sarif; using Microsoft.CodeAnalysis.Sarif.Driver; diff --git a/src/Test.UnitTests.Sarif.Driver/SkimmerIdComparerTests.cs b/src/Test.UnitTests.Sarif.Driver/SkimmerIdComparerTests.cs index a7b6ed2da..ed207cfa4 100644 --- a/src/Test.UnitTests.Sarif.Driver/SkimmerIdComparerTests.cs +++ b/src/Test.UnitTests.Sarif.Driver/SkimmerIdComparerTests.cs @@ -2,7 +2,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Collections.Generic; + using FluentAssertions; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Driver diff --git a/src/Test.UnitTests.Sarif.Driver/TestRule.cs b/src/Test.UnitTests.Sarif.Driver/TestRule.cs index 96ec75720..15d3142d1 100644 --- a/src/Test.UnitTests.Sarif.Driver/TestRule.cs +++ b/src/Test.UnitTests.Sarif.Driver/TestRule.cs @@ -6,7 +6,9 @@ using System.Composition; using System.IO; using System.Resources; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif.Driver; using Microsoft.CodeAnalysis.Test.UnitTests.Sarif.Driver.Sdk; diff --git a/src/Test.UnitTests.Sarif.Driver/TestRuleBehaviors.cs b/src/Test.UnitTests.Sarif.Driver/TestRuleBehaviors.cs index fe76f03f0..f8af9239d 100644 --- a/src/Test.UnitTests.Sarif.Driver/TestRuleBehaviors.cs +++ b/src/Test.UnitTests.Sarif.Driver/TestRuleBehaviors.cs @@ -28,4 +28,4 @@ internal enum TestRuleBehaviors // Force 'current platform not valid to analyze' code path. TreatPlatformAsInvalid = 0x400 } -} \ No newline at end of file +} diff --git a/src/Test.UnitTests.Sarif.Multitool.Library/ConvertCommandTests.cs b/src/Test.UnitTests.Sarif.Multitool.Library/ConvertCommandTests.cs index 5b1fd557b..8f99f8291 100644 --- a/src/Test.UnitTests.Sarif.Multitool.Library/ConvertCommandTests.cs +++ b/src/Test.UnitTests.Sarif.Multitool.Library/ConvertCommandTests.cs @@ -1,10 +1,14 @@ // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +using System.IO; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif.Converters; + using Moq; -using System.IO; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Test.UnitTests.Sarif.Multitool.Library/ExportValidationRulesDocumentationCommandTests.cs b/src/Test.UnitTests.Sarif.Multitool.Library/ExportValidationRulesDocumentationCommandTests.cs index e921e1fb6..7a865f6ff 100644 --- a/src/Test.UnitTests.Sarif.Multitool.Library/ExportValidationRulesDocumentationCommandTests.cs +++ b/src/Test.UnitTests.Sarif.Multitool.Library/ExportValidationRulesDocumentationCommandTests.cs @@ -3,8 +3,11 @@ using System.Collections.Generic; using System.Text; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif.Multitool.Rules; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Multitool @@ -34,7 +37,7 @@ public void BuildRule_GeneratesExpectedMarkdown() string expectedMarkdown = resourceExtractor.GetResourceText(test.Key); sb.ToString().Should().Be(expectedMarkdown); - } + } } private class TestRule1 : SarifValidationSkimmerBase diff --git a/src/Test.UnitTests.Sarif.Multitool.Library/GenericCommandTests.cs b/src/Test.UnitTests.Sarif.Multitool.Library/GenericCommandTests.cs index eae2e19b8..bc1c7f15a 100644 --- a/src/Test.UnitTests.Sarif.Multitool.Library/GenericCommandTests.cs +++ b/src/Test.UnitTests.Sarif.Multitool.Library/GenericCommandTests.cs @@ -5,6 +5,7 @@ using System.Collections.Generic; using System.Linq; using System.Reflection; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Test.UnitTests.Sarif.Multitool.Library/MergeCommandTests.cs b/src/Test.UnitTests.Sarif.Multitool.Library/MergeCommandTests.cs index 0f9266441..50e94f175 100644 --- a/src/Test.UnitTests.Sarif.Multitool.Library/MergeCommandTests.cs +++ b/src/Test.UnitTests.Sarif.Multitool.Library/MergeCommandTests.cs @@ -3,8 +3,11 @@ using System; using System.IO; + using FluentAssertions; + using Moq; + using Xunit; using Xunit.Abstractions; diff --git a/src/Test.UnitTests.Sarif.Multitool.Library/PageCommandTests.cs b/src/Test.UnitTests.Sarif.Multitool.Library/PageCommandTests.cs index e0849d92d..df87617c8 100644 --- a/src/Test.UnitTests.Sarif.Multitool.Library/PageCommandTests.cs +++ b/src/Test.UnitTests.Sarif.Multitool.Library/PageCommandTests.cs @@ -4,9 +4,13 @@ using System; using System.Collections.Generic; using System.IO; + using FluentAssertions; + using Moq; + using Newtonsoft.Json; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Test.UnitTests.Sarif.Multitool.Library/QueryCommandTests.cs b/src/Test.UnitTests.Sarif.Multitool.Library/QueryCommandTests.cs index 5bd66e536..521fdb014 100644 --- a/src/Test.UnitTests.Sarif.Multitool.Library/QueryCommandTests.cs +++ b/src/Test.UnitTests.Sarif.Multitool.Library/QueryCommandTests.cs @@ -2,7 +2,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.IO; + using Microsoft.CodeAnalysis.Sarif.Query; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Test.UnitTests.Sarif.Multitool.Library/RebaseUriCommandTests.cs b/src/Test.UnitTests.Sarif.Multitool.Library/RebaseUriCommandTests.cs index 6bb628782..e736636e1 100644 --- a/src/Test.UnitTests.Sarif.Multitool.Library/RebaseUriCommandTests.cs +++ b/src/Test.UnitTests.Sarif.Multitool.Library/RebaseUriCommandTests.cs @@ -4,6 +4,7 @@ using System; using System.IO; using System.Text; + using FluentAssertions; using Microsoft.Extensions.Options; @@ -36,7 +37,7 @@ public void RebaseUriCommand_InjectsRegions() { Runs = new[] { - new Run { Results = new[] { + new Run { Results = new[] { new Result { Locations = new [] { new Location { PhysicalLocation = new PhysicalLocation { @@ -59,11 +60,11 @@ public void RebaseUriCommand_InjectsRegions() RebaseUriOptions options = CreateDefaultOptions(); options.TargetFileSpecifiers = new string[] { logFilePath }; - - options.DataToInsert = new[] - { + + options.DataToInsert = new[] + { OptionallyEmittedData.RegionSnippets | - OptionallyEmittedData.ContextRegionSnippets + OptionallyEmittedData.ContextRegionSnippets }; Mock mockFileSystem = ArrangeMockFileSystem(inputSarifLog, logFilePath, transformedContents); diff --git a/src/Test.UnitTests.Sarif.Multitool.Library/RewriteCommandTests.cs b/src/Test.UnitTests.Sarif.Multitool.Library/RewriteCommandTests.cs index 9e4c83c0a..d571e8236 100644 --- a/src/Test.UnitTests.Sarif.Multitool.Library/RewriteCommandTests.cs +++ b/src/Test.UnitTests.Sarif.Multitool.Library/RewriteCommandTests.cs @@ -2,7 +2,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using FluentAssertions; + using Moq; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Test.UnitTests.Sarif.Multitool.Library/Rules/SarifValidationSkimmerBaseTests.cs b/src/Test.UnitTests.Sarif.Multitool.Library/Rules/SarifValidationSkimmerBaseTests.cs index 16ab7ad87..448e8dd71 100644 --- a/src/Test.UnitTests.Sarif.Multitool.Library/Rules/SarifValidationSkimmerBaseTests.cs +++ b/src/Test.UnitTests.Sarif.Multitool.Library/Rules/SarifValidationSkimmerBaseTests.cs @@ -2,8 +2,11 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Text; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif.Multitool.Rules; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Test.UnitTests.Sarif.Multitool.Library/TransformCommandTests.cs b/src/Test.UnitTests.Sarif.Multitool.Library/TransformCommandTests.cs index 584701d77..df80a3a17 100644 --- a/src/Test.UnitTests.Sarif.Multitool.Library/TransformCommandTests.cs +++ b/src/Test.UnitTests.Sarif.Multitool.Library/TransformCommandTests.cs @@ -4,12 +4,17 @@ using System.Collections.Generic; using System.IO; using System.Text; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif.Readers; using Microsoft.CodeAnalysis.Sarif.VersionOne; + using Moq; + using Newtonsoft.Json; using Newtonsoft.Json.Linq; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Multitool @@ -190,7 +195,7 @@ private static (string transformedContents, int returnCode) RunTransformationCor options.Inline = true; options.InputFilePath = LogFilePath; } - + var transformedContents = new StringBuilder(); // Complex: TransformCommand has code paths that use Create and OpenRead, but also ReadAllText and WriteAllText. diff --git a/src/Test.UnitTests.Sarif.Multitool.Library/ValidateCommandTests.cs b/src/Test.UnitTests.Sarif.Multitool.Library/ValidateCommandTests.cs index 96c3a558a..0304530e0 100644 --- a/src/Test.UnitTests.Sarif.Multitool.Library/ValidateCommandTests.cs +++ b/src/Test.UnitTests.Sarif.Multitool.Library/ValidateCommandTests.cs @@ -2,9 +2,13 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.IO; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif.Driver; + using Moq; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Test.UnitTests.Sarif.Multitool/FileWorkItemsCommandTests.cs b/src/Test.UnitTests.Sarif.Multitool/FileWorkItemsCommandTests.cs index 0a4b4a98a..26d997260 100644 --- a/src/Test.UnitTests.Sarif.Multitool/FileWorkItemsCommandTests.cs +++ b/src/Test.UnitTests.Sarif.Multitool/FileWorkItemsCommandTests.cs @@ -3,7 +3,9 @@ using System; using System.Collections.Generic; + using FluentAssertions; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Test.UnitTests.Sarif.Multitool/QueryCommandPropertyBagTests.cs b/src/Test.UnitTests.Sarif.Multitool/QueryCommandPropertyBagTests.cs index bf240f122..4f682b460 100644 --- a/src/Test.UnitTests.Sarif.Multitool/QueryCommandPropertyBagTests.cs +++ b/src/Test.UnitTests.Sarif.Multitool/QueryCommandPropertyBagTests.cs @@ -3,10 +3,14 @@ using System; using System.IO; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif.Query; using Microsoft.CodeAnalysis.Sarif.Query.Evaluators; + using Newtonsoft.Json; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Test.UnitTests.Sarif.WorkItems/SarifWorkItemExtensionsTests.cs b/src/Test.UnitTests.Sarif.WorkItems/SarifWorkItemExtensionsTests.cs index d5c5b3f5f..dca19cb5a 100644 --- a/src/Test.UnitTests.Sarif.WorkItems/SarifWorkItemExtensionsTests.cs +++ b/src/Test.UnitTests.Sarif.WorkItems/SarifWorkItemExtensionsTests.cs @@ -5,8 +5,11 @@ using System.Collections.ObjectModel; using System.ComponentModel; using System.Text; + using FluentAssertions; + using Microsoft.CodeAnalysis.Test.Utilities.Sarif; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.WorkItems @@ -88,7 +91,7 @@ public void SarifWorkItemExtensions_CreateWorkItemTitle_LongTitleFromLogicalLoca result.Locations = new List(); result.Locations.Add(location); result.RuleId = "TestRuleId"; - + SarifLog sarifLog = CreateLogWithEmptyRun(); Run run = sarifLog.Runs[0]; run.Results.Add(result); @@ -243,13 +246,13 @@ public void SarifWorkItemExtensions_GetRunToolNames_FetchesAllRunToolNames() } } } - } + } }), new Tuple("Result with rule.Id", new Result { Rule = new ReportingDescriptorReference { - Id = TestRuleId + Id = TestRuleId } }), new Tuple("Result with rule index only", new Result @@ -284,7 +287,7 @@ private static SarifLog CreateLogWithEmptyRun() Rules = new ReportingDescriptor[] { new ReportingDescriptor - { + { Name = "Test Rule", Id = nameof(TestRuleId) } diff --git a/src/Test.UnitTests.Sarif.WorkItems/SarifWorkItemFilerTests.cs b/src/Test.UnitTests.Sarif.WorkItems/SarifWorkItemFilerTests.cs index 374a8087c..25013fad1 100644 --- a/src/Test.UnitTests.Sarif.WorkItems/SarifWorkItemFilerTests.cs +++ b/src/Test.UnitTests.Sarif.WorkItems/SarifWorkItemFilerTests.cs @@ -7,16 +7,22 @@ using System.Linq; using System.Threading; using System.Threading.Tasks; + using FluentAssertions; + using Microsoft.CodeAnalysis.Test.Utilities.Sarif; using Microsoft.CodeAnalysis.WorkItems; using Microsoft.TeamFoundation.WorkItemTracking.WebApi.Models; using Microsoft.VisualStudio.Services.WebApi; using Microsoft.VisualStudio.Services.WebApi.Patch.Json; using Microsoft.WorkItems; + using Moq; + using Newtonsoft.Json; + using Octokit; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.WorkItems @@ -183,10 +189,10 @@ private void TestWorkItemFiler(SarifLog sarifLog, SarifWorkItemContext context, // Validate that we updated the SARIF log with work itme URIs. // updatedSarifLog.Should().NotBeEquivalentTo(sarifLog); - - foreach(Run run in updatedSarifLog.Runs) + + foreach (Run run in updatedSarifLog.Runs) { - foreach(Result result in run.Results) + foreach (Result result in run.Results) { result.WorkItemUris.Should().NotBeNull(); result.WorkItemUris.Count.Should().Be(1); @@ -199,7 +205,7 @@ private void TestWorkItemFiler(SarifLog sarifLog, SarifWorkItemContext context, programmableUris.Count.Should().Be(1); programmableUris[0].Should().Be(bugUri); } - } + } } private static FilingClient CreateAdoMocksAndFilingClient(AttachmentReference attachmentReference, WorkItem workItem, SarifWorkItemFiler filer) @@ -371,4 +377,4 @@ private static SarifWorkItemContext CreateAzureDevOpsTestContext() "Extensibility", nameof(ExpectedWorkItemsCount), defaultValue: () => { return 1; }); } -} \ No newline at end of file +} diff --git a/src/Test.UnitTests.Sarif.WorkItems/SarifWorkItemFilingContextTests.cs b/src/Test.UnitTests.Sarif.WorkItems/SarifWorkItemFilingContextTests.cs index eda15bca0..035455bda 100644 --- a/src/Test.UnitTests.Sarif.WorkItems/SarifWorkItemFilingContextTests.cs +++ b/src/Test.UnitTests.Sarif.WorkItems/SarifWorkItemFilingContextTests.cs @@ -3,8 +3,11 @@ using System; using System.IO; + using FluentAssertions; + using Microsoft.CodeAnalysis.Test.Utilities.Sarif; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.WorkItems diff --git a/src/Test.UnitTests.Sarif.WorkItems/SarifWorkItemModelTests.cs b/src/Test.UnitTests.Sarif.WorkItems/SarifWorkItemModelTests.cs index b13107a06..1ccaacf3d 100644 --- a/src/Test.UnitTests.Sarif.WorkItems/SarifWorkItemModelTests.cs +++ b/src/Test.UnitTests.Sarif.WorkItems/SarifWorkItemModelTests.cs @@ -2,8 +2,10 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using FluentAssertions; + using Microsoft.CodeAnalysis.Test.Utilities.Sarif; using Microsoft.WorkItems; + using Xunit; diff --git a/src/Test.UnitTests.Sarif/Baseline/DefaultBaselineUnitTests.cs b/src/Test.UnitTests.Sarif/Baseline/DefaultBaselineUnitTests.cs index 41a83a2ec..2a52c746b 100644 --- a/src/Test.UnitTests.Sarif/Baseline/DefaultBaselineUnitTests.cs +++ b/src/Test.UnitTests.Sarif/Baseline/DefaultBaselineUnitTests.cs @@ -4,7 +4,9 @@ using System; using System.Collections.Generic; using System.Linq; + using FluentAssertions; + using Xunit; using Xunit.Abstractions; diff --git a/src/Test.UnitTests.Sarif/Baseline/ResultMatching/ExactMatchers/FullFingerprintMatcherTests.cs b/src/Test.UnitTests.Sarif/Baseline/ResultMatching/ExactMatchers/FullFingerprintMatcherTests.cs index c2c743a7c..698ddba29 100644 --- a/src/Test.UnitTests.Sarif/Baseline/ResultMatching/ExactMatchers/FullFingerprintMatcherTests.cs +++ b/src/Test.UnitTests.Sarif/Baseline/ResultMatching/ExactMatchers/FullFingerprintMatcherTests.cs @@ -3,7 +3,9 @@ using System.Collections.Generic; using System.Linq; + using FluentAssertions; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Baseline.ResultMatching.ExactMatchers diff --git a/src/Test.UnitTests.Sarif/Baseline/ResultMatching/ExactMatchers/IdenticalResultMatcherTests.cs b/src/Test.UnitTests.Sarif/Baseline/ResultMatching/ExactMatchers/IdenticalResultMatcherTests.cs index 609b2b133..395d57f57 100644 --- a/src/Test.UnitTests.Sarif/Baseline/ResultMatching/ExactMatchers/IdenticalResultMatcherTests.cs +++ b/src/Test.UnitTests.Sarif/Baseline/ResultMatching/ExactMatchers/IdenticalResultMatcherTests.cs @@ -4,7 +4,9 @@ using System; using System.Collections.Generic; using System.Linq; + using FluentAssertions; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Baseline.ResultMatching.ExactMatchers diff --git a/src/Test.UnitTests.Sarif/Baseline/ResultMatching/HeuristicMatchers/ContextRegionResultMatcherTests.cs b/src/Test.UnitTests.Sarif/Baseline/ResultMatching/HeuristicMatchers/ContextRegionResultMatcherTests.cs index 849c700e4..707f0605c 100644 --- a/src/Test.UnitTests.Sarif/Baseline/ResultMatching/HeuristicMatchers/ContextRegionResultMatcherTests.cs +++ b/src/Test.UnitTests.Sarif/Baseline/ResultMatching/HeuristicMatchers/ContextRegionResultMatcherTests.cs @@ -2,7 +2,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; + using FluentAssertions; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Baseline.ResultMatching.HeuristicMatchers diff --git a/src/Test.UnitTests.Sarif/Baseline/ResultMatching/HeuristicMatchers/PartialFingerprintResultMatcherTests.cs b/src/Test.UnitTests.Sarif/Baseline/ResultMatching/HeuristicMatchers/PartialFingerprintResultMatcherTests.cs index fefff5edd..d587ea2fb 100644 --- a/src/Test.UnitTests.Sarif/Baseline/ResultMatching/HeuristicMatchers/PartialFingerprintResultMatcherTests.cs +++ b/src/Test.UnitTests.Sarif/Baseline/ResultMatching/HeuristicMatchers/PartialFingerprintResultMatcherTests.cs @@ -2,7 +2,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; + using FluentAssertions; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Baseline.ResultMatching.HeuristicMatchers diff --git a/src/Test.UnitTests.Sarif/Baseline/ResultMatching/ResultMatchingBaselinerTests.cs b/src/Test.UnitTests.Sarif/Baseline/ResultMatching/ResultMatchingBaselinerTests.cs index 034a01428..b34ad264f 100644 --- a/src/Test.UnitTests.Sarif/Baseline/ResultMatching/ResultMatchingBaselinerTests.cs +++ b/src/Test.UnitTests.Sarif/Baseline/ResultMatching/ResultMatchingBaselinerTests.cs @@ -4,7 +4,9 @@ using System; using System.Collections.Generic; using System.Linq; + using FluentAssertions; + using Xunit; using Xunit.Abstractions; diff --git a/src/Test.UnitTests.Sarif/Baseline/ResultMatching/SarifLogResultMatcherTests.cs b/src/Test.UnitTests.Sarif/Baseline/ResultMatching/SarifLogResultMatcherTests.cs index 903c25a94..c2d3408ef 100644 --- a/src/Test.UnitTests.Sarif/Baseline/ResultMatching/SarifLogResultMatcherTests.cs +++ b/src/Test.UnitTests.Sarif/Baseline/ResultMatching/SarifLogResultMatcherTests.cs @@ -4,7 +4,9 @@ using System; using System.Collections.Generic; using System.Linq; + using FluentAssertions; + using Xunit; using Xunit.Abstractions; diff --git a/src/Test.UnitTests.Sarif/Baseline/StrictBaselineUnitTests.cs b/src/Test.UnitTests.Sarif/Baseline/StrictBaselineUnitTests.cs index 844b9e44d..989c57c2c 100644 --- a/src/Test.UnitTests.Sarif/Baseline/StrictBaselineUnitTests.cs +++ b/src/Test.UnitTests.Sarif/Baseline/StrictBaselineUnitTests.cs @@ -4,7 +4,9 @@ using System; using System.Collections.Generic; using System.Linq; + using FluentAssertions; + using Xunit; using Xunit.Abstractions; diff --git a/src/Test.UnitTests.Sarif/Baseline2/ExtractedResultTests.cs b/src/Test.UnitTests.Sarif/Baseline2/ExtractedResultTests.cs index 96291cf9d..5533f1379 100644 --- a/src/Test.UnitTests.Sarif/Baseline2/ExtractedResultTests.cs +++ b/src/Test.UnitTests.Sarif/Baseline2/ExtractedResultTests.cs @@ -2,9 +2,12 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif; using Microsoft.CodeAnalysis.Sarif.Baseline.ResultMatching; + using Xunit; namespace Microsoft.CodeAnalysis.Test.UnitTests.Sarif.Baseline diff --git a/src/Test.UnitTests.Sarif/Baseline2/OverallBaseliningTests.cs b/src/Test.UnitTests.Sarif/Baseline2/OverallBaseliningTests.cs index 0b4f15c7c..c01552fcc 100644 --- a/src/Test.UnitTests.Sarif/Baseline2/OverallBaseliningTests.cs +++ b/src/Test.UnitTests.Sarif/Baseline2/OverallBaseliningTests.cs @@ -10,6 +10,7 @@ using Microsoft.CodeAnalysis.Sarif; using Microsoft.CodeAnalysis.Sarif.Baseline.ResultMatching; using Microsoft.CodeAnalysis.Test.Utilities.Sarif; + using Newtonsoft.Json; using Xunit; diff --git a/src/Test.UnitTests.Sarif/Baseline2/TrustMapTests.cs b/src/Test.UnitTests.Sarif/Baseline2/TrustMapTests.cs index 2804ffa20..f7b54ffa2 100644 --- a/src/Test.UnitTests.Sarif/Baseline2/TrustMapTests.cs +++ b/src/Test.UnitTests.Sarif/Baseline2/TrustMapTests.cs @@ -2,7 +2,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif.Baseline; + using Xunit; namespace Microsoft.CodeAnalysis.Test.UnitTests.Sarif.Baseline diff --git a/src/Test.UnitTests.Sarif/Baseline2/WhatComparerTests.cs b/src/Test.UnitTests.Sarif/Baseline2/WhatComparerTests.cs index 144031f59..829b1ec7e 100644 --- a/src/Test.UnitTests.Sarif/Baseline2/WhatComparerTests.cs +++ b/src/Test.UnitTests.Sarif/Baseline2/WhatComparerTests.cs @@ -3,10 +3,13 @@ using System; using System.Collections.Generic; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif; using Microsoft.CodeAnalysis.Sarif.Baseline; using Microsoft.CodeAnalysis.Sarif.Baseline.ResultMatching; + using Xunit; namespace Microsoft.CodeAnalysis.Test.UnitTests.Sarif.Baseline diff --git a/src/Test.UnitTests.Sarif/Baseline2/WhereComparerTests.cs b/src/Test.UnitTests.Sarif/Baseline2/WhereComparerTests.cs index 6cf5b01c5..31672da13 100644 --- a/src/Test.UnitTests.Sarif/Baseline2/WhereComparerTests.cs +++ b/src/Test.UnitTests.Sarif/Baseline2/WhereComparerTests.cs @@ -3,9 +3,12 @@ using System; using System.Collections.Generic; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif; using Microsoft.CodeAnalysis.Sarif.Baseline; + using Xunit; namespace Microsoft.CodeAnalysis.Test.UnitTests.Sarif.Baseline diff --git a/src/Test.UnitTests.Sarif/CacheTests.cs b/src/Test.UnitTests.Sarif/CacheTests.cs index d36a57f47..cad440bfc 100644 --- a/src/Test.UnitTests.Sarif/CacheTests.cs +++ b/src/Test.UnitTests.Sarif/CacheTests.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using FluentAssertions; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.UnitTests diff --git a/src/Test.UnitTests.Sarif/ConsoleLoggerTests.cs b/src/Test.UnitTests.Sarif/ConsoleLoggerTests.cs index 2140f7c98..529fd33ee 100644 --- a/src/Test.UnitTests.Sarif/ConsoleLoggerTests.cs +++ b/src/Test.UnitTests.Sarif/ConsoleLoggerTests.cs @@ -1,8 +1,11 @@ // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif; + using Xunit; namespace Microsoft.CodeAnalysis.Test.UnitTests.Sarif diff --git a/src/Test.UnitTests.Sarif/Core/ArtifactLocationTests.cs b/src/Test.UnitTests.Sarif/Core/ArtifactLocationTests.cs index 66d5960dc..1c2d58ea0 100644 --- a/src/Test.UnitTests.Sarif/Core/ArtifactLocationTests.cs +++ b/src/Test.UnitTests.Sarif/Core/ArtifactLocationTests.cs @@ -3,8 +3,11 @@ using System; using System.Collections.Generic; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif; + using Xunit; namespace Microsoft.CodeAnalysis.Test.UnitTests.Sarif.Core diff --git a/src/Test.UnitTests.Sarif/Core/ArtifactTests.cs b/src/Test.UnitTests.Sarif/Core/ArtifactTests.cs index f84edbe3e..d8a260212 100644 --- a/src/Test.UnitTests.Sarif/Core/ArtifactTests.cs +++ b/src/Test.UnitTests.Sarif/Core/ArtifactTests.cs @@ -4,10 +4,15 @@ using System; using System.IO; using System.Text; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif; + using Moq; + using Newtonsoft.Json; + using Xunit; namespace Microsoft.CodeAnalysis.Test.UnitTests.Sarif.Core @@ -270,4 +275,4 @@ private static void Validate(Artifact fileData, OptionallyEmittedData dataToInse } } -} \ No newline at end of file +} diff --git a/src/Test.UnitTests.Sarif/Core/FileLocationTests.cs b/src/Test.UnitTests.Sarif/Core/FileLocationTests.cs index 6e147c1f1..6c4f60844 100644 --- a/src/Test.UnitTests.Sarif/Core/FileLocationTests.cs +++ b/src/Test.UnitTests.Sarif/Core/FileLocationTests.cs @@ -3,7 +3,9 @@ using System; using System.Text; + using FluentAssertions; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.UnitTests.Core diff --git a/src/Test.UnitTests.Sarif/Core/InvocationTests.cs b/src/Test.UnitTests.Sarif/Core/InvocationTests.cs index ce1274e9a..24ca78512 100644 --- a/src/Test.UnitTests.Sarif/Core/InvocationTests.cs +++ b/src/Test.UnitTests.Sarif/Core/InvocationTests.cs @@ -2,7 +2,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif; + using Xunit; namespace Microsoft.CodeAnalysis.Test.UnitTests.Sarif.Core diff --git a/src/Test.UnitTests.Sarif/Core/LocationTests.cs b/src/Test.UnitTests.Sarif/Core/LocationTests.cs index 2c26ca955..12afd13a9 100644 --- a/src/Test.UnitTests.Sarif/Core/LocationTests.cs +++ b/src/Test.UnitTests.Sarif/Core/LocationTests.cs @@ -2,7 +2,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif; + using Xunit; namespace Microsoft.CodeAnalysis.Test.UnitTests.Sarif.Core diff --git a/src/Test.UnitTests.Sarif/Core/PropertyBagHolderTests.cs b/src/Test.UnitTests.Sarif/Core/PropertyBagHolderTests.cs index 033238613..278008d85 100644 --- a/src/Test.UnitTests.Sarif/Core/PropertyBagHolderTests.cs +++ b/src/Test.UnitTests.Sarif/Core/PropertyBagHolderTests.cs @@ -3,10 +3,14 @@ using System; using System.Collections.Generic; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif; + using Newtonsoft.Json; using Newtonsoft.Json.Serialization; + using Xunit; namespace Microsoft.CodeAnalysis.Test.UnitTests.Sarif.Core diff --git a/src/Test.UnitTests.Sarif/Core/RegionTests.cs b/src/Test.UnitTests.Sarif/Core/RegionTests.cs index 04f30857e..c7f16112f 100644 --- a/src/Test.UnitTests.Sarif/Core/RegionTests.cs +++ b/src/Test.UnitTests.Sarif/Core/RegionTests.cs @@ -2,7 +2,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif; + using Xunit; namespace Microsoft.CodeAnalysis.Test.UnitTests.Sarif.Core @@ -125,4 +127,4 @@ public void Region_HasAllRegionTypes_ComputesPropertiesCorrectly() region.IsBinaryRegion.Should().BeTrue(); } } -} \ No newline at end of file +} diff --git a/src/Test.UnitTests.Sarif/Core/ResultTests.cs b/src/Test.UnitTests.Sarif/Core/ResultTests.cs index 8e99fb760..68e52dab2 100644 --- a/src/Test.UnitTests.Sarif/Core/ResultTests.cs +++ b/src/Test.UnitTests.Sarif/Core/ResultTests.cs @@ -2,7 +2,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif; + using Xunit; namespace Microsoft.CodeAnalysis.Test.UnitTests.Sarif.Core diff --git a/src/Test.UnitTests.Sarif/Core/RunTests.cs b/src/Test.UnitTests.Sarif/Core/RunTests.cs index 36eeca60b..6dcbd1177 100644 --- a/src/Test.UnitTests.Sarif/Core/RunTests.cs +++ b/src/Test.UnitTests.Sarif/Core/RunTests.cs @@ -4,9 +4,13 @@ using System; using System.Collections.Generic; using System.Linq; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif; + using Newtonsoft.Json; + using Xunit; namespace Microsoft.CodeAnalysis.Test.UnitTests.Sarif.Core diff --git a/src/Test.UnitTests.Sarif/Core/SarifLogTests.cs b/src/Test.UnitTests.Sarif/Core/SarifLogTests.cs index 0cefc4baf..b7d427428 100644 --- a/src/Test.UnitTests.Sarif/Core/SarifLogTests.cs +++ b/src/Test.UnitTests.Sarif/Core/SarifLogTests.cs @@ -2,8 +2,11 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; + using FluentAssertions; + using Newtonsoft.Json; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.UnitTests.Core diff --git a/src/Test.UnitTests.Sarif/Core/StackTests.cs b/src/Test.UnitTests.Sarif/Core/StackTests.cs index 4eab86f7d..1cd79d244 100644 --- a/src/Test.UnitTests.Sarif/Core/StackTests.cs +++ b/src/Test.UnitTests.Sarif/Core/StackTests.cs @@ -6,8 +6,11 @@ using System.Diagnostics; using System.IO; using System.Linq; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif; + using Xunit; namespace Microsoft.CodeAnalysis.Test.UnitTests.Sarif.Core diff --git a/src/Test.UnitTests.Sarif/Core/TagsTests.cs b/src/Test.UnitTests.Sarif/Core/TagsTests.cs index 0454661ea..1cf529654 100644 --- a/src/Test.UnitTests.Sarif/Core/TagsTests.cs +++ b/src/Test.UnitTests.Sarif/Core/TagsTests.cs @@ -2,7 +2,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; + using FluentAssertions; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Test.UnitTests.Sarif/Core/ToolTests.cs b/src/Test.UnitTests.Sarif/Core/ToolTests.cs index fba2e4ad1..f6675d102 100644 --- a/src/Test.UnitTests.Sarif/Core/ToolTests.cs +++ b/src/Test.UnitTests.Sarif/Core/ToolTests.cs @@ -4,7 +4,9 @@ using System; using System.Collections.ObjectModel; using System.Text; + using FluentAssertions; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Core diff --git a/src/Test.UnitTests.Sarif/Core/WebMessageUtilitiesTests.cs b/src/Test.UnitTests.Sarif/Core/WebMessageUtilitiesTests.cs index 981eece7b..9845b4c66 100644 --- a/src/Test.UnitTests.Sarif/Core/WebMessageUtilitiesTests.cs +++ b/src/Test.UnitTests.Sarif/Core/WebMessageUtilitiesTests.cs @@ -2,8 +2,11 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif; + using Xunit; namespace Microsoft.CodeAnalysis.Test.UnitTests.Sarif.Core diff --git a/src/Test.UnitTests.Sarif/Core/WebRequestTests.cs b/src/Test.UnitTests.Sarif/Core/WebRequestTests.cs index 45e145819..96ee95401 100644 --- a/src/Test.UnitTests.Sarif/Core/WebRequestTests.cs +++ b/src/Test.UnitTests.Sarif/Core/WebRequestTests.cs @@ -2,9 +2,12 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; + using FluentAssertions; using FluentAssertions.Extensions; + using Microsoft.CodeAnalysis.Sarif; + using Xunit; namespace Microsoft.CodeAnalysis.Test.UnitTests.Sarif.Core @@ -186,7 +189,7 @@ public void WebRequest_TryParse_ReturnsFalseOnInvalidRequest() webRequest.Should().BeNull(); } - [Fact(Skip="Disabling due to timing inconsistencies across execution environments.")] + [Fact(Skip = "Disabling due to timing inconsistencies across execution environments.")] public void WebRequest_TryParse_HasAcceptablePerformance() { // This is a sanitized version of an actual customer's web request that exposed a perf diff --git a/src/Test.UnitTests.Sarif/Core/WebResponseTests.cs b/src/Test.UnitTests.Sarif/Core/WebResponseTests.cs index cef069599..e64ad2eca 100644 --- a/src/Test.UnitTests.Sarif/Core/WebResponseTests.cs +++ b/src/Test.UnitTests.Sarif/Core/WebResponseTests.cs @@ -2,8 +2,11 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif; + using Xunit; namespace Microsoft.CodeAnalysis.Test.UnitTests.Sarif.Core diff --git a/src/Test.UnitTests.Sarif/ExtensionsTests.cs b/src/Test.UnitTests.Sarif/ExtensionsTests.cs index b5b1ae437..c0aadc8ea 100644 --- a/src/Test.UnitTests.Sarif/ExtensionsTests.cs +++ b/src/Test.UnitTests.Sarif/ExtensionsTests.cs @@ -4,8 +4,11 @@ using System.Collections.Generic; using System.Xml; using System.Xml.Linq; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif.Converters; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Test.UnitTests.Sarif/FileRegionsCacheTests.cs b/src/Test.UnitTests.Sarif/FileRegionsCacheTests.cs index 2fb0a9e42..01dea08ac 100644 --- a/src/Test.UnitTests.Sarif/FileRegionsCacheTests.cs +++ b/src/Test.UnitTests.Sarif/FileRegionsCacheTests.cs @@ -5,7 +5,9 @@ using System.Collections.ObjectModel; using System.Diagnostics; using System.Text; + using FluentAssertions; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.UnitTests diff --git a/src/Test.UnitTests.Sarif/GitHelperTests.cs b/src/Test.UnitTests.Sarif/GitHelperTests.cs index c870bfa3d..846a12875 100644 --- a/src/Test.UnitTests.Sarif/GitHelperTests.cs +++ b/src/Test.UnitTests.Sarif/GitHelperTests.cs @@ -2,8 +2,11 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; + using FluentAssertions; + using Moq; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Test.UnitTests.Sarif/JsonTests.cs b/src/Test.UnitTests.Sarif/JsonTests.cs index 99e51e3ad..7ff157fe2 100644 --- a/src/Test.UnitTests.Sarif/JsonTests.cs +++ b/src/Test.UnitTests.Sarif/JsonTests.cs @@ -5,7 +5,9 @@ using System.Collections.Generic; using System.IO; using System.Text; + using Microsoft.CodeAnalysis.Sarif.Writers; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif @@ -79,4 +81,4 @@ protected static string CreateCurrentV2SarifLogText(int resultCount = 0, Action< return JsonConvert.SerializeObject(sarifLog, Formatting.Indented); } } -} \ No newline at end of file +} diff --git a/src/Test.UnitTests.Sarif/Map/JsonMapBuilderTests.cs b/src/Test.UnitTests.Sarif/Map/JsonMapBuilderTests.cs index 3f8cfc700..bbad6e8c3 100644 --- a/src/Test.UnitTests.Sarif/Map/JsonMapBuilderTests.cs +++ b/src/Test.UnitTests.Sarif/Map/JsonMapBuilderTests.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.IO; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Map diff --git a/src/Test.UnitTests.Sarif/Map/LongArrayDeltaConverterTests.cs b/src/Test.UnitTests.Sarif/Map/LongArrayDeltaConverterTests.cs index 2067a33dd..b39270532 100644 --- a/src/Test.UnitTests.Sarif/Map/LongArrayDeltaConverterTests.cs +++ b/src/Test.UnitTests.Sarif/Map/LongArrayDeltaConverterTests.cs @@ -2,7 +2,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; + using Newtonsoft.Json; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Map diff --git a/src/Test.UnitTests.Sarif/MockFactory.cs b/src/Test.UnitTests.Sarif/MockFactory.cs index 006bc2409..3ba966e3a 100644 --- a/src/Test.UnitTests.Sarif/MockFactory.cs +++ b/src/Test.UnitTests.Sarif/MockFactory.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; + using Moq; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Test.UnitTests.Sarif/OrderSensitiveValueComparisonListTests.cs b/src/Test.UnitTests.Sarif/OrderSensitiveValueComparisonListTests.cs index cc79687e6..caa5c0f28 100644 --- a/src/Test.UnitTests.Sarif/OrderSensitiveValueComparisonListTests.cs +++ b/src/Test.UnitTests.Sarif/OrderSensitiveValueComparisonListTests.cs @@ -3,7 +3,9 @@ using System; using System.Collections.Generic; + using FluentAssertions; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.UnitTests @@ -110,4 +112,4 @@ private OrderSensitiveValueComparisonList CreateTestList(IEquali return list; } } -} \ No newline at end of file +} diff --git a/src/Test.UnitTests.Sarif/Processors/GenericTests/GenericProcessorTests.cs b/src/Test.UnitTests.Sarif/Processors/GenericTests/GenericProcessorTests.cs index 206759634..bad208176 100644 --- a/src/Test.UnitTests.Sarif/Processors/GenericTests/GenericProcessorTests.cs +++ b/src/Test.UnitTests.Sarif/Processors/GenericTests/GenericProcessorTests.cs @@ -4,7 +4,9 @@ using System; using System.Collections.Generic; using System.Linq; + using FluentAssertions; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Processors diff --git a/src/Test.UnitTests.Sarif/Processors/Log/LogPipelineSerializationTests.cs b/src/Test.UnitTests.Sarif/Processors/Log/LogPipelineSerializationTests.cs index 7645668c8..c6602b542 100644 --- a/src/Test.UnitTests.Sarif/Processors/Log/LogPipelineSerializationTests.cs +++ b/src/Test.UnitTests.Sarif/Processors/Log/LogPipelineSerializationTests.cs @@ -2,8 +2,11 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; + using FluentAssertions; + using Newtonsoft.Json; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Processors diff --git a/src/Test.UnitTests.Sarif/Processors/Log/MergeStageTests.cs b/src/Test.UnitTests.Sarif/Processors/Log/MergeStageTests.cs index 599dbf842..39601eada 100644 --- a/src/Test.UnitTests.Sarif/Processors/Log/MergeStageTests.cs +++ b/src/Test.UnitTests.Sarif/Processors/Log/MergeStageTests.cs @@ -3,7 +3,9 @@ using System; using System.Collections.Generic; + using FluentAssertions; + using Xunit; using Xunit.Abstractions; diff --git a/src/Test.UnitTests.Sarif/Processors/Log/RebaseUriStageTests.cs b/src/Test.UnitTests.Sarif/Processors/Log/RebaseUriStageTests.cs index ce76d9a2b..373736a69 100644 --- a/src/Test.UnitTests.Sarif/Processors/Log/RebaseUriStageTests.cs +++ b/src/Test.UnitTests.Sarif/Processors/Log/RebaseUriStageTests.cs @@ -4,7 +4,9 @@ using System; using System.Collections.Generic; using System.Linq; + using FluentAssertions; + using Xunit; using Xunit.Abstractions; diff --git a/src/Test.UnitTests.Sarif/Processors/Log/SarifLogExtensionTests.cs b/src/Test.UnitTests.Sarif/Processors/Log/SarifLogExtensionTests.cs index 7e45a472a..61c3d8886 100644 --- a/src/Test.UnitTests.Sarif/Processors/Log/SarifLogExtensionTests.cs +++ b/src/Test.UnitTests.Sarif/Processors/Log/SarifLogExtensionTests.cs @@ -4,8 +4,11 @@ using System; using System.Collections.Generic; using System.Linq; + using FluentAssertions; + using Newtonsoft.Json; + using Xunit; using Xunit.Abstractions; diff --git a/src/Test.UnitTests.Sarif/PropertiesDictionaryTests.cs b/src/Test.UnitTests.Sarif/PropertiesDictionaryTests.cs index bcf32ec75..6fa76f982 100644 --- a/src/Test.UnitTests.Sarif/PropertiesDictionaryTests.cs +++ b/src/Test.UnitTests.Sarif/PropertiesDictionaryTests.cs @@ -4,7 +4,9 @@ using System; using System.Collections.Generic; using System.IO; + using FluentAssertions; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Test.UnitTests.Sarif/Query/EvaluatorTests.cs b/src/Test.UnitTests.Sarif/Query/EvaluatorTests.cs index 106a3b09f..66b605bc1 100644 --- a/src/Test.UnitTests.Sarif/Query/EvaluatorTests.cs +++ b/src/Test.UnitTests.Sarif/Query/EvaluatorTests.cs @@ -5,7 +5,9 @@ using System.Collections; using System.Collections.Generic; using System.Linq; + using Microsoft.CodeAnalysis.Sarif.Query.Evaluators; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Query diff --git a/src/Test.UnitTests.Sarif/Query/StringSliceTests.cs b/src/Test.UnitTests.Sarif/Query/StringSliceTests.cs index ccd0320eb..09530292f 100644 --- a/src/Test.UnitTests.Sarif/Query/StringSliceTests.cs +++ b/src/Test.UnitTests.Sarif/Query/StringSliceTests.cs @@ -3,7 +3,9 @@ using System; using System.Text; + using Microsoft.CodeAnalysis.Sarif.Query; + using Xunit; namespace Microsoft.CodeAnalysis.Test.UnitTests.Sarif.Query diff --git a/src/Test.UnitTests.Sarif/RandomSarifLogGenerator.cs b/src/Test.UnitTests.Sarif/RandomSarifLogGenerator.cs index fd6ef95f4..ff638231b 100644 --- a/src/Test.UnitTests.Sarif/RandomSarifLogGenerator.cs +++ b/src/Test.UnitTests.Sarif/RandomSarifLogGenerator.cs @@ -5,6 +5,7 @@ using System.IO; using System.Linq; using System.Runtime.CompilerServices; + using Xunit.Abstractions; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Test.UnitTests.Sarif/Readers/DeferredCollectionsTests.cs b/src/Test.UnitTests.Sarif/Readers/DeferredCollectionsTests.cs index 28ada7f46..63bc0649b 100644 --- a/src/Test.UnitTests.Sarif/Readers/DeferredCollectionsTests.cs +++ b/src/Test.UnitTests.Sarif/Readers/DeferredCollectionsTests.cs @@ -4,8 +4,11 @@ using System.Collections.Generic; using System.IO; using System.Linq; + using Microsoft.CodeAnalysis.Sarif.Readers.SampleModel; + using Newtonsoft.Json; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Readers diff --git a/src/Test.UnitTests.Sarif/Readers/EnumConverterTests.cs b/src/Test.UnitTests.Sarif/Readers/EnumConverterTests.cs index e300abe0d..c4e86b5a0 100644 --- a/src/Test.UnitTests.Sarif/Readers/EnumConverterTests.cs +++ b/src/Test.UnitTests.Sarif/Readers/EnumConverterTests.cs @@ -48,4 +48,4 @@ public void EnumConverter_ConvertToCamelCase() Assert.Equal("meToo", EnumConverter.ConvertToCamelCase("MeToo")); } } -} \ No newline at end of file +} diff --git a/src/Test.UnitTests.Sarif/Readers/IsSuppressedInSourceConverterTests.cs b/src/Test.UnitTests.Sarif/Readers/IsSuppressedInSourceConverterTests.cs index 5a555e495..c423da5be 100644 --- a/src/Test.UnitTests.Sarif/Readers/IsSuppressedInSourceConverterTests.cs +++ b/src/Test.UnitTests.Sarif/Readers/IsSuppressedInSourceConverterTests.cs @@ -2,8 +2,11 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; + using FluentAssertions; + using Newtonsoft.Json; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Readers diff --git a/src/Test.UnitTests.Sarif/Readers/LineMappingStreamReaderTests.cs b/src/Test.UnitTests.Sarif/Readers/LineMappingStreamReaderTests.cs index 0215d60f5..1fc8847e0 100644 --- a/src/Test.UnitTests.Sarif/Readers/LineMappingStreamReaderTests.cs +++ b/src/Test.UnitTests.Sarif/Readers/LineMappingStreamReaderTests.cs @@ -2,9 +2,12 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; using System.IO; + using Microsoft.CodeAnalysis.Sarif.Readers.SampleModel; + using Newtonsoft.Json; using Newtonsoft.Json.Linq; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Readers diff --git a/src/Test.UnitTests.Sarif/Readers/PropertyBagConverterTests.cs b/src/Test.UnitTests.Sarif/Readers/PropertyBagConverterTests.cs index ef18ded6e..27a85f190 100644 --- a/src/Test.UnitTests.Sarif/Readers/PropertyBagConverterTests.cs +++ b/src/Test.UnitTests.Sarif/Readers/PropertyBagConverterTests.cs @@ -4,8 +4,11 @@ using System; using System.Collections.Generic; using System.Linq; + using FluentAssertions; + using Newtonsoft.Json; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Readers diff --git a/src/Test.UnitTests.Sarif/Readers/ResultDiffingVisitorTests.cs b/src/Test.UnitTests.Sarif/Readers/ResultDiffingVisitorTests.cs index a67cd1dbe..ae18bd5e1 100644 --- a/src/Test.UnitTests.Sarif/Readers/ResultDiffingVisitorTests.cs +++ b/src/Test.UnitTests.Sarif/Readers/ResultDiffingVisitorTests.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using System.Linq; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Readers diff --git a/src/Test.UnitTests.Sarif/Readers/SampleModel/LogModel.cs b/src/Test.UnitTests.Sarif/Readers/SampleModel/LogModel.cs index 7e3d92319..4c27af78f 100644 --- a/src/Test.UnitTests.Sarif/Readers/SampleModel/LogModel.cs +++ b/src/Test.UnitTests.Sarif/Readers/SampleModel/LogModel.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.IO; + using Newtonsoft.Json; using Newtonsoft.Json.Serialization; diff --git a/src/Test.UnitTests.Sarif/RoundTrippingTests.cs b/src/Test.UnitTests.Sarif/RoundTrippingTests.cs index 85140354d..a086865d5 100644 --- a/src/Test.UnitTests.Sarif/RoundTrippingTests.cs +++ b/src/Test.UnitTests.Sarif/RoundTrippingTests.cs @@ -3,8 +3,11 @@ using System; using System.Globalization; + using FluentAssertions; + using Newtonsoft.Json; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Test.UnitTests.Sarif/SarifExtensionsTests.cs b/src/Test.UnitTests.Sarif/SarifExtensionsTests.cs index b6ff05fc2..47030fea7 100644 --- a/src/Test.UnitTests.Sarif/SarifExtensionsTests.cs +++ b/src/Test.UnitTests.Sarif/SarifExtensionsTests.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Text; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif @@ -139,4 +140,4 @@ public void SarifExtensions_Result_GetMessageText_Concise_Truncated() Assert.Equal(Expected, actual); } } -} \ No newline at end of file +} diff --git a/src/Test.UnitTests.Sarif/SarifUtilitiesTests.cs b/src/Test.UnitTests.Sarif/SarifUtilitiesTests.cs index 5a7fe430b..24d7c5676 100644 --- a/src/Test.UnitTests.Sarif/SarifUtilitiesTests.cs +++ b/src/Test.UnitTests.Sarif/SarifUtilitiesTests.cs @@ -1,15 +1,15 @@ // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using Castle.DynamicProxy.Generators; - -using FluentAssertions; - using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Text; +using Castle.DynamicProxy.Generators; + +using FluentAssertions; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Test.UnitTests.Sarif/ToolFormatTests.cs b/src/Test.UnitTests.Sarif/ToolFormatTests.cs index 96366997b..add79d828 100644 --- a/src/Test.UnitTests.Sarif/ToolFormatTests.cs +++ b/src/Test.UnitTests.Sarif/ToolFormatTests.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.Reflection; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Test.UnitTests.Sarif/UriConverterTests.cs b/src/Test.UnitTests.Sarif/UriConverterTests.cs index 8c5485921..58f7203d8 100644 --- a/src/Test.UnitTests.Sarif/UriConverterTests.cs +++ b/src/Test.UnitTests.Sarif/UriConverterTests.cs @@ -6,9 +6,13 @@ using System.Linq; using System.Runtime.Serialization; using System.Text; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif; + using Newtonsoft.Json; + using Xunit; namespace Microsoft.CodeAnalysis.Test.UnitTests.Sarif diff --git a/src/Test.UnitTests.Sarif/Visitors/ExtractAllArtifactionLocationsVisitorTests.cs b/src/Test.UnitTests.Sarif/Visitors/ExtractAllArtifactionLocationsVisitorTests.cs index 8d4de5276..32acda456 100644 --- a/src/Test.UnitTests.Sarif/Visitors/ExtractAllArtifactionLocationsVisitorTests.cs +++ b/src/Test.UnitTests.Sarif/Visitors/ExtractAllArtifactionLocationsVisitorTests.cs @@ -2,8 +2,11 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Collections.Generic; + using FluentAssertions; + using Microsoft.CodeAnalysis.Test.Utilities.Sarif; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Visitors diff --git a/src/Test.UnitTests.Sarif/Visitors/GitHubIngestionVisitorTests.cs b/src/Test.UnitTests.Sarif/Visitors/GitHubIngestionVisitorTests.cs index 73df73664..147ed31ed 100644 --- a/src/Test.UnitTests.Sarif/Visitors/GitHubIngestionVisitorTests.cs +++ b/src/Test.UnitTests.Sarif/Visitors/GitHubIngestionVisitorTests.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using Newtonsoft.Json; + using Xunit; using Xunit.Abstractions; diff --git a/src/Test.UnitTests.Sarif/Visitors/InsertOptionalDataVisitorTests.cs b/src/Test.UnitTests.Sarif/Visitors/InsertOptionalDataVisitorTests.cs index 4dc45f574..4bcefd0c7 100644 --- a/src/Test.UnitTests.Sarif/Visitors/InsertOptionalDataVisitorTests.cs +++ b/src/Test.UnitTests.Sarif/Visitors/InsertOptionalDataVisitorTests.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.IO; + using FluentAssertions; using Microsoft.CodeAnalysis.Sarif.Driver; @@ -11,7 +12,9 @@ using Microsoft.CodeAnalysis.Test.Utilities.Sarif; using Moq; + using Newtonsoft.Json; + using Xunit; using Xunit.Abstractions; @@ -711,4 +714,4 @@ public void InsertOptionalDataVisitor_ResolvesOriginalUriBaseIds() run.Artifacts[0].Contents.Text.Should().Be(File.ReadAllText(Path.Combine(testDirectory, inputFileName))); } } -} \ No newline at end of file +} diff --git a/src/Test.UnitTests.Sarif/Visitors/MakeUriAbsoluteVisitorTest.cs b/src/Test.UnitTests.Sarif/Visitors/MakeUriAbsoluteVisitorTest.cs index 50bcc05e5..a072e1753 100644 --- a/src/Test.UnitTests.Sarif/Visitors/MakeUriAbsoluteVisitorTest.cs +++ b/src/Test.UnitTests.Sarif/Visitors/MakeUriAbsoluteVisitorTest.cs @@ -4,7 +4,9 @@ using System; using System.Collections.Generic; using System.Linq; + using FluentAssertions; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Visitors diff --git a/src/Test.UnitTests.Sarif/Visitors/PerRunPerRuleSplittingVisitorTests.cs b/src/Test.UnitTests.Sarif/Visitors/PerRunPerRuleSplittingVisitorTests.cs index f05f33f22..28b166d29 100644 --- a/src/Test.UnitTests.Sarif/Visitors/PerRunPerRuleSplittingVisitorTests.cs +++ b/src/Test.UnitTests.Sarif/Visitors/PerRunPerRuleSplittingVisitorTests.cs @@ -1,8 +1,11 @@ // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; + using FluentAssertions; + using Microsoft.CodeAnalysis.Test.Utilities.Sarif; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Visitors diff --git a/src/Test.UnitTests.Sarif/Visitors/RebaseUriVisitorTests.cs b/src/Test.UnitTests.Sarif/Visitors/RebaseUriVisitorTests.cs index 6d699481c..b6d6a9c4a 100644 --- a/src/Test.UnitTests.Sarif/Visitors/RebaseUriVisitorTests.cs +++ b/src/Test.UnitTests.Sarif/Visitors/RebaseUriVisitorTests.cs @@ -5,9 +5,13 @@ using System.Collections.Generic; using System.IO; using System.Linq; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif.Writers; + using Newtonsoft.Json; + using Xunit; using Xunit.Abstractions; diff --git a/src/Test.UnitTests.Sarif/Visitors/RemapIndicesVisitorTests.cs b/src/Test.UnitTests.Sarif/Visitors/RemapIndicesVisitorTests.cs index af9297d39..4c6908ac0 100644 --- a/src/Test.UnitTests.Sarif/Visitors/RemapIndicesVisitorTests.cs +++ b/src/Test.UnitTests.Sarif/Visitors/RemapIndicesVisitorTests.cs @@ -88,7 +88,7 @@ public void RunMergingVisitor_RemapsNestedFilesProperly() // Confirm that Artifacts (including indirectly referenced ones) were all copied to the destination Run mergedRun.Artifacts.Count.Should().Be(baselineRun.Artifacts.Count + currentRun.Artifacts.Count); - + // Confirm that Artifacts have consistent indices in the merged Run for (int i = 0; i < mergedRun.Artifacts.Count; i++) { @@ -287,17 +287,17 @@ public void RunMergingVisitor_MapsRulesProperly() { var baselineRun = new Run { - Tool = new Tool + Tool = new Tool { - Driver = new ToolComponent - { + Driver = new ToolComponent + { Name = "Test Tool", Rules = new List() - { + { new ReportingDescriptor() { Id = "Rule001" }, new ReportingDescriptor() { Id = "Rule002" }, } - } , + }, }, Results = new List { diff --git a/src/Test.UnitTests.Sarif/Visitors/RemoveOptionalDataVisitorTests.cs b/src/Test.UnitTests.Sarif/Visitors/RemoveOptionalDataVisitorTests.cs index 7ac326b9e..9bcbb03df 100644 --- a/src/Test.UnitTests.Sarif/Visitors/RemoveOptionalDataVisitorTests.cs +++ b/src/Test.UnitTests.Sarif/Visitors/RemoveOptionalDataVisitorTests.cs @@ -1,9 +1,11 @@ // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using FluentAssertions; using System; using System.Collections.Generic; + +using FluentAssertions; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Visitors @@ -41,4 +43,4 @@ public void RemoveGuids() log.Runs[0].Results[0].Guid.Should().BeNull(); } } -} \ No newline at end of file +} diff --git a/src/Test.UnitTests.Sarif/Visitors/SarifCurrentToVersionOneVisitorTests.cs b/src/Test.UnitTests.Sarif/Visitors/SarifCurrentToVersionOneVisitorTests.cs index 4aaced590..716f2da4e 100644 --- a/src/Test.UnitTests.Sarif/Visitors/SarifCurrentToVersionOneVisitorTests.cs +++ b/src/Test.UnitTests.Sarif/Visitors/SarifCurrentToVersionOneVisitorTests.cs @@ -4,7 +4,9 @@ using Microsoft.CodeAnalysis.Sarif.VersionOne; using Microsoft.CodeAnalysis.Sarif.Visitors; using Microsoft.CodeAnalysis.Sarif.Writers; + using Newtonsoft.Json; + using Xunit; using Xunit.Abstractions; @@ -80,4 +82,4 @@ protected override string ConstructTestOutputFromInputResource(string inputResou [Fact] public void SarifTransformerTests_ToVersionOne_PopulatesRunIdAndStableId() => RunTest("OneRunWithAutomationDetails.sarif"); } -} \ No newline at end of file +} diff --git a/src/Test.UnitTests.Sarif/Visitors/SarifVersionOneToCurrentVisitorTests.cs b/src/Test.UnitTests.Sarif/Visitors/SarifVersionOneToCurrentVisitorTests.cs index bed561285..f90d576a0 100644 --- a/src/Test.UnitTests.Sarif/Visitors/SarifVersionOneToCurrentVisitorTests.cs +++ b/src/Test.UnitTests.Sarif/Visitors/SarifVersionOneToCurrentVisitorTests.cs @@ -3,7 +3,9 @@ using Microsoft.CodeAnalysis.Sarif.VersionOne; using Microsoft.CodeAnalysis.Sarif.Visitors; + using Newtonsoft.Json; + using Xunit; using Xunit.Abstractions; diff --git a/src/Test.UnitTests.Sarif/Visitors/UpdateIndicesFromLegacyDataVisitorTests.cs b/src/Test.UnitTests.Sarif/Visitors/UpdateIndicesFromLegacyDataVisitorTests.cs index afa4d59a2..c28199f56 100644 --- a/src/Test.UnitTests.Sarif/Visitors/UpdateIndicesFromLegacyDataVisitorTests.cs +++ b/src/Test.UnitTests.Sarif/Visitors/UpdateIndicesFromLegacyDataVisitorTests.cs @@ -3,7 +3,9 @@ using System; using System.Collections.Generic; + using FluentAssertions; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Visitors diff --git a/src/Test.UnitTests.Sarif/WarningsTests.cs b/src/Test.UnitTests.Sarif/WarningsTests.cs index 03c3e4e99..cae981748 100644 --- a/src/Test.UnitTests.Sarif/WarningsTests.cs +++ b/src/Test.UnitTests.Sarif/WarningsTests.cs @@ -3,6 +3,7 @@ using FluentAssertions; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Test.UnitTests.Sarif/Writers/MimeTypeTests.cs b/src/Test.UnitTests.Sarif/Writers/MimeTypeTests.cs index b65e62ffe..057918ed8 100644 --- a/src/Test.UnitTests.Sarif/Writers/MimeTypeTests.cs +++ b/src/Test.UnitTests.Sarif/Writers/MimeTypeTests.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Writers diff --git a/src/Test.UnitTests.Sarif/Writers/PrereleaseCompatibilityTransformerTests.cs b/src/Test.UnitTests.Sarif/Writers/PrereleaseCompatibilityTransformerTests.cs index 0684dde1c..3b93da522 100644 --- a/src/Test.UnitTests.Sarif/Writers/PrereleaseCompatibilityTransformerTests.cs +++ b/src/Test.UnitTests.Sarif/Writers/PrereleaseCompatibilityTransformerTests.cs @@ -3,7 +3,9 @@ using System; using System.IO; + using Newtonsoft.Json; + using Xunit; using Xunit.Abstractions; diff --git a/src/Test.UnitTests.Sarif/Writers/ResultLogJsonWriterTests.cs b/src/Test.UnitTests.Sarif/Writers/ResultLogJsonWriterTests.cs index 8f0cfed89..e650d7b4c 100644 --- a/src/Test.UnitTests.Sarif/Writers/ResultLogJsonWriterTests.cs +++ b/src/Test.UnitTests.Sarif/Writers/ResultLogJsonWriterTests.cs @@ -5,8 +5,11 @@ using System.Collections.Generic; using System.Globalization; using System.IO; + using FluentAssertions; + using Newtonsoft.Json; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Writers diff --git a/src/Test.UnitTests.Sarif/Writers/SarifConsolidatorTests.cs b/src/Test.UnitTests.Sarif/Writers/SarifConsolidatorTests.cs index 2543bd061..89a2e058b 100644 --- a/src/Test.UnitTests.Sarif/Writers/SarifConsolidatorTests.cs +++ b/src/Test.UnitTests.Sarif/Writers/SarifConsolidatorTests.cs @@ -3,7 +3,9 @@ using System; using System.Collections.Generic; + using Microsoft.CodeAnalysis.Sarif.Writers; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Test.UnitTests.Sarif/Writers/SarifLoggerTests.cs b/src/Test.UnitTests.Sarif/Writers/SarifLoggerTests.cs index 52fd9557b..3d20d1a57 100644 --- a/src/Test.UnitTests.Sarif/Writers/SarifLoggerTests.cs +++ b/src/Test.UnitTests.Sarif/Writers/SarifLoggerTests.cs @@ -8,11 +8,15 @@ using System.Linq; using System.Reflection; using System.Text; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif.Driver; using Microsoft.CodeAnalysis.Sarif.Writers; using Microsoft.CodeAnalysis.Test.Utilities.Sarif; + using Newtonsoft.Json; + using Xunit; using Xunit.Abstractions; diff --git a/src/Test.UnitTests.WorkItems/FilingClientFactoryTests.cs b/src/Test.UnitTests.WorkItems/FilingClientFactoryTests.cs index 4d1828a37..a1f3a9256 100644 --- a/src/Test.UnitTests.WorkItems/FilingClientFactoryTests.cs +++ b/src/Test.UnitTests.WorkItems/FilingClientFactoryTests.cs @@ -2,7 +2,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; + using FluentAssertions; + using Xunit; namespace Microsoft.WorkItems diff --git a/src/Test.UnitTests.WorkItems/Logging/ApplicationInsightsTelemetryInitializerTests.cs b/src/Test.UnitTests.WorkItems/Logging/ApplicationInsightsTelemetryInitializerTests.cs index b5c402f69..61085f234 100644 --- a/src/Test.UnitTests.WorkItems/Logging/ApplicationInsightsTelemetryInitializerTests.cs +++ b/src/Test.UnitTests.WorkItems/Logging/ApplicationInsightsTelemetryInitializerTests.cs @@ -2,9 +2,12 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; + using FluentAssertions; + using Microsoft.ApplicationInsights.DataContracts; using Microsoft.TeamFoundation; + using Xunit; namespace Microsoft.WorkItems.Logging diff --git a/src/Test.UnitTests.WorkItems/Logging/MetricsLogValuesTests.cs b/src/Test.UnitTests.WorkItems/Logging/MetricsLogValuesTests.cs index 9bd00c55b..382c4837f 100644 --- a/src/Test.UnitTests.WorkItems/Logging/MetricsLogValuesTests.cs +++ b/src/Test.UnitTests.WorkItems/Logging/MetricsLogValuesTests.cs @@ -4,10 +4,13 @@ using System; using System.Collections.Generic; using System.Linq; + using FluentAssertions; + using Microsoft.ApplicationInsights.DataContracts; using Microsoft.Extensions.Logging; using Microsoft.TeamFoundation; + using Xunit; namespace Microsoft.WorkItems.Logging diff --git a/src/Test.UnitTests.WorkItems/ServiceProviderFactoryTests.cs b/src/Test.UnitTests.WorkItems/ServiceProviderFactoryTests.cs index f11117137..11b799969 100644 --- a/src/Test.UnitTests.WorkItems/ServiceProviderFactoryTests.cs +++ b/src/Test.UnitTests.WorkItems/ServiceProviderFactoryTests.cs @@ -2,7 +2,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; + using FluentAssertions; + using Xunit; namespace Microsoft.WorkItems diff --git a/src/Test.Utilities.Sarif/AssertionExtensions.cs b/src/Test.Utilities.Sarif/AssertionExtensions.cs index 67d73dd1d..dd7fa9c61 100644 --- a/src/Test.Utilities.Sarif/AssertionExtensions.cs +++ b/src/Test.Utilities.Sarif/AssertionExtensions.cs @@ -4,9 +4,11 @@ using System; using System.Text.RegularExpressions; using System.Threading.Tasks; + using FluentAssertions; using FluentAssertions.Execution; using FluentAssertions.Primitives; + using Microsoft.CodeAnalysis.Test.Utilities.Sarif; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Test.Utilities.Sarif/FileDiffingFunctionalTests.cs b/src/Test.Utilities.Sarif/FileDiffingFunctionalTests.cs index 3131a3f98..8d0f543a9 100644 --- a/src/Test.Utilities.Sarif/FileDiffingFunctionalTests.cs +++ b/src/Test.Utilities.Sarif/FileDiffingFunctionalTests.cs @@ -3,6 +3,7 @@ using System; using System.IO; + using Xunit.Abstractions; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Test.Utilities.Sarif/FileDiffingUnitTests.cs b/src/Test.Utilities.Sarif/FileDiffingUnitTests.cs index 6ee23114e..0f763d45d 100644 --- a/src/Test.Utilities.Sarif/FileDiffingUnitTests.cs +++ b/src/Test.Utilities.Sarif/FileDiffingUnitTests.cs @@ -8,13 +8,17 @@ using System.Linq; using System.Reflection; using System.Text; + using FluentAssertions; + using Microsoft.CodeAnalysis.Sarif.Readers; using Microsoft.CodeAnalysis.Sarif.VersionOne; using Microsoft.CodeAnalysis.Sarif.Writers; + using Newtonsoft.Json; using Newtonsoft.Json.Linq; using Newtonsoft.Json.Serialization; + using Xunit.Abstractions; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Test.Utilities.Sarif/TestData.cs b/src/Test.Utilities.Sarif/TestData.cs index 651df9f7d..b6dd1edfb 100644 --- a/src/Test.Utilities.Sarif/TestData.cs +++ b/src/Test.Utilities.Sarif/TestData.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; + using Microsoft.CodeAnalysis.Sarif; namespace Microsoft.CodeAnalysis.Test.Utilities.Sarif @@ -306,4 +307,4 @@ public static SarifLog CreateSimpleLogWithRules(int ruleIdStartIndex, int result return sarifLog; } } -} \ No newline at end of file +} diff --git a/src/Test.Utilities.Sarif/TestMessageLogger.cs b/src/Test.Utilities.Sarif/TestMessageLogger.cs index 575b8c850..3bb345eb1 100644 --- a/src/Test.Utilities.Sarif/TestMessageLogger.cs +++ b/src/Test.Utilities.Sarif/TestMessageLogger.cs @@ -95,4 +95,4 @@ public void LogConfigurationNotification(Notification notification) ConfigurationNotifications.Add(notification); } } -} \ No newline at end of file +} diff --git a/src/Test.Utilities.Sarif/Utilities.cs b/src/Test.Utilities.Sarif/Utilities.cs index 6f3620f0c..761dc9ea3 100644 --- a/src/Test.Utilities.Sarif/Utilities.cs +++ b/src/Test.Utilities.Sarif/Utilities.cs @@ -9,8 +9,10 @@ using System.Text; using System.Xml; using System.Xml.Linq; + using Microsoft.CodeAnalysis.Sarif.Converters; using Microsoft.CodeAnalysis.Sarif.Writers; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/WorkItems/AzureDevOpsFilingClient.cs b/src/WorkItems/AzureDevOpsFilingClient.cs index 3c9ce1ae7..65271d8f0 100644 --- a/src/WorkItems/AzureDevOpsFilingClient.cs +++ b/src/WorkItems/AzureDevOpsFilingClient.cs @@ -6,12 +6,14 @@ using System.IO; using System.Linq; using System.Threading.Tasks; + using Microsoft.Extensions.Logging; using Microsoft.TeamFoundation.WorkItemTracking.WebApi.Models; using Microsoft.VisualStudio.Services.WebApi; using Microsoft.VisualStudio.Services.WebApi.Patch; using Microsoft.VisualStudio.Services.WebApi.Patch.Json; using Microsoft.WorkItems.Logging; + using Newtonsoft.Json; namespace Microsoft.WorkItems diff --git a/src/WorkItems/FilingClient.cs b/src/WorkItems/FilingClient.cs index de194f531..4786ee742 100644 --- a/src/WorkItems/FilingClient.cs +++ b/src/WorkItems/FilingClient.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.Threading.Tasks; + using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; @@ -13,7 +14,7 @@ namespace Microsoft.WorkItems /// Abstract base for classes that represents a system (for example, GitHub or Azure DevOps) /// to which work items can be filed. /// - public abstract class FilingClient: IDisposable + public abstract class FilingClient : IDisposable { public enum SourceControlProvider diff --git a/src/WorkItems/GitHubClientWrapper.cs b/src/WorkItems/GitHubClientWrapper.cs index 539b390b9..072ed6a34 100644 --- a/src/WorkItems/GitHubClientWrapper.cs +++ b/src/WorkItems/GitHubClientWrapper.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Threading.Tasks; + using Octokit; namespace Microsoft.WorkItems @@ -32,4 +33,4 @@ public Task UpdateWorkItemAsync( return this.gitHubClient.Issue.Update(organization, repository, issueNumber, issueUpdate); } } -} \ No newline at end of file +} diff --git a/src/WorkItems/GitHubConnectionFacade.cs b/src/WorkItems/GitHubConnectionFacade.cs index 09df40240..e64f1d898 100644 --- a/src/WorkItems/GitHubConnectionFacade.cs +++ b/src/WorkItems/GitHubConnectionFacade.cs @@ -3,9 +3,11 @@ using System; using System.Threading.Tasks; + using Microsoft.TeamFoundation.WorkItemTracking.WebApi; using Microsoft.VisualStudio.Services.Common; using Microsoft.VisualStudio.Services.WebApi; + using Octokit; using Octokit.Internal; @@ -29,4 +31,4 @@ async public Task ConnectAsync(string organization, string return gitHubClientWrapper; } } -} \ No newline at end of file +} diff --git a/src/WorkItems/GitHubFilingClient.cs b/src/WorkItems/GitHubFilingClient.cs index 64d36abf6..d82e1aae0 100644 --- a/src/WorkItems/GitHubFilingClient.cs +++ b/src/WorkItems/GitHubFilingClient.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.Threading.Tasks; + using Octokit; namespace Microsoft.WorkItems @@ -76,4 +77,4 @@ public override Task GetWorkItemMetadata(WorkItemModel workItemMo throw new NotImplementedException(); } } -} \ No newline at end of file +} diff --git a/src/WorkItems/IGitHubClientWrapper.cs b/src/WorkItems/IGitHubClientWrapper.cs index f93574314..d16e5ada6 100644 --- a/src/WorkItems/IGitHubClientWrapper.cs +++ b/src/WorkItems/IGitHubClientWrapper.cs @@ -1,9 +1,10 @@ // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using Octokit; using System.Threading.Tasks; +using Octokit; + namespace Microsoft.WorkItems { public interface IGitHubClientWrapper @@ -27,4 +28,4 @@ public Task UpdateWorkItemAsync( int issueNumber, IssueUpdate issueUpdate); } -} \ No newline at end of file +} diff --git a/src/WorkItems/IGitHubConnection.cs b/src/WorkItems/IGitHubConnection.cs index 5c45f4207..4bebb6fa1 100644 --- a/src/WorkItems/IGitHubConnection.cs +++ b/src/WorkItems/IGitHubConnection.cs @@ -1,10 +1,11 @@ // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using Octokit; using System; using System.Threading.Tasks; +using Octokit; + namespace Microsoft.WorkItems { /// @@ -20,4 +21,4 @@ internal interface IGitHubConnection /// Task ConnectAsync(string organization, string personalAccessToken); } -} \ No newline at end of file +} diff --git a/src/WorkItems/IVssConnection.cs b/src/WorkItems/IVssConnection.cs index e23a2f42f..c8091bed4 100644 --- a/src/WorkItems/IVssConnection.cs +++ b/src/WorkItems/IVssConnection.cs @@ -9,7 +9,7 @@ namespace Microsoft.WorkItems /// /// This interface allows for mocking of the low-level VssConnection class. /// - internal interface IVssConnection: IDisposable + internal interface IVssConnection : IDisposable { /// /// Provide for both the instantiation of the connection instance followed by @@ -26,4 +26,4 @@ internal interface IVssConnection: IDisposable /// Task GetClientAsync(); } -} \ No newline at end of file +} diff --git a/src/WorkItems/IWorkItemModelTransformer.cs b/src/WorkItems/IWorkItemModelTransformer.cs index a2c65678d..fd4d04691 100644 --- a/src/WorkItems/IWorkItemModelTransformer.cs +++ b/src/WorkItems/IWorkItemModelTransformer.cs @@ -7,4 +7,4 @@ public interface IWorkItemModelTransformer where T : WorkItemModel { void Transform(T workItemModel); } -} \ No newline at end of file +} diff --git a/src/WorkItems/IWorkItemTrackingHttpClient.cs b/src/WorkItems/IWorkItemTrackingHttpClient.cs index d0b263715..feafa02c7 100644 --- a/src/WorkItems/IWorkItemTrackingHttpClient.cs +++ b/src/WorkItems/IWorkItemTrackingHttpClient.cs @@ -6,6 +6,7 @@ using System.IO; using System.Threading; using System.Threading.Tasks; + using Microsoft.TeamFoundation.WorkItemTracking.WebApi.Models; using Microsoft.VisualStudio.Services.WebApi.Patch.Json; @@ -29,13 +30,13 @@ Task CreateAttachmentAsync( /// Creates a single work item. /// Task CreateWorkItemAsync( - JsonPatchDocument document, - string project, - string type, - bool? validateOnly = null, - bool? bypassRules = null, - bool? suppressNotifications = null, - object userState = null, + JsonPatchDocument document, + string project, + string type, + bool? validateOnly = null, + bool? bypassRules = null, + bool? suppressNotifications = null, + object userState = null, CancellationToken cancellationToken = default); /// @@ -65,4 +66,4 @@ Task GetWorkItemAsync( object userState = null, CancellationToken cancellationToken = default); } -} \ No newline at end of file +} diff --git a/src/WorkItems/Logging/ApplicationInsightsTelemetryInitializer.cs b/src/WorkItems/Logging/ApplicationInsightsTelemetryInitializer.cs index a8929376c..0a5e4b681 100644 --- a/src/WorkItems/Logging/ApplicationInsightsTelemetryInitializer.cs +++ b/src/WorkItems/Logging/ApplicationInsightsTelemetryInitializer.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; + using Microsoft.ApplicationInsights.Channel; using Microsoft.ApplicationInsights.Extensibility; diff --git a/src/WorkItems/Logging/AssemblyExtensions.cs b/src/WorkItems/Logging/AssemblyExtensions.cs index 2a9407671..7ffeb8c75 100644 --- a/src/WorkItems/Logging/AssemblyExtensions.cs +++ b/src/WorkItems/Logging/AssemblyExtensions.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using System.IO; using System.Reflection; + using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; diff --git a/src/WorkItems/Logging/LoggerExtensions.cs b/src/WorkItems/Logging/LoggerExtensions.cs index c276bb243..9e8df3af5 100644 --- a/src/WorkItems/Logging/LoggerExtensions.cs +++ b/src/WorkItems/Logging/LoggerExtensions.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; + using Microsoft.CodeAnalysis.WorkItems.Logging; using Microsoft.Extensions.Logging; @@ -12,19 +13,19 @@ public static class LoggerExtensions public static void LogMetrics(this ILogger logger, EventId eventId, IDictionary customDimensions) { LogMetrics( - logger, - eventId, - message: string.Empty, + logger, + eventId, + message: string.Empty, customDimensions); } public static void LogMetrics(this ILogger logger, EventId eventId, string message, IDictionary customDimensions) { logger.Log( - LogLevel.Information, - eventId, + LogLevel.Information, + eventId, new MetricsLogValues(message, eventId, customDimensions), - exception: null, + exception: null, (state, error) => state.ToString()); } diff --git a/src/WorkItems/Logging/LoggingContext.cs b/src/WorkItems/Logging/LoggingContext.cs index 8ecd5f58b..e18328874 100644 --- a/src/WorkItems/Logging/LoggingContext.cs +++ b/src/WorkItems/Logging/LoggingContext.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.Text; + using Microsoft.Extensions.Logging; namespace Microsoft.CodeAnalysis.WorkItems.Logging diff --git a/src/WorkItems/Logging/MetricsLogValues.cs b/src/WorkItems/Logging/MetricsLogValues.cs index 84c1dc9cb..f515db38a 100644 --- a/src/WorkItems/Logging/MetricsLogValues.cs +++ b/src/WorkItems/Logging/MetricsLogValues.cs @@ -5,6 +5,7 @@ using System.Collections; using System.Collections.Generic; using System.Linq; + using Microsoft.Extensions.Logging; namespace Microsoft.WorkItems.Logging diff --git a/src/WorkItems/Properties/AssemblyInfo.cs b/src/WorkItems/Properties/AssemblyInfo.cs index f14fe0b91..3fd1bec8e 100644 --- a/src/WorkItems/Properties/AssemblyInfo.cs +++ b/src/WorkItems/Properties/AssemblyInfo.cs @@ -1,2 +1,2 @@ // Copyright (c) Microsoft. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. \ No newline at end of file +// Licensed under the MIT license. See LICENSE file in the project root for full license information. diff --git a/src/WorkItems/ServiceProviderFactory.cs b/src/WorkItems/ServiceProviderFactory.cs index 8984d037a..06dc29bbf 100644 --- a/src/WorkItems/ServiceProviderFactory.cs +++ b/src/WorkItems/ServiceProviderFactory.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; + using Microsoft.ApplicationInsights.Channel; using Microsoft.ApplicationInsights.Extensibility; using Microsoft.Extensions.Configuration; diff --git a/src/WorkItems/VssConnectionFacade.cs b/src/WorkItems/VssConnectionFacade.cs index 43c8b26dd..9c2ae0f6d 100644 --- a/src/WorkItems/VssConnectionFacade.cs +++ b/src/WorkItems/VssConnectionFacade.cs @@ -3,6 +3,7 @@ using System; using System.Threading.Tasks; + using Microsoft.TeamFoundation.WorkItemTracking.WebApi; using Microsoft.VisualStudio.Services.Common; using Microsoft.VisualStudio.Services.WebApi; @@ -35,4 +36,4 @@ public void Dispose() } } } -} \ No newline at end of file +} diff --git a/src/WorkItems/WorkItemTrackingHttpClientWrapper.cs b/src/WorkItems/WorkItemTrackingHttpClientWrapper.cs index 17d56e50c..7caaebe59 100644 --- a/src/WorkItems/WorkItemTrackingHttpClientWrapper.cs +++ b/src/WorkItems/WorkItemTrackingHttpClientWrapper.cs @@ -6,6 +6,7 @@ using System.IO; using System.Threading; using System.Threading.Tasks; + using Microsoft.TeamFoundation.WorkItemTracking.WebApi; using Microsoft.TeamFoundation.WorkItemTracking.WebApi.Models; using Microsoft.VisualStudio.Services.WebApi.Patch.Json; @@ -22,7 +23,7 @@ public WorkItemTrackingHttpClientWrapper(WorkItemTrackingHttpClient workItemTrac } public Task CreateAttachmentAsync( - MemoryStream stream, + MemoryStream stream, string fileName = null, string uploadType = null, string areaPath = null, @@ -33,9 +34,9 @@ public Task CreateAttachmentAsync( } public Task CreateWorkItemAsync( - JsonPatchDocument document, - string project, - string type, + JsonPatchDocument document, + string project, + string type, bool? validateOnly = null, bool? bypassRules = null, bool? suppressNotifications = null, @@ -79,4 +80,4 @@ public void Dispose() } } } -} \ No newline at end of file +} From b55b45a957c71faf329e76801e5fe727942ea8e4 Mon Sep 17 00:00:00 2001 From: Eddy Nakamura Date: Fri, 16 Oct 2020 08:38:00 -0300 Subject: [PATCH 5/7] ignoring cs15xx for autogenerated files --- src/Sarif/Autogenerated/.editorconfig | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Sarif/Autogenerated/.editorconfig b/src/Sarif/Autogenerated/.editorconfig index 535ef6940..42dc2336c 100644 --- a/src/Sarif/Autogenerated/.editorconfig +++ b/src/Sarif/Autogenerated/.editorconfig @@ -5,3 +5,11 @@ root = true file_header_template = unset dotnet_separate_import_directive_groups = unset dotnet_sort_system_directives_first = unset + +dotnet_diagnostic.CS1570.severity = silent +dotnet_diagnostic.CS1572.severity = silent +dotnet_diagnostic.CS1573.severity = silent +dotnet_diagnostic.CS1574.severity = silent +dotnet_diagnostic.CS1591.severity = silent +dotnet_diagnostic.CS1712.severity = silent +dotnet_diagnostic.CS1734.severity = silent \ No newline at end of file From 9c8f61aa8e679651b9490d06b382c5bdb42aab97 Mon Sep 17 00:00:00 2001 From: Eddy Nakamura Date: Fri, 16 Oct 2020 08:58:34 -0300 Subject: [PATCH 6/7] removing editorconfig from autogerated folder --- src/Sarif/Autogenerated/.editorconfig | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 src/Sarif/Autogenerated/.editorconfig diff --git a/src/Sarif/Autogenerated/.editorconfig b/src/Sarif/Autogenerated/.editorconfig deleted file mode 100644 index 42dc2336c..000000000 --- a/src/Sarif/Autogenerated/.editorconfig +++ /dev/null @@ -1,15 +0,0 @@ -# Remove the line below if you want to inherit .editorconfig settings from higher directories -root = true - -[Autogenerated/**] -file_header_template = unset -dotnet_separate_import_directive_groups = unset -dotnet_sort_system_directives_first = unset - -dotnet_diagnostic.CS1570.severity = silent -dotnet_diagnostic.CS1572.severity = silent -dotnet_diagnostic.CS1573.severity = silent -dotnet_diagnostic.CS1574.severity = silent -dotnet_diagnostic.CS1591.severity = silent -dotnet_diagnostic.CS1712.severity = silent -dotnet_diagnostic.CS1734.severity = silent \ No newline at end of file From 9ec039fdab437da51221af0564b03ab295f5c966 Mon Sep 17 00:00:00 2001 From: Eddy Nakamura Date: Wed, 21 Oct 2020 15:12:52 -0300 Subject: [PATCH 7/7] applying format --- src/Sarif.Driver/Sdk/CommonOptionsBase.cs | 1 + src/Sarif.Multitool.Library/ApplyPolicyCommand.cs | 10 +++------- src/Sarif.Multitool.Library/ApplyPolicyOptions.cs | 1 + .../FortifyUtilitiesTests.cs | 1 + .../ApplyPolicyCommandTests.cs | 2 ++ 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/Sarif.Driver/Sdk/CommonOptionsBase.cs b/src/Sarif.Driver/Sdk/CommonOptionsBase.cs index e09ccfc71..3eab5db20 100644 --- a/src/Sarif.Driver/Sdk/CommonOptionsBase.cs +++ b/src/Sarif.Driver/Sdk/CommonOptionsBase.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using CommandLine; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.Driver diff --git a/src/Sarif.Multitool.Library/ApplyPolicyCommand.cs b/src/Sarif.Multitool.Library/ApplyPolicyCommand.cs index ee068186b..8c095b019 100644 --- a/src/Sarif.Multitool.Library/ApplyPolicyCommand.cs +++ b/src/Sarif.Multitool.Library/ApplyPolicyCommand.cs @@ -3,8 +3,8 @@ using System; using System.Diagnostics; + using Microsoft.CodeAnalysis.Sarif.Driver; -using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif.Multitool { @@ -33,11 +33,7 @@ public int Run(ApplyPolicyOptions applyPolicyOptions) string fileName = CommandUtilities.GetTransformedOutputFileName(applyPolicyOptions); - Formatting formatting = applyPolicyOptions.PrettyPrint - ? Formatting.Indented - : Formatting.None; - - WriteSarifFile(_fileSystem, actualLog, fileName, formatting); + WriteSarifFile(_fileSystem, actualLog, fileName, applyPolicyOptions.Formatting); w.Stop(); Console.WriteLine($"Rewrite completed in {w.Elapsed}."); @@ -62,4 +58,4 @@ private bool ValidateOptions(ApplyPolicyOptions applyPolicyOptions) return valid; } } -} \ No newline at end of file +} diff --git a/src/Sarif.Multitool.Library/ApplyPolicyOptions.cs b/src/Sarif.Multitool.Library/ApplyPolicyOptions.cs index b539dc330..86fc88fae 100644 --- a/src/Sarif.Multitool.Library/ApplyPolicyOptions.cs +++ b/src/Sarif.Multitool.Library/ApplyPolicyOptions.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using CommandLine; + using Microsoft.CodeAnalysis.Sarif.Driver; namespace Microsoft.CodeAnalysis.Sarif.Multitool diff --git a/src/Test.UnitTests.Sarif.Converters/FortifyUtilitiesTests.cs b/src/Test.UnitTests.Sarif.Converters/FortifyUtilitiesTests.cs index 4c8375eb6..7d7ee1fdc 100644 --- a/src/Test.UnitTests.Sarif.Converters/FortifyUtilitiesTests.cs +++ b/src/Test.UnitTests.Sarif.Converters/FortifyUtilitiesTests.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Converters.UnitTests diff --git a/src/Test.UnitTests.Sarif.Multitool.Library/ApplyPolicyCommandTests.cs b/src/Test.UnitTests.Sarif.Multitool.Library/ApplyPolicyCommandTests.cs index 2b3349e9d..f850de7fb 100644 --- a/src/Test.UnitTests.Sarif.Multitool.Library/ApplyPolicyCommandTests.cs +++ b/src/Test.UnitTests.Sarif.Multitool.Library/ApplyPolicyCommandTests.cs @@ -2,7 +2,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.IO; + using FluentAssertions; + using Xunit; namespace Microsoft.CodeAnalysis.Sarif.Multitool