.editorconfig 4.9 KB

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