github DotNetAnalyzers/StyleCopAnalyzers 1.3.79-beta

pre-release5 hours ago

This release follows 1.3.18-beta with two new rules, a round of fixes for long-standing false positives, and better code fixes. It also adds Simplified Chinese resources and documentation. Thanks to @melomory for contributing SA1317, their first contribution to the project.

Highlights

  • Two new rules, both on by default. SA1317 reports identifiers that use letters outside basic Latin A–Z, which can hide look-alike characters, and SA1653 reports partial types that have <summary> documentation on more than one part. (#3942, #4299)
  • Fewer false positives. SA1501 now allows empty catch and finally blocks, SA1118 allows multi-line tuple arguments, SA1629 accepts ! and ?, and SA1515 and SA1005 ignore tool marker comments such as ReSharper, language injection and NOSONAR. SA1305 skips DllImport parameters, and SA1402 and SA1649 accept supporting types in files with top-level statements. (#4290, #4284, #4298, #4302, #4297, #4306)
  • Better code fixes. SA1201 Fix All finishes in one pass, the SA1503 fix respects custom indentation, the SA1003 fix keeps constructor initializer line breaks, and the SA1402 fix removes unneeded usings from the files it creates. (#4277, #4294, #4280, #4307)
  • Localization. This release adds Simplified Chinese (zh-CN) resources and documentation, and finishes the Czech translations. (#4285, #4286)

Behavior changes worth knowing about

  • New rules: SA1317 (Latin-only identifiers, #3942) and SA1653 (only one partial part should have a <summary>, #4299) are both enabled by default as warnings. Codebases with non-Latin identifiers, or with summaries on several parts of a partial type, will see new diagnostics.
  • SA1601 now requires documentation on only one part of a partial type, matching how partial members already work. (#4308)
  • SA1121 now reports on the built-in type inside a using alias target instead of on every use of the alias, so a deliberate alias no longer flags each usage. (#4287)
  • SA1407 now checks bitwise operators (&, |, ^) and >>>, so mixed-precedence expressions using them get new diagnostics. (#4289)
  • SA1633: disabling one required-header rule, for example SA1637, no longer turns off the other header checks, so those checks may now report. (#4276)
  • SA1202 treats explicit interface events as public, like other explicit interface members. (#4281)
  • SA1137 now aligns type members to their most common indentation instead of to the first member. (#4301)
  • Fewer diagnostics from SA1501, SA1118, SA1629, SA1515/SA1005, SA1305, SA1402/SA1649 and SA1642 (langword markup), as described above. (#4290, #4284, #4298, #4302, #4297, #4306, #4282)
  • SA1625 has a new name and message that describe duplicate documentation accurately. Its rule ID is unchanged. (#4291)

All changes

Enhancements

  • Implement a new rule SA1317 by @melomory in #3942
  • SA1653: Detect conflicting summary documentation on partial types by @AArnott in #4299
  • SA1121: report using alias targets by @AArnott in #4287
  • SA1407: Cover bitwise and unsigned shift operators by @AArnott in #4289
  • SA1201: fix all member ordering in one pass by @AArnott in #4277
  • SA1402: Remove unused usings from extracted files by @AArnott in #4307
  • SA1141: Use IOperation for expression analysis by @AArnott in #4292
  • Add Simplified Chinese resources and documentation by @AArnott in #4285
  • Translate remaining Czech documentation text by @AArnott in #4286

Fixes

  • SA1601: only require documentation on one part of a partial type by @AArnott in #4308
  • SA1633: Keep other header checks active for optional headers by @AArnott in #4276
  • SA1501: Allow empty catch and finally blocks by @AArnott in #4290
  • SA1118: Allow multiline tuple arguments by @AArnott in #4284
  • SA1629: accept exclamation and question marks by @AArnott in #4298
  • SA1515: Exclude tool marker comments by @AArnott in #4302
  • SA1305: Skip DllImport parameter names by @AArnott in #4297
  • SA1402/SA1649: Handle files with top-level statements by @AArnott in #4306
  • SA1202: Order explicit interface events as public by @AArnott in #4281
  • SA1137: Choose common indentation for type members by @AArnott in #4301
  • SA1642: Allow langword markup in constructor standard text by @AArnott in #4282
  • SA1504: handle expression-bodied accessors by @AArnott in #4283
  • SA1003: Preserve constructor initializer line breaks in code fix by @AArnott in #4280
  • SA1503: respect custom indentation in code fix by @AArnott in #4294
  • SA1625: Describe duplicate documentation accurately by @AArnott in #4291

Documentation

  • Document rule category names by @AArnott in #4295
  • Clarify SA1200 using placement for file-scoped namespaces by @AArnott in #4288
  • Clarify SA0001 documentation analysis limitations by @AArnott in #4279
  • Improve rule page titles and remove redundant metadata tables by @AArnott in #4278

Infrastructure and build

  • Enable nullable analysis throughout sources and annotate light-up APIs by @AArnott in #4300
  • Add nullability lightup APIs by @AArnott in #4293
  • Use stronger -warnAsError except for NuGet warnings by @AArnott in #4304
  • Use async Task Main in StyleCopTester by @AArnott in #4296
  • Update dependency dotnet-sdk to v10.0.402 by @renovate[bot] in #4245
  • Update dependency System.Security.Cryptography.Pkcs to v10 by @renovate[bot] in #4303

New Contributors

Full Changelog: 1.3.18-beta...1.3.79-beta

Don't miss a new StyleCopAnalyzers release

NewReleases is sending notifications on new releases.