Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 8 additions & 59 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ root = true
charset = utf-8
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
insert_final_newline = true

[*.{yml,yaml}]
indent_size = 2
Expand All @@ -31,62 +31,11 @@ csharp_indent_labels = no_change
# IDE0079: Remove unnecessary suppression
dotnet_remove_unnecessary_suppression_exclusions = category:ReSharper

# IDE0079: Remove unnecessary suppression
# dotnet_diagnostic.IDE0079.severity = none

# CA2255: The 'ModuleInitializer' attribute should not be used in libraries
dotnet_diagnostic.CA2255.severity = none

# CS8600: Converting null literal or possible null value to non-nullable type.
dotnet_diagnostic.CS8600.severity = error

# CS8601: Possible null reference assignment.
dotnet_diagnostic.CS8601.severity = error

# CS8602: Dereference of a possibly null reference.
dotnet_diagnostic.CS8602.severity = error

# CS8603: Possible null reference return.
dotnet_diagnostic.CS8603.severity = error

# CS8604: Possible null reference argument.
dotnet_diagnostic.CS8604.severity = error

# CS8610: Nullability of reference types in type of parameter doesn't match overridden member.
dotnet_diagnostic.CS8610.severity = error

# CS8613: Nullability of reference types in return type doesn't match implicitly implemented member.
dotnet_diagnostic.CS8613.severity = error

# CS8614: Nullability of reference types in type of parameter doesn't match implicitly implemented member.
dotnet_diagnostic.CS8614.severity = error

# CS8618: Non-nullable field is uninitialized. Consider declaring as nullable.
dotnet_diagnostic.CS8618.severity = error

# CS8619: Nullability of reference types in value doesn't match target type.
dotnet_diagnostic.CS8619.severity = error

# CS8620: Argument cannot be used for parameter due to differences in the nullability of reference types.
dotnet_diagnostic.CS8620.severity = error

# CS8625: Cannot convert null literal to non-nullable reference type.
dotnet_diagnostic.CS8625.severity = error

# CS8634: The type cannot be used as type parameter in the generic type or method. Nullability of type argument doesn't match 'class' constraint.
dotnet_diagnostic.CS8634.severity = error

# CS8643: Nullability of reference types in explicit interface specifier doesn't match interface implemented by the type.
dotnet_diagnostic.CS8643.severity = error

# CS8653: A default expression introduces a null value for a type parameter.
dotnet_diagnostic.CS8653.severity = error

# CS8714: The type cannot be used as type parameter in the generic type or method. Nullability of type argument doesn't match 'notnull' constraint.
dotnet_diagnostic.CS8714.severity = error

# IDE0059: Unnecessary assigment of a value
dotnet_diagnostic.IDE0059.severity = none
[tests/**.cs]
# CA1707: Identifiers should not contain underscores
# Tests follow the Method_Condition_ExpectedResult naming convention.
dotnet_diagnostic.CA1707.severity = none

# IDE0060: Remove unused parameter
dotnet_diagnostic.IDE0060.severity = none
# CA1001: Types that own disposable fields should be disposable
# Test fixtures release their resources in [OneTimeTearDown] methods, which the rule does not recognize.
dotnet_diagnostic.CA1001.severity = none
14 changes: 14 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,18 @@
<PropertyGroup>
<AccelerateBuildsInVisualStudio>true</AccelerateBuildsInVisualStudio>
</PropertyGroup>

<PropertyGroup>
<NoWarn>$(NoWarn);CS0649</NoWarn>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>

<PropertyGroup>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<AnalysisLevel>latest</AnalysisLevel>
<AnalysisMode>Recommended</AnalysisMode>
<AnalysisModeStyle>Default</AnalysisModeStyle>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<CodeAnalysisTreatWarningsAsErrors>true</CodeAnalysisTreatWarningsAsErrors>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@
<Deterministic>true</Deterministic>
</PropertyGroup>

<PropertyGroup>
<NoWarn>649;1591</NoWarn>
<WarningsAsErrors>CS8600;CS8601;CS8602;CS8603;CS8604;CS8610;CS8613;CS8614;CS8618;CS8619;CS8620;CS8625;CS8643;CS8653;CS8714</WarningsAsErrors>
</PropertyGroup>

<PropertyGroup>
<RepositoryUrl>https://github.com/rameel/ramstack.fileproviders</RepositoryUrl>
<Authors>Rameel</Authors>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@
<DefineConstants>EXPOSE_FILEPATH</DefineConstants>
</PropertyGroup>

<PropertyGroup>
<NoWarn>649;1591</NoWarn>
<WarningsAsErrors>CS8600;CS8601;CS8602;CS8603;CS8604;CS8610;CS8613;CS8614;CS8618;CS8619;CS8620;CS8625;CS8643;CS8653;CS8714</WarningsAsErrors>
</PropertyGroup>

<PropertyGroup>
<RepositoryUrl>https://github.com/rameel/ramstack.fileproviders</RepositoryUrl>
<Authors>Rameel</Authors>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@
<RootNamespace>Ramstack.FileProviders</RootNamespace>
</PropertyGroup>

<PropertyGroup>
<NoWarn>649;1591</NoWarn>
<WarningsAsErrors>CS8600;CS8601;CS8602;CS8603;CS8604;CS8610;CS8613;CS8614;CS8618;CS8619;CS8620;CS8625;CS8643;CS8653;CS8714</WarningsAsErrors>
</PropertyGroup>

<PropertyGroup>
<RepositoryUrl>https://github.com/rameel/ramstack.fileproviders</RepositoryUrl>
<Authors>Rameel</Authors>
Expand Down
5 changes: 0 additions & 5 deletions src/Ramstack.FileProviders/Ramstack.FileProviders.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@
<Deterministic>true</Deterministic>
</PropertyGroup>

<PropertyGroup>
<NoWarn>649;1591</NoWarn>
<WarningsAsErrors>CS8600;CS8601;CS8602;CS8603;CS8604;CS8610;CS8613;CS8614;CS8618;CS8619;CS8620;CS8625;CS8643;CS8653;CS8714</WarningsAsErrors>
</PropertyGroup>

<PropertyGroup>
<RepositoryUrl>https://github.com/rameel/ramstack.fileproviders</RepositoryUrl>
<Authors>Rameel</Authors>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@ public ExtensionTests() =>
_provider = new PhysicalFileProvider(root: _storage.Root, ExclusionFilters.None);

[OneTimeTearDown]
public void Cleanup() =>
public void Cleanup()
{
_provider.Dispose();
_storage.Dispose();
}

[Test]
public void Structures_ShouldMatch()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ public sealed class PrefixedFileProviderTests : AbstractFileProviderTests

private readonly TempFileStorage _storage = new TempFileStorage();

[OneTimeTearDown]
public void Cleanup() =>
_storage.Dispose();

protected override IFileProvider GetFileProvider() =>
new PrefixedFileProvider("/project",
new PhysicalFileProvider(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ public sealed class TempFileStorage : IDisposable
public TempFileStorage()
{
var path = Root;
var list = new[]
{
string[] files =
[
"project/docs/user_manual.pdf",
"project/docs/api_reference.md",
"project/docs/troubleshooting/common_issues.txt",
Expand Down Expand Up @@ -79,7 +79,9 @@ public TempFileStorage()
"project/README.md",
"project/global.json",
"project/nuget.config",
}
];

var list = files
.Select(p => Path.Combine(path, p))
.ToArray();

Expand Down
Loading