Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
5fe248e
enabling some errors on build and fixing them
adamhathcock Feb 11, 2026
a9a0201
put usings on binaryreaders
adamhathcock Feb 11, 2026
99d8eb9
some build fixes
adamhathcock Feb 11, 2026
5e40949
more fixes for editorconfig
adamhathcock Feb 11, 2026
26d4919
Merge remote-tracking branch 'origin/master' into adam/fix-editorconf…
adamhathcock Feb 13, 2026
cd1684b
merge fixes
adamhathcock Feb 13, 2026
7a9c6b5
probably dispose tests
adamhathcock Feb 13, 2026
67bbdea
fix tests
adamhathcock Feb 13, 2026
eb5c5fa
some nullability fixes
adamhathcock Feb 13, 2026
5263f43
more nulls and a namespace folder fix
adamhathcock Feb 13, 2026
8669948
fmt
adamhathcock Feb 13, 2026
0db412d
test fix
adamhathcock Feb 13, 2026
7e0091c
fmt
adamhathcock Feb 13, 2026
eb5394a
Remove debug related items
adamhathcock Feb 13, 2026
2a613a8
Merge branch 'master' into adam/fix-editorconfig-errors
adamhathcock Feb 16, 2026
8e715a3
Fixed some easy suggestions
adamhathcock Feb 16, 2026
4ab03c0
fixed more
adamhathcock Feb 16, 2026
ead253a
some async fixes
adamhathcock Feb 16, 2026
be63c35
more async styling
adamhathcock Feb 16, 2026
8088f45
more styling comments
adamhathcock Feb 16, 2026
17776d0
more comments
adamhathcock Feb 16, 2026
eca7bcb
more clean up
adamhathcock Feb 16, 2026
5c1547c
build fixes
adamhathcock Feb 16, 2026
7f286da
more build fixes
adamhathcock Feb 16, 2026
33c95d7
fmt
adamhathcock Feb 16, 2026
f533b63
last style changes for now
adamhathcock Feb 16, 2026
d4af7f1
revert ARJ disposal
adamhathcock Feb 16, 2026
0cb9e5e
fmt
adamhathcock Feb 16, 2026
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
174 changes: 118 additions & 56 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -257,70 +257,83 @@ csharp_style_namespace_declarations = file_scoped
##########################################

