.editorconfig 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. [*.cs]
  2. #### Sonar rules ####
  3. # S1215: ""GC.Collect" should not be called
  4. # https://rules.sonarsource.com/csharp/RSPEC-1215
  5. dotnet_diagnostic.S1215.severity = none
  6. # S1854: Unused assignments should be removed
  7. # https://rules.sonarsource.com/csharp/RSPEC-1854
  8. #
  9. # We sometimes increment the value of a variable on each use to make the code future-proof.
  10. #
  11. # For example:
  12. # int idSequence = 0;
  13. # var train1 = new Train { Id = ++idSequence };
  14. # var train2 = new Train { Id = ++idSequence };
  15. #
  16. # The increment of 'idSequence' in the last line will cause this diagnostic to be reported. We prefer to keep the increment to make
  17. # sure the value of the variable will remain correct when we introduce a 'train3'.
  18. #
  19. # For unit tests, we do not care about this diagnostic.
  20. dotnet_diagnostic.S1854.severity = none
  21. #### Meziantou.Analyzer rules ####
  22. # MA0089: Optimize string method usage
  23. # https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0089.md
  24. dotnet_diagnostic.MA0089.severity = suggestion
  25. #### StyleCop rules ####
  26. # SA1202: Elements must be ordered by access
  27. dotnet_diagnostic.SA1202.severity = none
  28. # SA1600: Elements must be documented
  29. #
  30. # For unit test projects, we do not care about documentation.
  31. dotnet_diagnostic.SA1600.severity = none
  32. # SA1601: Partial elements should be documented
  33. #
  34. # For unit test projects, we do not care about documentation.
  35. dotnet_diagnostic.SA1601.severity = none
  36. # SA1602: Enumeration items must be documented
  37. #
  38. # For unit test projects, we do not care about documentation.
  39. dotnet_diagnostic.SA1602.severity = none
  40. # SA1604: Element documentation should have summary
  41. #
  42. # TODO: Remove this when code has been updated!
  43. dotnet_diagnostic.SA1604.severity = none
  44. # SA1606: Element documentation should have summary text
  45. #
  46. # TODO: Remove this when code has been updated!
  47. dotnet_diagnostic.SA1606.severity = none
  48. # SA1607: Partial element documentation should have summary text
  49. #
  50. # For unit test projects, we do not care about documentation.
  51. dotnet_diagnostic.SA1607.severity = none
  52. # SA1611: Element parameters must be documented
  53. #
  54. # For unit test projects, we do not care about documentation.
  55. dotnet_diagnostic.SA1611.severity = none
  56. # SA1614: Element parameter documentation must have text
  57. #
  58. # TODO: Remove this when code has been updated!
  59. dotnet_diagnostic.SA1614.severity = none
  60. # SA1615: Element return value must be documented
  61. #
  62. # For unit test projects, we do not care about documentation.
  63. dotnet_diagnostic.SA1615.severity = none
  64. # SA1616: Element return value documentation should have text
  65. #
  66. # TODO: Remove this when code has been updated!
  67. dotnet_diagnostic.SA1616.severity = none
  68. # SA1623: Property summary documentation must match accessors
  69. #
  70. # TODO: Remove this when code has been updated!
  71. dotnet_diagnostic.SA1623.severity = none
  72. # SA1629: Documentation text must end with a period
  73. #
  74. # For unit test projects, we do not care about documentation.
  75. dotnet_diagnostic.SA1629.severity = none
  76. #### .NET Compiler Platform analysers rules ####
  77. # CA1001: Types that own disposable fields should be disposable
  78. #
  79. # We do not care about this for unit tests.
  80. dotnet_diagnostic.CA1001.severity = none
  81. # CA1707: Identifiers should not contain underscores
  82. #
  83. # We frequently use underscores in test classes and test methods.
  84. dotnet_diagnostic.CA1707.severity = none
  85. # CA1824: Mark assemblies with NeutralResourcesLanguageAttribute
  86. # https://learn.microsoft.com/en-US/dotnet/fundamentals/code-analysis/quality-rules/ca1824
  87. #
  88. # We do not care (much) about performance for tests.
  89. dotnet_diagnostic.CA1824.severity = none
  90. # CA1835: Prefer the memory-based overloads of ReadAsync/WriteAsync methods in stream-based classes
  91. # https://learn.microsoft.com/en-US/dotnet/fundamentals/code-analysis/quality-rules/ca1835
  92. #
  93. # We do not care about this for unit tests.
  94. dotnet_diagnostic.CA1835.severity = none
  95. # CA1711: Identifiers should not have incorrect suffix
  96. #
  97. # We frequently define test classes and test method with a suffix that refers to a type.
  98. dotnet_diagnostic.CA1711.severity = none
  99. # CA1720: Identifiers should not contain type names
  100. #
  101. # We do not care about this for unit tests.
  102. dotnet_diagnostic.CA1720.severity = none
  103. # CA5351: Do not use broken cryptographic algorithms
  104. #
  105. # We do not care about this for unit tests.
  106. dotnet_diagnostic.CA5351.severity = none
  107. # CA5394: Do not use insecure randomness
  108. #
  109. # We do not care about this for unit tests.
  110. dotnet_diagnostic.CA5394.severity = none