You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All other files require only a trailing newline added at end-of-file.
37
+
All other files require only line-ending normalisation and/or a trailing newline added at end-of-file.
36
38
37
39
## Acceptance Criteria
38
40
39
-
-[ ]`dotnet format --verify-no-changes` exits with code 0 after the fix is applied
40
-
-[ ]`dotnet build` succeeds with no errors or warnings introduced by this change
41
-
-[ ] All unit tests pass (`dotnet test`)
42
-
-[ ] No functional code changes — diffs contain only whitespace and newline additions
41
+
-[ ]`dotnet format --verify-no-changes HdrHistogram.sln` exits with code 0 after the fix is applied
42
+
-[ ]`dotnet build HdrHistogram.sln` succeeds with no errors or warnings introduced by this change
43
+
-[ ] All unit tests pass (`dotnet test HdrHistogram.sln`)
44
+
-[ ] No functional code changes — diffs contain only whitespace, line-ending, and newline additions
43
45
-[ ] A `.git-blame-ignore-revs` file is created at the repo root containing the SHA of the formatting commit
44
46
-[ ] The commit message is `chore: apply dotnet format to match .editorconfig`
45
47
@@ -50,28 +52,28 @@ Existing tests must continue to pass without modification.
50
52
51
53
Verification steps:
52
54
53
-
1. Run `dotnet format --verify-no-changes` — must exit 0
55
+
1. Run `dotnet format --verify-no-changes HdrHistogram.sln` — must exit 0
54
56
2. Run `dotnet build HdrHistogram.sln` — must succeed
55
57
3. Run `dotnet test HdrHistogram.sln` — all tests must pass
56
58
4. Inspect the diff with `git diff` before committing — confirm only whitespace/newline changes
57
59
58
60
## Implementation Steps
59
61
60
-
1. Run `dotnet format HdrHistogram.sln` to apply all fixes automatically
62
+
1. Run `dotnet format whitespace HdrHistogram.sln` to apply all whitespace fixes automatically
61
63
2. Verify with `dotnet format --verify-no-changes HdrHistogram.sln`
62
64
3. Run `dotnet build HdrHistogram.sln` to confirm build is clean
63
65
4. Run `dotnet test HdrHistogram.sln` to confirm tests pass
64
66
5. Commit with message: `chore: apply dotnet format to match .editorconfig`
65
67
6. Record the commit SHA and create `.git-blame-ignore-revs` with that SHA
66
-
7. Commit `.git-blame-ignore-revs`(separate commit or same PR)
68
+
7. Commit `.git-blame-ignore-revs`in the same PR
67
69
8. Open a PR against `main`
68
70
69
71
## Risks and Open Questions
70
72
71
-
-**Risk:**`dotnet format` may apply analyser-driven style changes (not just whitespace) if analyser rules are enabled in `.editorconfig` or project files.
72
-
Mitigation: review `git diff` before committing to confirm the scope is whitespace-only.
73
+
-**Risk:** The `dotnet format` command without a sub-command invokes all three fixers: `whitespace`, `style`, and `analyzers`.
74
+
The `.editorconfig` contains Roslyn naming-convention rules at `suggestion` severity; by default `dotnet format style` only applies rules at `warning` severity or above, so naming rules would not be auto-applied.
75
+
Mitigation: use `dotnet format whitespace HdrHistogram.sln` explicitly to limit the scope to whitespace-only fixes and remove all ambiguity.
73
76
-**Risk:** CRLF/LF normalisation could affect files on Windows dev machines.
74
-
Mitigation: `.editorconfig` enforces `end_of_line = lf`; this is the intended target.
75
-
-**Open question:** Should `.git-blame-ignore-revs` be committed in the same PR or a follow-up?
76
-
Preference from issue: same PR.
77
-
-**Note:** The `Bitwise.cs` indentation changes (8 violations) are the only non-trivial whitespace fixes; they should be spot-checked manually to confirm no logic change.
77
+
Mitigation: `.editorconfig` enforces `end_of_line = lf`; this is the intended target, and ENDOFLINE violations confirm CRLF files exist in the repo.
78
+
-**Note:** The `Bitwise.cs` indentation changes (8 WHITESPACE violations) are the only non-trivial fixes; they should be spot-checked manually to confirm no logic change.
79
+
-**Note:** No custom analyser NuGet packages are present in any `.csproj` file, so the risk of non-whitespace changes from analyser rules is negligible.
0 commit comments