[*.{cs,csx,cake,vb,vbx}]
dotnet_diagnostic.CA1000.severity = suggestion
dotnet_diagnostic.CA1001.severity = error
dotnet_diagnostic.CA1018.severity = error
dotnet_diagnostic.CA1000.severity = error # do not declare static members on generic types
dotnet_diagnostic.CA1001.severity = error # disposable field owners should be disposable
dotnet_diagnostic.CA1018.severity = error # mark custom attributes with AttributeUsage
dotnet_diagnostic.CA1036.severity = silent
dotnet_diagnostic.CA1051.severity = suggestion
dotnet_diagnostic.CA1068.severity = error
dotnet_diagnostic.CA1069.severity = error
dotnet_diagnostic.CA1304.severity = error
dotnet_diagnostic.CA1305.severity = suggestion
dotnet_diagnostic.CA1307.severity = suggestion
dotnet_diagnostic.CA1309.severity = suggestion
dotnet_diagnostic.CA1310.severity = error
dotnet_diagnostic.CA1507.severity = suggestion
dotnet_diagnostic.CA1513.severity = suggestion
dotnet_diagnostic.CA1707.severity = suggestion
dotnet_diagnostic.CA1708.severity = suggestion
dotnet_diagnostic.CA1711.severity = suggestion
dotnet_diagnostic.CA1716.severity = suggestion
dotnet_diagnostic.CA1720.severity = suggestion
dotnet_diagnostic.CA1725.severity = suggestion
dotnet_diagnostic.CA1805.severity = suggestion
dotnet_diagnostic.CA1816.severity = suggestion
dotnet_diagnostic.CA1822.severity = suggestion
dotnet_diagnostic.CA1825.severity = error
dotnet_diagnostic.CA1051.severity = suggestion # do not declare visible instance fields
dotnet_diagnostic.CA1068.severity = error # cancellation token parameters must come last
dotnet_diagnostic.CA1069.severity = error # enums should not have duplicate values
dotnet_diagnostic.CA1304.severity = error # specify CultureInfo for culture-sensitive operations
dotnet_diagnostic.CA1305.severity = error # specify IFormatProvider
dotnet_diagnostic.CA1307.severity = error # specify StringComparison for clarity
dotnet_diagnostic.CA1309.severity = error # use ordinal StringComparison
dotnet_diagnostic.CA1310.severity = error # specify StringComparison for correctness
dotnet_diagnostic.CA1507.severity = error # use nameof in place of string literals
dotnet_diagnostic.CA1513.severity = suggestion # use ObjectDisposedException throw helper
dotnet_diagnostic.CA1707.severity = suggestion # identifiers should not contain underscores
dotnet_diagnostic.CA1708.severity = suggestion # identifiers should differ by more than case
dotnet_diagnostic.CA1711.severity = suggestion # identifiers should not have incorrect suffixes
dotnet_diagnostic.CA1716.severity = suggestion # identifiers should not match language keywords
dotnet_diagnostic.CA1720.severity = suggestion # identifiers should not contain type names
dotnet_diagnostic.CA1725.severity = error # parameter names should match base declaration
dotnet_diagnostic.CA1805.severity = suggestion # avoid unnecessary default value initialization
dotnet_diagnostic.CA1816.severity = suggestion # call GC.SuppressFinalize correctly
dotnet_diagnostic.CA1822.severity = suggestion # mark members static when possible
dotnet_diagnostic.CA1825.severity = error # avoid zero-length array allocations
dotnet_diagnostic.CA1826.severity = silent
dotnet_diagnostic.CA1827.severity = error
dotnet_diagnostic.CA1829.severity = suggestion
dotnet_diagnostic.CA1834.severity = error
dotnet_diagnostic.CA1845.severity = suggestion
dotnet_diagnostic.CA1848.severity = suggestion
dotnet_diagnostic.CA1852.severity = suggestion
dotnet_diagnostic.CA1827.severity = error # use Any() instead of Count()/LongCount() checks
dotnet_diagnostic.CA1829.severity = error # use Length or Count property instead of LINQ Count()
dotnet_diagnostic.CA1834.severity = error # prefer StringBuilder.Append(char) for single chars
dotnet_diagnostic.CA1845.severity = error # use span-based string.Concat overloads
dotnet_diagnostic.CA1848.severity = error # use LoggerMessage for high-performance logging
dotnet_diagnostic.CA1852.severity = suggestion # seal types that are not intended for inheritance
dotnet_diagnostic.CA1860.severity = silent
dotnet_diagnostic.CA2016.severity = suggestion
dotnet_diagnostic.CA2201.severity = error
dotnet_diagnostic.CA2206.severity = error
dotnet_diagnostic.CA2208.severity = error
dotnet_diagnostic.CA2211.severity = error
dotnet_diagnostic.CA2249.severity = error
dotnet_diagnostic.CA2251.severity = error
dotnet_diagnostic.CA2016.severity = error # forward CancellationToken to invoked methods
dotnet_diagnostic.CA2201.severity = error # do not throw reserved or overly general exceptions
dotnet_diagnostic.CA2206.severity = error # enforce CA2206 usage guidance
dotnet_diagnostic.CA2208.severity = error # instantiate ArgumentException types correctly
dotnet_diagnostic.CA2211.severity = error # non-constant fields should not be visible
dotnet_diagnostic.CA2249.severity = error # prefer string.Contains over string.IndexOf checks
dotnet_diagnostic.CA2251.severity = error # use string.Equals over string.Compare equality checks
dotnet_diagnostic.CA2252.severity = none
dotnet_diagnostic.CA2254.severity = suggestion

dotnet_diagnostic.CS0169.severity = error
dotnet_diagnostic.CS0219.severity = error
dotnet_diagnostic.CS0649.severity = suggestion
dotnet_diagnostic.CS1998.severity = error
dotnet_diagnostic.CS8602.severity = error
dotnet_diagnostic.CS8604.severity = error
dotnet_diagnostic.CS8618.severity = error
dotnet_diagnostic.CS0618.severity = suggestion
dotnet_diagnostic.CS4014.severity = error
dotnet_diagnostic.CS8600.severity = error
dotnet_diagnostic.CS8603.severity = error
dotnet_diagnostic.CS8625.severity = error
dotnet_diagnostic.CA2254.severity = error # logging message templates should be static expressions

; High volume analyzers requiring extensive refactoring - set to suggestion temporarily
dotnet_diagnostic.CA1835.severity = suggestion # prefer Memory<T>-based async overloads
dotnet_diagnostic.CA1510.severity = error # use ArgumentNullException.ThrowIfNull
dotnet_diagnostic.CA1512.severity = error # use ArgumentOutOfRangeException throw helpers
dotnet_diagnostic.CA1844.severity = suggestion # provide memory-based async stream overrides
dotnet_diagnostic.CA1825.severity = error # avoid zero-length array allocations
dotnet_diagnostic.CA1712.severity = suggestion # do not prefix enum values with type name
dotnet_diagnostic.CA2022.severity = suggestion # avoid inexact reads with Stream.Read
dotnet_diagnostic.CA1850.severity = error # prefer static HashData over ComputeHash
dotnet_diagnostic.CA2263.severity = error # prefer generic overload when type is known
dotnet_diagnostic.CA2012.severity = error # use ValueTasks correctly
dotnet_diagnostic.CA1001.severity = error # disposable field owners should be disposable

