.editorconfig 4.5 KB

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