.editorconfig 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  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. # S3966: Objects should not be disposed more than once
  22. dotnet_diagnostic.S3966.severity = suggestion
  23. #### Meziantou.Analyzer rules ####
  24. # MA0089: Optimize string method usage
  25. # https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0089.md
  26. dotnet_diagnostic.MA0089.severity = suggestion
  27. #MA0136 - Raw String contains an implicit end of line character
  28. dotnet_diagnostic.MA0136.severity = none
  29. #### StyleCop rules ####
  30. # SA1202: Elements must be ordered by access
  31. dotnet_diagnostic.SA1202.severity = none
  32. # SA1600: Elements must be documented
  33. #
  34. # For unit test projects, we do not care about documentation.
  35. dotnet_diagnostic.SA1600.severity = none
  36. # SA1601: Partial elements should be documented
  37. #
  38. # For unit test projects, we do not care about documentation.
  39. dotnet_diagnostic.SA1601.severity = none
  40. # SA1602: Enumeration items must be documented
  41. #
  42. # For unit test projects, we do not care about documentation.
  43. dotnet_diagnostic.SA1602.severity = none
  44. # SA1604: Element documentation should have summary
  45. #
  46. # TODO: Remove this when code has been updated!
  47. dotnet_diagnostic.SA1604.severity = none
  48. # SA1606: Element documentation should have summary text
  49. #
  50. # TODO: Remove this when code has been updated!
  51. dotnet_diagnostic.SA1606.severity = none
  52. # SA1607: Partial element documentation should have summary text
  53. #
  54. # For unit test projects, we do not care about documentation.
  55. dotnet_diagnostic.SA1607.severity = none
  56. # SA1611: Element parameters must be documented
  57. #
  58. # For unit test projects, we do not care about documentation.
  59. dotnet_diagnostic.SA1611.severity = none
  60. # SA1614: Element parameter documentation must have text
  61. #
  62. # TODO: Remove this when code has been updated!
  63. dotnet_diagnostic.SA1614.severity = none
  64. # SA1615: Element return value must be documented
  65. #
  66. # For unit test projects, we do not care about documentation.
  67. dotnet_diagnostic.SA1615.severity = none
  68. # SA1616: Element return value documentation should have text
  69. #
  70. # TODO: Remove this when code has been updated!
  71. dotnet_diagnostic.SA1616.severity = none
  72. # SA1623: Property summary documentation must match accessors
  73. #
  74. # TODO: Remove this when code has been updated!
  75. dotnet_diagnostic.SA1623.severity = none
  76. # SA1629: Documentation text must end with a period
  77. #
  78. # For unit test projects, we do not care about documentation.
  79. dotnet_diagnostic.SA1629.severity = none
  80. #### .NET Compiler Platform analysers rules ####
  81. # CA1001: Types that own disposable fields should be disposable
  82. #
  83. # We do not care about this for unit tests.
  84. dotnet_diagnostic.CA1001.severity = none
  85. # CA1707: Identifiers should not contain underscores
  86. #
  87. # We frequently use underscores in test classes and test methods.
  88. dotnet_diagnostic.CA1707.severity = none
  89. # CA1824: Mark assemblies with NeutralResourcesLanguageAttribute
  90. # https://learn.microsoft.com/en-US/dotnet/fundamentals/code-analysis/quality-rules/ca1824
  91. #
  92. # We do not care (much) about performance for tests.
  93. dotnet_diagnostic.CA1824.severity = none
  94. # CA1835: Prefer the memory-based overloads of ReadAsync/WriteAsync methods in stream-based classes
  95. # https://learn.microsoft.com/en-US/dotnet/fundamentals/code-analysis/quality-rules/ca1835
  96. #
  97. # We do not care about this for unit tests.
  98. dotnet_diagnostic.CA1835.severity = none
  99. # CA1711: Identifiers should not have incorrect suffix
  100. #
  101. # We frequently define test classes and test method with a suffix that refers to a type.
  102. dotnet_diagnostic.CA1711.severity = none
  103. # CA1720: Identifiers should not contain type names
  104. #
  105. # We do not care about this for unit tests.
  106. dotnet_diagnostic.CA1720.severity = none
  107. # CA1861: Avoid constant arrays as arguments
  108. #
  109. # We do not care about this for unit tests.
  110. dotnet_diagnostic.CA1861.severity = none
  111. # CA5351: Do not use broken cryptographic algorithms
  112. #
  113. # We do not care about this for unit tests.
  114. dotnet_diagnostic.CA5351.severity = none
  115. # CA5394: Do not use insecure randomness
  116. #
  117. # We do not care about this for unit tests.
  118. dotnet_diagnostic.CA5394.severity = none
  119. # IDE0078: Use pattern matching (may change code meaning)
  120. dotnet_diagnostic.IDE0078.severity = none