dotnet_diagnostic.CS0169.severity = error # field is never used
dotnet_diagnostic.CS0219.severity = error # variable assigned but never used
dotnet_diagnostic.CS0649.severity = error # field is never assigned and remains default
dotnet_diagnostic.CS1998.severity = error # async method lacks await operators
dotnet_diagnostic.CS8602.severity = error # possible null reference dereference
dotnet_diagnostic.CS8604.severity = error # possible null reference argument
dotnet_diagnostic.CS8618.severity = error # non-nullable member is uninitialized
dotnet_diagnostic.CS0618.severity = error # obsolete member usage
dotnet_diagnostic.CS4014.severity = error # unawaited task call
dotnet_diagnostic.CS8600.severity = error # possible null to non-nullable conversion
dotnet_diagnostic.CS8603.severity = error # possible null reference return
dotnet_diagnostic.CS8625.severity = error # cannot assign null to non-nullable reference

dotnet_diagnostic.BL0005.severity = suggestion

dotnet_diagnostic.MVC1000.severity = suggestion

dotnet_diagnostic.RZ10012.severity = error

dotnet_diagnostic.IDE0004.severity = error # redundant cast
dotnet_diagnostic.IDE0004.severity = suggestion # redundant cast
dotnet_diagnostic.IDE0005.severity = suggestion
dotnet_diagnostic.IDE0007.severity = error # Use var
dotnet_diagnostic.IDE0007.severity = suggestion # Use var
dotnet_diagnostic.IDE0011.severity = error # Use braces on if statements
dotnet_diagnostic.IDE0010.severity = silent # populate switch
dotnet_diagnostic.IDE0017.severity = suggestion # initialization can be simplified
Expand All @@ -334,7 +347,7 @@ dotnet_diagnostic.IDE0028.severity = silent # expression body for accessors
dotnet_diagnostic.IDE0032.severity = suggestion # Use auto property
dotnet_diagnostic.IDE0033.severity = error # prefer tuple name
dotnet_diagnostic.IDE0037.severity = suggestion # simplify anonymous type
dotnet_diagnostic.IDE0040.severity = error # modifiers required
dotnet_diagnostic.IDE0040.severity = suggestion # modifiers required
dotnet_diagnostic.IDE0041.severity = error # simplify null
dotnet_diagnostic.IDE0042.severity = error # deconstruct variable
dotnet_diagnostic.IDE0044.severity = suggestion # make field only when possible
Expand All @@ -348,6 +361,55 @@ dotnet_diagnostic.IDE0060.severity = suggestion # unused parameters
dotnet_diagnostic.IDE0061.severity = suggestion # local expression body
dotnet_diagnostic.IDE0062.severity = suggestion # local to static
dotnet_diagnostic.IDE0063.severity = error # simplify using

[src/**/*.cs]
dotnet_diagnostic.VSTHRD002.severity = error # avoid sync waits on async operations
dotnet_diagnostic.VSTHRD100.severity = error # avoid async void methods
dotnet_diagnostic.VSTHRD101.severity = error # avoid unsupported async delegates
dotnet_diagnostic.VSTHRD102.severity = error # implement internal logic asynchronously
dotnet_diagnostic.VSTHRD103.severity = error # use async methods from async methods
dotnet_diagnostic.VSTHRD104.severity = error # offer async alternatives when possible
dotnet_diagnostic.VSTHRD107.severity = error # await task within using expression
dotnet_diagnostic.VSTHRD110.severity = error # observe result of async calls
dotnet_diagnostic.VSTHRD111.severity = error # use ConfigureAwait(bool)
dotnet_diagnostic.VSTHRD112.severity = error # implement System.IAsyncDisposable
dotnet_diagnostic.VSTHRD113.severity = error # check for System.IAsyncDisposable
dotnet_diagnostic.VSTHRD114.severity = error # avoid returning null from Task methods
dotnet_diagnostic.VSTHRD200.severity = suggestion # use Async suffix naming convention

