Skip to content

Commit

Permalink
chore: Remove SA1124 override (#604)
Browse files Browse the repository at this point in the history
  • Loading branch information
DaveTryon authored Jul 2, 2024
1 parent 9556747 commit 494fa75
Show file tree
Hide file tree
Showing 8 changed files with 0 additions and 51 deletions.
4 changes: 0 additions & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -521,10 +521,6 @@ dotnet_diagnostic.SA1024.severity = suggestion
# SA1101: Prefix local calls with this
dotnet_diagnostic.SA1101.severity = suggestion

# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1124.md
# SA1124: Do not use regions
dotnet_diagnostic.SA1124.severity = suggestion

# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1200.md
# SA1200: Using directive should appear within a namespace declaration
dotnet_diagnostic.SA1200.severity = suggestion
Expand Down
4 changes: 0 additions & 4 deletions src/Microsoft.Sbom.Api/Manifest/Configuration/SBOMConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,6 @@ public void StartJsonSerialization()
JsonSerializer = new ManifestToolJsonSerializer(fileStream);
}

#region Disposable implementation

public void Dispose()
{
Dispose(disposing: true);
Expand Down Expand Up @@ -138,6 +136,4 @@ protected virtual async ValueTask DisposeAsyncCore()
fileStream = null;
JsonSerializer = null;
}

#endregion
}
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,6 @@ public void ApplyToEachConfig(Action<ISbomConfig> action)
}
}

#region IInternalMetadataProvider implementation

public object GetMetadata(MetadataKey key)
{
if (MetadataDictionary.TryGetValue(key, out var value))
Expand Down Expand Up @@ -207,10 +205,6 @@ public string GetSBOMNamespaceUri()
throw new Exception($"Unable to find any provider to generate the namespace.");
}

#endregion

#region Disposable implementation

public void Dispose()
{
Dispose(disposing: true);
Expand Down Expand Up @@ -240,6 +234,4 @@ protected virtual async ValueTask DisposeAsyncCore()
await config.Value.DisposeAsync().ConfigureAwait(false);
}
}

#endregion
}
4 changes: 0 additions & 4 deletions src/Microsoft.Sbom.Api/Utils/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,5 @@ public static class Constants
public const string CatalogFileName = "manifest.cat";
public const string BsiFileName = "bsi.json";

#region Configuration switches

public const string DeleteManifestDirBoolVariableName = "DeleteManifestDirIfPresent";

#endregion
}
2 changes: 0 additions & 2 deletions src/Microsoft.Sbom.Api/Utils/Events.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ namespace Microsoft.Sbom.Api.Utils;

internal static class Events
{
#region Generation
internal const string SBOMGenerationWorkflow = "Total generation time";
internal const string SBOMParseMetadata = "Total metadata parsing time";
internal const string FilesGeneration = "Files generation time";
Expand All @@ -14,6 +13,5 @@ internal static class Events
internal const string MetadataBuilder = "Metadata build time for {0} format";
internal const string ExternalDocumentReferenceGeneration = "External document reference generation time";

#endregion
internal const string SBOMValidationWorkflow = "Total validation time";
}
4 changes: 0 additions & 4 deletions src/Microsoft.Sbom.Extensions/MetadataKey.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ public enum MetadataKey
/// these variables, go to
/// https://docs.microsoft.com/en-us/azure/devops/pipelines/build/variables?view=azure-devops&tabs=yaml#build-variables-devops-services
/// </summary>
#region Azure DevOps Pipelines metadata

Build_BuildId,
Build_DefinitionName,
Build_Repository_Uri,
Expand All @@ -62,6 +60,4 @@ public enum MetadataKey
ImageVersion,
OrganizationId,
ProjectId

#endregion
}
7 changes: 0 additions & 7 deletions src/Microsoft.Sbom.Parsers.Spdx22SbomParser/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ internal static class Constants
internal const string SPDXDocumentIdValue = "SPDXRef-DOCUMENT";
internal const string RootPackageIdValue = "SPDXRef-RootPackage";
internal const string SPDXRefFile = "SPDXRef-File";
#region Headers

internal const string SPDXVersionHeaderName = "spdxVersion";
internal const string DataLicenseHeaderName = "dataLicense";
Expand All @@ -29,17 +28,11 @@ internal static class Constants
internal const string RelationshipsArrayHeaderName = "relationships";
internal const string ExternalDocumentRefArrayHeaderName = "externalDocumentRefs";

#endregion

internal const int ReadBufferSize = 4096;

#region Value format strings

internal const string SPDXDocumentNameFormatString = "{0} {1}";
internal const string PackageSupplierFormatString = "Organization: {0}";

#endregion

/// <summary>
/// Use if there is no available information for a field.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,31 +17,13 @@ namespace Microsoft.Sbom.Parsers.Spdx22SbomParser.Entities.Enums;
Justification = "These are enum types that are case sensitive and defined by external code.")]
public enum ExternalRepositoryType
{
#region Security
cpe22,
cpe23,

#endregion

#region Persistent-Id

swh,

#endregion

#region Package-Manager

maven_central,
npm,
nuget,
bower,
purl,

#endregion

#region Other

idstring

#endregion
}

0 comments on commit 494fa75

Please sign in to comment.