.editorconfig 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416
  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. # S1144: Unused private types or members should be removed
  10. # https://rules.sonarsource.com/csharp/RSPEC-1144/
  11. dotnet_diagnostic.S1144.severity = silent
  12. # S1186: Methods should not be empty
  13. # https://rules.sonarsource.com/csharp/RSPEC-1186/
  14. dotnet_diagnostic.S1186.severity = silent
  15. # S1607: Tests should not be ignored
  16. # https://rules.sonarsource.com/csharp/RSPEC-1607/
  17. dotnet_diagnostic.S1607.severity = silent
  18. # S2094: Classes should not be empty
  19. # https://rules.sonarsource.com/csharp/RSPEC-2094/
  20. dotnet_diagnostic.S2094.severity = silent
  21. # S2187: Test classes should contain at least one test case
  22. # https://rules.sonarsource.com/csharp/RSPEC-2187/
  23. dotnet_diagnostic.S2187.severity = silent
  24. # S2292: Trivial properties should be auto-implemented
  25. # https://rules.sonarsource.com/csharp/RSPEC-2292/
  26. dotnet_diagnostic.S2292.severity = silent
  27. # S2925: "Thread.Sleep" should not be used in tests
  28. # https://rules.sonarsource.com/csharp/RSPEC-2925/
  29. dotnet_diagnostic.S2925.severity = silent
  30. # S3415: Assertion arguments should be passed in the correct order
  31. # https://rules.sonarsource.com/csharp/RSPEC-3415/
  32. dotnet_diagnostic.S3415.severity = silent
  33. # S3881: "IDisposable" should be implemented correctly
  34. # https://rules.sonarsource.com/csharp/RSPEC-3881/
  35. dotnet_diagnostic.S3881.severity = silent
  36. # S4144: Methods should not have identical implementations
  37. # https://rules.sonarsource.com/csharp/RSPEC-4144/
  38. dotnet_diagnostic.S4144.severity = silent
  39. # S4158: Empty collections should not be accessed or iterated
  40. # https://rules.sonarsource.com/csharp/RSPEC-4158/
  41. dotnet_diagnostic.S4158.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. # SA1001: Commas must be spaced correctly
  52. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1001.md
  53. dotnet_diagnostic.SA1001.severity = silent
  54. # SA1002: Semicolons must be spaced correctly
  55. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1002.md
  56. dotnet_diagnostic.SA1002.severity = silent
  57. # SA1004: Documentation lines must begin with single space
  58. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1004.md
  59. dotnet_diagnostic.SA1004.severity = silent
  60. # SA1005: Single line comments must begin with single space
  61. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1005.md
  62. dotnet_diagnostic.SA1005.severity = silent
  63. # SA1012: Opening braces must be spaced correctly
  64. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1012.md
  65. dotnet_diagnostic.SA1012.severity = silent
  66. # SA1013: Closing braces must be spaced correctly
  67. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1013.md
  68. dotnet_diagnostic.SA1013.severity = silent
  69. # SA1025: Code must not contain multiple whitespace in a row
  70. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1025.md
  71. dotnet_diagnostic.SA1025.severity = silent
  72. # SA1026: Code must not contain space after new keyword in implicitly typed array allocation
  73. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1026.md
  74. dotnet_diagnostic.SA1026.severity = silent
  75. # SA1028: Code must not contain trailing whitespace
  76. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1028.md
  77. dotnet_diagnostic.SA1028.severity = silent
  78. # SA1111: Closing parenthesis must be on line of last parameter
  79. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1111.md
  80. dotnet_diagnostic.SA1111.severity = silent
  81. # SA1117: Parameters must be on same line or separate lines
  82. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1028.md
  83. dotnet_diagnostic.SA1117.severity = silent
  84. # SA1119: Statement must not use unnecessary parenthesis
  85. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1119.md
  86. dotnet_diagnostic.SA1119.severity = silent
  87. # SA1120: Comments must contain text
  88. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1120.md
  89. dotnet_diagnostic.SA1120.severity = silent
  90. # SA1122: Use String.Empty for empty strings
  91. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1122.md
  92. dotnet_diagnostic.SA1122.severity = silent
  93. # SA1123:Do not place regions within elements
  94. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1123.md
  95. dotnet_diagnostic.SA1123.severity = silent
  96. # SA1124: Do not use regions
  97. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1124.md
  98. dotnet_diagnostic.SA1124.severity = silent
  99. # SA1128: Constructor initializer must be on own line
  100. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1128.md
  101. dotnet_diagnostic.SA1128.severity = silent
  102. # SA1129: Do not use default value type constructor
  103. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1129.md
  104. dotnet_diagnostic.SA1129.severity = silent
  105. # SA1133: Do not combine attributes
  106. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1133.md
  107. dotnet_diagnostic.SA1133.severity = silent
  108. # SA1139: Use literals suffix notation instead of casting
  109. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1139.md
  110. dotnet_diagnostic.SA1139.severity = silent
  111. # SA1204: Static elements must appear before instance elements
  112. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1204.md
  113. dotnet_diagnostic.SA1204.severity = silent
  114. # SA1208: System using directives must be placed before other using directives
  115. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1208.md
  116. dotnet_diagnostic.SA1208.severity = silent
  117. # SA1210: Using directives must be ordered alphabetically by namespace
  118. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1210.md
  119. dotnet_diagnostic.SA1210.severity = silent
  120. # SA1214: Readonly elements must appear before non-readonly elements
  121. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1214.md
  122. dotnet_diagnostic.SA1214.severity = silent
  123. # SA1306: Field names must begin with lower case letter
  124. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1306.md
  125. dotnet_diagnostic.SA1306.severity = silent
  126. # SA1310: Field names must not contain underscore
  127. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1310.md
  128. dotnet_diagnostic.SA1310.severity = silent
  129. # SA1400: Access modifier must be declared
  130. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1400.md
  131. dotnet_diagnostic.SA1400.severity = silent
  132. # SA1401: Fields must be private
  133. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1401.md
  134. dotnet_diagnostic.SA1401.severity = silent
  135. # SA1402: File may only contain a single type
  136. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1402.md
  137. dotnet_diagnostic.SA1402.severity = silent
  138. # SA1404: Code analysis suppression must have justification
  139. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1404.md
  140. dotnet_diagnostic.SA1404.severity = silent
  141. # SA1411: Attribute constructor must not use unnecessary parenthesis
  142. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1411.md
  143. dotnet_diagnostic.SA1411.severity = silent
  144. # SA1500: Braces for multiline statements must not share line
  145. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1500.md
  146. dotnet_diagnostic.SA1500.severity = silent
  147. # SA1501: Statement must not be on single line
  148. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1501.md
  149. dotnet_diagnostic.SA1501.severity = silent
  150. # SA1505: Opening braces must not be followed by blank line
  151. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1505.md
  152. dotnet_diagnostic.SA1505.severity = silent
  153. # SA1507: Code must not contain multiple blank lines in a row
  154. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1507.md
  155. dotnet_diagnostic.SA1507.severity = silent
  156. # SA1508: Closing braces must not be preceded by blank line
  157. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1508.md
  158. dotnet_diagnostic.SA1508.severity = silent
  159. # SA1512: Single line comments must not be followed by blank line
  160. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1512.md
  161. dotnet_diagnostic.SA1512.severity = silent
  162. # SA1513: Closing brace must be followed by blank line
  163. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1513.md
  164. dotnet_diagnostic.SA1513.severity = silent
  165. # SA1515: Single line comment must be preceded by blank line
  166. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1515.md
  167. dotnet_diagnostic.SA1515.severity = silent
  168. # SA1518: Use line endings correctly at end of file
  169. https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1518.md
  170. dotnet_diagnostic.SA1518.severity = silent
  171. # SA1636: File header copyright text must match
  172. https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1636.md
  173. dotnet_diagnostic.SA1636.severity = silent
  174. # SA1642: Constructor summary documentation must begin with standard text
  175. # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1642.md
  176. dotnet_diagnostic.SA1642.severity = silent
  177. # SA1649: File name must match type name
  178. https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1649.md
  179. dotnet_diagnostic.SA1649.severity = silent
  180. #### Meziantou.Analyzer rules ####
  181. # MA0001: StringComparison is missing
  182. # https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0001.md
  183. dotnet_diagnostic.MA0001.severity = silent
  184. # MA0003: Add parameter name to improve readability
  185. # https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0003.md
  186. dotnet_diagnostic.MA0003.severity = silent
  187. # MA0004: Use Task.ConfigureAwait(false)
  188. # https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0004.md
  189. dotnet_diagnostic.MA0004.severity = silent
  190. # MA0005: Use Array.Empty<T>()
  191. # https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0005.md
  192. dotnet_diagnostic.MA0005.severity = silent
  193. # MA0011: IFormatProvider is missing
  194. # https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0011.md
  195. dotnet_diagnostic.MA0011.severity = silent
  196. # MA0015: Specify the parameter name in ArgumentException
  197. # https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0015.md
  198. dotnet_diagnostic.MA0015.severity = silent
  199. # MA0019: Use EventArgs.Empty
  200. # https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0019.md
  201. dotnet_diagnostic.MA0019.severity = silent
  202. # MA0035: Do not use dangerous threading methods
  203. # https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0035.md
  204. dotnet_diagnostic.MA0035.severity = silent
  205. # MA0040: Forward the CancellationToken parameter to methods that take one
  206. # https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0040.md
  207. dotnet_diagnostic.MA0040.severity = silent
  208. # MA0046: Use EventHandler<T> to declare events
  209. # https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0046.md
  210. dotnet_diagnostic.MA0046.severity = silent
  211. # MA0053: Make class sealed
  212. # https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0053.md
  213. dotnet_diagnostic.MA0053.severity = silent
  214. # MA0060: The value returned by Stream.Read/Stream.ReadAsync is not used
  215. # https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0060.md
  216. dotnet_diagnostic.MA0060.severity = silent
  217. # MA0075: Do not use implicit culture-sensitive ToString
  218. # https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0075.md
  219. dotnet_diagnostic.MA0075.severity = silent
  220. # MA0099 - Use Explicit enum value instead of 0
  221. # https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0099.md
  222. dotnet_diagnostic.MA0099.severity = silent
  223. # MA0110: Use the Regex source generator
  224. # https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0110.md
  225. dotnet_diagnostic.MA0110.severity = silent
  226. # MA0026: Fix TODO comment
  227. # https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0026.md
  228. dotnet_diagnostic.MA0026.severity = silent
  229. # MA0042: Do not use blocking calls in an async method
  230. # https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0042.md
  231. dotnet_diagnostic.MA0042.severity = silent
  232. # MA0160: Use ContainsKey instead of TryGetValue
  233. # https://github.com/meziantou/Meziantou.Analyzer/blob/main/docs/Rules/MA0160.md
  234. dotnet_diagnostic.MA0160.severity = silent
  235. #### .NET Compiler Platform analysers rules ####
  236. # CA1031: Do not catch general exception types
  237. # https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1031
  238. dotnet_diagnostic.CA1031.severity = silent
  239. # CA1062: Validate arguments of public methods
  240. # https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1062
  241. dotnet_diagnostic.CA1062.severity = silent
  242. # CA1063: Implement IDisposable correctly
  243. # https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1063
  244. dotnet_diagnostic.CA1063.severity = silent
  245. # CA1307: Specify StringComparison for clarity
  246. https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1307
  247. dotnet_diagnostic.CA1307.severity = silent
  248. # CA1806: Do not ignore method results
  249. # https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1806
  250. dotnet_diagnostic.CA1806.severity = silent
  251. # CA1515: Consider making public types internal
  252. # https://learn.microsoft.com/en-ca/dotnet/fundamentals/code-analysis/quality-rules/ca1515
  253. dotnet_diagnostic.CA1515.severity = silent
  254. # CA1822: Mark members as static
  255. # https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1822
  256. dotnet_diagnostic.CA1822.severity = silent
  257. # CA1825: Avoid zero-length array allocations
  258. # https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1825
  259. dotnet_diagnostic.CA1825.severity = silent
  260. # CA1841: Prefer Dictionary Contains methods
  261. # https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1841
  262. dotnet_diagnostic.CA1841.severity = silent
  263. # CA1859: Use concrete types when possible for improved performance
  264. # https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1859
  265. dotnet_diagnostic.CA1859.severity = silent
  266. # CA2000: Dispose objects before losing scope
  267. # https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2000
  268. dotnet_diagnostic.CA2000.severity = silent
  269. # CA2007: Do not directly await a Task
  270. # https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2007
  271. dotnet_diagnostic.CA2007.severity = silent
  272. # CA2201: Do not raise reserved exception types
  273. # https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2201
  274. dotnet_diagnostic.CA2201.severity = silent
  275. # CA2213: Disposable fields should be disposed
  276. # https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2213
  277. dotnet_diagnostic.CA2213.severity = silent
  278. # CA2227: Collection properties should be read only
  279. # https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2227
  280. dotnet_diagnostic.CA2227.severity = silent
  281. # IDE0007: Use var instead of explicit type
  282. # https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0007
  283. dotnet_diagnostic.IDE0007.severity = silent
  284. # IDE0028: Use collection initializers
  285. # https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0028
  286. dotnet_diagnostic.IDE0028.severity = silent
  287. # IDE0058: Remove unnecessary expression value
  288. # https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0058
  289. dotnet_diagnostic.IDE0058.severity = silent
  290. # IDE0059: Remove unnecessary value assignment
  291. # https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0059
  292. dotnet_diagnostic.IDE0059.severity = silent
  293. # IDE0230: Use UTF-8 string literal
  294. # https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0230
  295. dotnet_diagnostic.IDE0230.severity = silent
  296. # IDE0046: Use conditional expression for return
  297. # https://learn.microsoft.com/en-ca/dotnet/fundamentals/code-analysis/style-rules/ide0046
  298. dotnet_diagnostic.IDE0046.severity = silent
  299. # IDE0047: Remove unnecessary parentheses
  300. # https://learn.microsoft.com/en-ca/dotnet/fundamentals/code-analysis/style-rules/ide0047-ide0048
  301. dotnet_diagnostic.IDE0047.severity = silent
  302. # IDE0032: Use auto-implemented property
  303. # https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0032
  304. dotnet_diagnostic.IDE0032.severity = silent
  305. # CA1812: Avoid uninstantiated internal classes
  306. # https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1812
  307. dotnet_diagnostic.CA1812.severity = silent
  308. # CA1849: Call async methods when in an async method
  309. # https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/CA1849
  310. dotnet_diagnostic.CA1849.severity = silent