Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing rules in analysislevel_<version>_all.globalconfig #7263

Open
joegoldman2 opened this issue Mar 24, 2024 · 1 comment
Open

Missing rules in analysislevel_<version>_all.globalconfig #7263

joegoldman2 opened this issue Mar 24, 2024 · 1 comment

Comments

@joegoldman2
Copy link
Contributor

Several rules are missing in the file analysislevel_<version>_all.globalconfig (automatically included with AnalysisMode = All):

  • CA1005: Avoid excessive parameters on generic types
  • CA1010: Collections should implement generic interface
  • CA1021: Avoid out parameters
  • CA1045: Do not pass types by reference
  • CA1060: Move P/Invokes to NativeMethods class
  • CA1416: Validate platform compatibility
  • CA1417: Do not use OutAttribute on string parameters for P/Invokes
  • CA1418: Validate platform compatibility
  • CA1422: Validate platform compatibility - obsoleted APIs
  • CA1501: Avoid excessive inheritance
  • CA1502: Avoid excessive complexity
  • CA1505: Avoid unmaintainable code
  • CA1506: Avoid excessive class coupling
  • CA1509: Invalid entry in code metrics configuration file
  • CA1714: Flags enums should have plural names
  • CA1717: Only FlagsAttribute enums should have plural names
  • CA1831: Use AsSpan instead of Range-based indexers for string when appropriate
  • CA1857: The parameter expects a constant for optimal performance
  • CA2013: Do not use ReferenceEquals with value types
  • CA2014: Do not use stackalloc in loops
  • CA2015: Do not define finalizers for types derived from MemoryManager
  • CA2017: Parameter count mismatch
  • CA2018: The count argument to Buffer.BlockCopy should specify the number of bytes to copy
  • CA2021: Don't call Enumerable.Cast or Enumerable.OfType with incompatible types
  • CA2200: Rethrow to preserve stack details
  • CA2247: Argument passed to TaskCompletionSource constructor should be TaskCreationOptions enum instead of TaskContinuationOptions enum
  • CA2255: The ModuleInitializer attribute should not be used in libraries
  • CA2256: All members declared in parent interfaces must have an implementation in a DynamicInterfaceCastableImplementation-attributed interface
  • CA2257: Members defined on an interface with the 'DynamicInterfaceCastableImplementationAttribute' should be 'static'
  • CA2258: Providing a 'DynamicInterfaceCastableImplementation' interface in Visual Basic is unsupported
  • CA2259: Ensure ThreadStatic is only used with static fields
  • CA2260: Implement generic math interfaces correctly
  • CA2261: Do not use ConfigureAwaitOptions.SuppressThrowing with Task

Is there any particular reason not to include them? For example, the rule CA1005 is not enabled by default according to the documentation, so I imagine it must be included in the globalconfig.

@joegoldman2
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant