.editorconfig 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367
  1. [*.cs]
  2. #### Sonar rules ####
  3. # S108: Nested blocks of code should not be left empty
  4. # https://rules.sonarsource.com/csharp/RSPEC-108/
  5. dotnet_diagnostic.S108.severity = silent
  6. # S125: Sections of code should not be commented out
  7. # https://rules.sonarsource.com/csharp/RSPEC-125/
  8. dotnet_diagnostic.S125.severity = silent
  9. # S1118: Utility classes should not have public constructors
  10. # https://rules.sonarsource.com/csharp/RSPEC-1118/
  11. dotnet_diagnostic.S1118.severity = silent
  12. # S1155: "Any()" should be used to test for emptiness
  13. # https://rules.sonarsource.com/csharp/RSPEC-1155/
  14. dotnet_diagnostic.S1155.severity = silent
  15. # S1607: Tests should not be ignored
  16. # https://rules.sonarsource.com/csharp/RSPEC-1607/
  17. dotnet_diagnostic.S1607.severity = silent
  18. # S2925: "Thread.Sleep" should not be used in tests
  19. # https://rules.sonarsource.com/csharp/RSPEC-2925/
  20. dotnet_diagnostic.S2925.severity = silent
  21. # 53241: Methods should not return values that are never used
  22. # https://rules.sonarsource.com/csharp/RSPEC-3241/
  23. dotnet_diagnostic.S3241.severity = silent
  24. # S3415: Assertion arguments should be passed in the correct order
  25. # https://rules.sonarsource.com/csharp/RSPEC-3415/
  26. dotnet_diagnostic.S3415.severity = silent
  27. # S3881: "IDisposable" should be implemented correctly
  28. # https://rules.sonarsource.com/csharp/RSPEC-3881/
  29. dotnet_diagnostic.S3881.severity = silent
  30. # S3966: Objects should not be disposed more than once
  31. # https://rules.sonarsource.com/csharp/RSPEC-3966/
  32. dotnet_diagnostic.S3966.severity = silent
  33. # S4144: Methods should not have identical implementations
  34. # https://rules.sonarsource.com/csharp/RSPEC-4144/
  35. dotnet_diagnostic.S4144.severity = silent
  36. # S6602: "Find" method should be used instead of the "FirstOrDefault" extension
  37. # https://rules.sonarsource.com/csharp/RSPEC-6602/
  38. dotnet_diagnostic.S6602.severity = silent
  39. # S6610: "StartsWith" and "EndsWith" overloads that take a "char" should be used instead of the ones that take a "string"
  40. # https://rules.sonarsource.com/csharp/RSPEC-6610/
  41. dotnet_diagnostic.S6610.severity = silent
  42. #### SYSLIB diagnostics ####
  43. # SYSLIB1045: Use 'GeneratedRegexAttribute' to generate the regular expression implementation at compile-time
  44. #
  45. # TODO: Remove this when https://github.com/sshnet/SSH.NET/issues/1131 is implemented.
  46. dotnet_diagnostic.SYSLIB1045.severity = silent
  47. ### StyleCop Analyzers rules ###
  48. # SA1000: Keywords must be spaced correctly
  49. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1000.md
  50. dotnet_diagnostic.SA1000.severity = silent
  51. # SA1004: Documentation lines must begin with single space
  52. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1004.md
  53. dotnet_diagnostic.SA1004.severity = silent
  54. # SA1005: Single line comments must begin with single space
  55. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1005.md
  56. dotnet_diagnostic.SA1005.severity = silent
  57. # SA1012: Opening braces must be spaced correctly
  58. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1012.md
  59. dotnet_diagnostic.SA1012.severity = silent
  60. # SA1025: Code must not contain multiple whitespace in a row
  61. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1025.md
  62. dotnet_diagnostic.SA1025.severity = silent
  63. # SA1028: Code must not contain trailing whitespace
  64. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1028.md
  65. dotnet_diagnostic.SA1028.severity = silent
  66. # SA1111: Closing parenthesis must be on line of last parameter
  67. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1111.md
  68. dotnet_diagnostic.SA1111.severity = silent
  69. # SA1117: Parameters must be on same line or separate lines
  70. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1117.md
  71. dotnet_diagnostic.SA1117.severity = silent
  72. # SA1119: Statement must not use unnecessary parenthesis
  73. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1119.md
  74. dotnet_diagnostic.SA1119.severity = silent
  75. # SA1122: Use String.Empty for empty strings
  76. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1122.md
  77. dotnet_diagnostic.SA1122.severity = silent
  78. # SA1123:Do not place regions within elements
  79. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1123.md
  80. dotnet_diagnostic.SA1123.severity = silent
  81. # SA1130: Use lambda syntax
  82. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1130.md
  83. dotnet_diagnostic.SA1130.severity = silent
  84. # SA1133: Do not combine attributes
  85. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1133.md
  86. dotnet_diagnostic.SA1133.severity = silent
  87. # SA1203: Constants must appear before fields
  88. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1203.md
  89. dotnet_diagnostic.SA1203.severity = silent
  90. # SA1204: Static elements must appear before instance elements
  91. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1204.md
  92. dotnet_diagnostic.SA1204.severity = silent
  93. # SA1400: Access modifier must be declared
  94. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1400.md
  95. dotnet_diagnostic.SA1400.severity = silent
  96. # SA1401: Fields must be private
  97. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1401.md
  98. dotnet_diagnostic.SA1401.severity = silent
  99. # SA1411: Attribute constructor must not use unnecessary parenthesis
  100. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1411.md
  101. dotnet_diagnostic.SA1411.severity = silent
  102. # SA1505: Opening braces must not be followed by blank line
  103. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1505.md
  104. dotnet_diagnostic.SA1505.severity = silent
  105. # SA1507: Code must not contain multiple blank lines in a row
  106. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1507.md
  107. dotnet_diagnostic.SA1507.severity = silent
  108. # SA1508: Closing braces must not be preceded by blank line
  109. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1508.md
  110. dotnet_diagnostic.SA1508.severity = silent
  111. # SA1510: Chained statement blocks must not be preceded by blank line
  112. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1510.md
  113. dotnet_diagnostic.SA1510.severity = silent
  114. # SA1512: Single line comments must not be followed by blank line
  115. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1512.md
  116. dotnet_diagnostic.SA1512.severity = silent
  117. # SA1513: Closing brace must be followed by blank line
  118. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1513.md
  119. dotnet_diagnostic.SA1513.severity = silent
  120. # SA1514: Element documentation header must be preceded by blank line
  121. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1514.md
  122. dotnet_diagnostic.SA1514.severity = silent
  123. # SA1515: Single line comment must be preceded by blank line
  124. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1515.md
  125. dotnet_diagnostic.SA1515.severity = silent
  126. # SA1517: Code must not contain blank lines at start of file
  127. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1517.md
  128. dotnet_diagnostic.SA1517.severity = silent
  129. # SA1518: Use line endings correctly at end of file
  130. https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1518.md
  131. dotnet_diagnostic.SA1518.severity = silent
  132. # SA1626: Single line comments must not use documentation style slashes
  133. https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1626.md
  134. dotnet_diagnostic.SA1626.severity = silent
  135. #### Meziantou.Analyzer rules ####
  136. # MA0001: StringComparison is missing
  137. # https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0001.md
  138. dotnet_diagnostic.MA0001.severity = silent
  139. # MA0003: Add parameter name to improve readability
  140. # https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0003.md
  141. dotnet_diagnostic.MA0003.severity = silent
  142. # MA0004: Use Task.ConfigureAwait(false)
  143. # https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0004.md
  144. dotnet_diagnostic.MA0004.severity = silent
  145. # MA0011: IFormatProvider is missing
  146. # https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0011.md
  147. dotnet_diagnostic.MA0011.severity = silent
  148. # MA0042: Do not use blocking calls in an async method
  149. # https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0042.md
  150. dotnet_diagnostic.MA0042.severity = silent
  151. # MA0043: Use nameof operator in ArgumentException
  152. # https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0043.md
  153. dotnet_diagnostic.MA0043.severity = silent
  154. # MA0046: Use EventHandler<T> to declare events
  155. # https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0046.md
  156. dotnet_diagnostic.MA0046.severity = silent
  157. # MA0053: Make class sealed
  158. # https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0053.md
  159. dotnet_diagnostic.MA0053.severity = silent
  160. # MA0060: The value returned by Stream.Read/Stream.ReadAsync is not used
  161. # https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0060.md
  162. dotnet_diagnostic.MA0060.severity = silent
  163. # MA0074: Avoid implicit culture-sensitive methods
  164. # https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0074.md
  165. dotnet_diagnostic.MA0074.severity = silent
  166. # MA0075: Do not use implicit culture-sensitive ToString
  167. # https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0075.md
  168. dotnet_diagnostic.MA0075.severity = silent
  169. # MA0076: Do not use implicit culture-sensitive ToString in interpolated strings
  170. # https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0076.md
  171. dotnet_diagnostic.MA0076.severity = silent
  172. # MA0099 - Use Explicit enum value instead of 0
  173. # https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0099.md
  174. dotnet_diagnostic.MA0099.severity = silent
  175. # MA0101: String contains an implicit end of line character
  176. # https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0101.md
  177. dotnet_diagnostic.MA0101.severity = silent
  178. # MA0110: Use the Regex source generator
  179. # https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0110.md
  180. dotnet_diagnostic.MA0110.severity = silent
  181. # MA0026: Fix TODO comment
  182. # https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0026.md
  183. dotnet_diagnostic.MA0026.severity = silent
  184. # MA0089: Optimize string method usage
  185. # https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0089.md
  186. dotnet_diagnostic.MA0089.severity = silent
  187. #### .NET Compiler Platform analysers rules ####
  188. # CA1031: Do not catch general exception types
  189. # https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1031
  190. dotnet_diagnostic.CA1031.severity = silent
  191. # CA1052: Static holder types should be Static or NotInheritable
  192. # https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1052
  193. dotnet_diagnostic.CA1052.severity = silent
  194. # CA1062: Validate arguments of public methods
  195. # https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1062
  196. dotnet_diagnostic.CA1062.severity = silent
  197. # CA1063: Implement IDisposable correctly
  198. # https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1063
  199. dotnet_diagnostic.CA1063.severity = silent
  200. # CA1307: Specify StringComparison for clarity
  201. # https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1307
  202. dotnet_diagnostic.CA1307.severity = silent
  203. # CA1310: Specify StringComparison for correctness
  204. # https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1310
  205. dotnet_diagnostic.CA1310.severity = silent
  206. # CA1507: Use nameof in place of string
  207. # https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1507
  208. dotnet_diagnostic.CA1507.severity = silent
  209. # CA1827: Do not use Count()/LongCount() when Any() can be used
  210. # https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1827
  211. dotnet_diagnostic.CA1827.severity = silent
  212. # CA1515: Consider making public types internal
  213. # https://learn.microsoft.com/en-ca/dotnet/fundamentals/code-analysis/quality-rules/ca1515
  214. dotnet_diagnostic.CA1515.severity = silent
  215. # CA1816: Call GC.SuppressFinalize correctly
  216. # https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1816
  217. dotnet_diagnostic.CA1816.severity = silent
  218. # CA1822: Mark members as static
  219. # https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1822
  220. dotnet_diagnostic.CA1822.severity = silent
  221. # CA1840: Use Environment.CurrentManagedThreadId instead of Thread.CurrentThread.ManagedThreadId
  222. # https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1840
  223. dotnet_diagnostic.CA1840.severity = silent
  224. # CA1851: Possible multiple enumerations of IEnumerable collection
  225. # https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1851
  226. dotnet_diagnostic.CA1851.severity = silent
  227. # CA1859: Use concrete types when possible for improved performance
  228. # https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1859
  229. dotnet_diagnostic.CA1859.severity = silent
  230. # CA2000: Dispose objects before losing scope
  231. # https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2000
  232. dotnet_diagnostic.CA2000.severity = silent
  233. # CA2007: Do not directly await a Task
  234. # https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2007
  235. dotnet_diagnostic.CA2007.severity = silent
  236. # CA2008: Do not create tasks without passing a TaskScheduler
  237. # https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2008
  238. dotnet_diagnostic.CA2008.severity = silent
  239. # CA2201: Do not raise reserved exception types
  240. # https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2201
  241. dotnet_diagnostic.CA2201.severity = silent
  242. # CA2213: Disposable fields should be disposed
  243. # https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2213
  244. dotnet_diagnostic.CA2213.severity = silent
  245. # CA2234: Pass System.Uri objects instead of strings
  246. # https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2234
  247. dotnet_diagnostic.CA2234.severity = silent
  248. # IDE0007: Use var instead of explicit type
  249. # https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0007
  250. dotnet_diagnostic.IDE0007.severity = silent
  251. # IDE0028: Use collection initializers
  252. # https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0028
  253. dotnet_diagnostic.IDE0028.severity = silent
  254. # IDE0058: Remove unnecessary expression value
  255. # https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0058
  256. dotnet_diagnostic.IDE0058.severity = silent
  257. # IDE0059: Remove unnecessary value assignment
  258. # https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0059
  259. dotnet_diagnostic.IDE0059.severity = silent
  260. # IDE0230: Use UTF-8 string literal
  261. # https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0230
  262. dotnet_diagnostic.IDE0230.severity = silent
  263. # IDE0046: Use conditional expression for return
  264. # https://learn.microsoft.com/en-ca/dotnet/fundamentals/code-analysis/style-rules/ide0046
  265. dotnet_diagnostic.IDE0046.severity = silent
  266. # IDE0047: Remove unnecessary parentheses
  267. # https://learn.microsoft.com/en-ca/dotnet/fundamentals/code-analysis/style-rules/ide0047-ide0048
  268. dotnet_diagnostic.IDE0047.severity = silent
  269. # IDE0032: Use auto-implemented property
  270. # https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0032
  271. dotnet_diagnostic.IDE0032.severity = silent
  272. # CA1849: Call async methods when in an async method
  273. dotnet_diagnostic.CA1849.severity = silent