[build/**/*.cs]
dotnet_diagnostic.VSTHRD001.severity = none # avoid legacy thread switching methods (disabled for build scripts)
dotnet_diagnostic.VSTHRD002.severity = none # avoid sync waits on async operations (disabled for build scripts)
dotnet_diagnostic.VSTHRD003.severity = none # avoid awaiting foreign tasks (disabled for build scripts)
dotnet_diagnostic.VSTHRD004.severity = none # await SwitchToMainThreadAsync (disabled for build scripts)
dotnet_diagnostic.VSTHRD010.severity = none # invoke single-threaded types on main thread (disabled for build scripts)
dotnet_diagnostic.VSTHRD011.severity = none # use AsyncLazy<T> (disabled for build scripts)
dotnet_diagnostic.VSTHRD012.severity = none # provide JoinableTaskFactory where allowed (disabled for build scripts)
dotnet_diagnostic.VSTHRD100.severity = none # avoid async void methods (disabled for build scripts)
dotnet_diagnostic.VSTHRD101.severity = none # avoid unsupported async delegates (disabled for build scripts)
dotnet_diagnostic.VSTHRD102.severity = none # implement internal logic asynchronously (disabled for build scripts)
dotnet_diagnostic.VSTHRD103.severity = none # use async methods from async methods (disabled for build scripts)
dotnet_diagnostic.VSTHRD104.severity = none # offer async alternatives when possible (disabled for build scripts)
dotnet_diagnostic.VSTHRD105.severity = none # avoid TaskScheduler.Current assumptions (disabled for build scripts)
dotnet_diagnostic.VSTHRD106.severity = none # use InvokeAsync for async events (disabled for build scripts)
dotnet_diagnostic.VSTHRD107.severity = none # await task within using expression (disabled for build scripts)
dotnet_diagnostic.VSTHRD108.severity = none # assert thread affinity unconditionally (disabled for build scripts)
dotnet_diagnostic.VSTHRD109.severity = none # switch instead of assert in async methods (disabled for build scripts)
dotnet_diagnostic.VSTHRD110.severity = none # observe result of async calls (disabled for build scripts)
dotnet_diagnostic.VSTHRD111.severity = none # use ConfigureAwait(bool) (disabled for build scripts)
dotnet_diagnostic.VSTHRD112.severity = none # implement System.IAsyncDisposable (disabled for build scripts)
dotnet_diagnostic.VSTHRD113.severity = none # check for System.IAsyncDisposable (disabled for build scripts)
dotnet_diagnostic.VSTHRD114.severity = none # avoid returning null from Task methods (disabled for build scripts)
dotnet_diagnostic.VSTHRD115.severity = none # avoid explicit null SynchronizationContext in JTC (disabled for build scripts)
dotnet_diagnostic.VSTHRD200.severity = none # use Async suffix naming convention (disabled for build scripts)

[tests/**/*.cs]
dotnet_diagnostic.CA1861.severity = suggestion # avoid constant arrays as arguments
dotnet_diagnostic.CA1305.severity = suggestion # specify IFormatProvider
dotnet_diagnostic.CA1307.severity = suggestion # specify StringComparison for clarity
dotnet_diagnostic.IDE0042.severity = suggestion
dotnet_diagnostic.IDE0051.severity = suggestion
dotnet_diagnostic.IDE0063.severity = suggestion
dotnet_diagnostic.IDE0066.severity = suggestion # switch expression
dotnet_diagnostic.IDE0072.severity = suggestion # Populate switch - forces population of all cases even when default specified
dotnet_diagnostic.IDE0078.severity = suggestion # use pattern matching
Expand All @@ -359,16 +421,16 @@ dotnet_diagnostic.IDE0200.severity = suggestion # lambda not needed
dotnet_diagnostic.IDE1006.severity = suggestion # Naming rule violation: These words cannot contain lower case characters
dotnet_diagnostic.IDE0260.severity = suggestion # Use pattern matching
dotnet_diagnostic.IDE0270.severity = suggestion # Null check simplifcation
dotnet_diagnostic.IDE0290.severity = error # Primary Constructor
dotnet_diagnostic.IDE0290.severity = suggestion # Primary Constructor
dotnet_diagnostic.IDE0300.severity = suggestion # Collection
dotnet_diagnostic.IDE0305.severity = suggestion # Collection ToList

dotnet_diagnostic.NX0001.severity = error
dotnet_diagnostic.NX0002.severity = silent
dotnet_diagnostic.NX0003.severity = silent

dotnet_diagnostic.VSTHRD110.severity = error
dotnet_diagnostic.VSTHRD107.severity = error
dotnet_diagnostic.VSTHRD110.severity = error # observe result of async calls
dotnet_diagnostic.VSTHRD107.severity = error # await task within using expression

##########################################
# Styles
Expand Down
2 changes: 0 additions & 2 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
<CodeAnalysisTreatWarningsAsErrors>true</CodeAnalysisTreatWarningsAsErrors>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<RunAnalyzersDuringLiveAnalysis>False</RunAnalyzersDuringLiveAnalysis>
<RunAnalyzersDuringBuild>False</RunAnalyzersDuringBuild>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
Expand Down
Loading