Skip to content

Commit 663c8c3

Browse files
committed
Relax the default settings for MEN018 min and group sizes
1 parent 4ae3356 commit 663c8c3

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ This software is CharityWare. If you use it, I ask that you donate something to
2828
| MEN015 | Use Preferred Terms | Similar to the old FxCop [CA1726 rule](https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1726?view=vs-2019#rule-description) except this rule only checks single terms (not double terms). So it uses a slightly different set of [default preferred terms](https://github.com/menees/Analyzers/blob/172bf0b6820e143de28f2f43e712908179ca1073/src/Menees.Analyzers/Settings.cs#L53-L77) (omitting double terms like LogOn), and it includes Id as a preferred term over ID (per FxCop's [CA1709 rule](https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1709?view=vs-2019#rule-description)). |
2929
| MEN016 | Avoid Top-Level Statements | C# [top-level statements](https://learn.microsoft.com/en-us/dotnet/csharp/fundamentals/program-structure/top-level-statements) are only for toy/example programs and should be avoided in long-term code for [consistency and maintainability](https://github.com/dotnet/docs/issues/27420#issuecomment-988776134). |
3030
| MEN017 | Remove Unused Private Setter | A private set accessor is not needed when an auto property is only assigned in the constructor. Inspired by [C# Essentials' Use Getter-Only Auto-Property](https://github.com/DustinCampbell/CSharpEssentials?tab=readme-ov-file#use-getter-only-auto-property). |
31-
| MEN018 | Use Digit Separators | Numeric literals should use digit separators ('_' from C# 7) to improve readability. This applies to multi-byte hexadecimal literals, multi-nibble binary literals, and [integer](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/integral-numeric-types#integer-literals) or [real](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/floating-point-numeric-types#real-literals) literals >= 1000. |
31+
| MEN018 | Use Digit Separators | Numeric literals should use digit separators ('_' from C# 7) to improve readability. This applies to hexadecimal, binary, and [integer](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/integral-numeric-types#integer-literals) or [real](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/floating-point-numeric-types#real-literals) literals. |

src/Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<AssemblyOriginatorKeyFile>../Analyzers.snk</AssemblyOriginatorKeyFile>
2222

2323
<!-- NOTE: Change the version in Vsix\source.extension.vsixmanifest to match this! -->
24-
<Version>3.2.1</Version>
24+
<Version>3.2.2</Version>
2525
</PropertyGroup>
2626

2727
<PropertyGroup Condition="'$(Configuration)'=='Debug'">

src/Menees.Analyzers/Settings.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,11 +191,11 @@ private Settings(XElement xml)
191191

192192
#region Private Properties
193193

194-
private (byte MinSize, byte GroupSize) DecimalSeparators { get; } = (5, 3); // Group Per-Thousand
194+
private (byte MinSize, byte GroupSize) DecimalSeparators { get; } = (6, 3); // Group Per-Thousand
195195

196-
private (byte MinSize, byte GroupSize) HexadecimalSeparators { get; } = (5, 2); // Group Per-Byte
196+
private (byte MinSize, byte GroupSize) HexadecimalSeparators { get; } = (8, 4); // Group Per-Word
197197

198-
private (byte MinSize, byte GroupSize) BinarySeparators { get; } = (6, 4); // Group Per-Nibble
198+
private (byte MinSize, byte GroupSize) BinarySeparators { get; } = (8, 4); // Group Per-Nibble
199199

200200
#endregion
201201

0 commit comments

Comments
 (0)