Skip to content

Commit 9652faf

Browse files
plan(HdrHistogram#115): create task breakdown
1 parent dba2924 commit 9652faf

1 file changed

Lines changed: 98 additions & 0 deletions

File tree

plan/ready/task.md

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
# Task List: Issue #115 — Run dotnet format to fix existing code
2+
3+
## Context
4+
5+
A one-time bulk reformatting pass using `dotnet format whitespace` to bring all 123 `.cs`
6+
files into alignment with the `.editorconfig` introduced in issue #114.
7+
346 violations exist across 101 files: 213 ENDOFLINE, 78 FINALNEWLINE, 47 CHARSET, 8 WHITESPACE.
8+
No logic, API surface, or behaviour is altered.
9+
10+
---
11+
12+
## Tasks
13+
14+
### 1. Apply formatting
15+
16+
- [ ] **Run `dotnet format whitespace HdrHistogram.sln`** to automatically fix all whitespace,
17+
line-ending, charset, and final-newline violations across all four projects.
18+
_Why:_ The brief mandates using the `whitespace` sub-command explicitly to avoid invoking
19+
`style` or `analyzers` fixers that could make non-cosmetic changes.
20+
_Verify:_ Command exits with code 0 and reports files modified.
21+
22+
### 2. Spot-check Bitwise.cs
23+
24+
- [ ] **Inspect the diff for `HdrHistogram/Utilities/Bitwise.cs`** (lines 40–60) using `git diff`
25+
to confirm the 8 WHITESPACE fixes are indentation-only and contain no logic change.
26+
_Why:_ This is the only file with substantive (non-trivial) formatting changes; the brief
27+
calls it out explicitly as requiring manual verification.
28+
_Verify:_ Diff shows only whitespace/indentation changes; no executable tokens added or removed.
29+
30+
### 3. Verify formatting is fully resolved
31+
32+
- [ ] **Run `dotnet format --verify-no-changes HdrHistogram.sln`** and confirm it exits with
33+
code 0 and reports zero violations.
34+
_Why:_ Acceptance criterion 1 — the formatter must report a clean state after the fix.
35+
_Verify:_ Exit code is 0; output contains no violation lines.
36+
37+
### 4. Confirm build is clean
38+
39+
- [ ] **Run `dotnet build HdrHistogram.sln`** and confirm it succeeds with no errors and no
40+
warnings introduced by this change.
41+
_Why:_ Acceptance criterion 2 — reformatting must not break the build.
42+
_Verify:_ Build output ends with `Build succeeded` and warning count is unchanged.
43+
44+
### 5. Confirm all unit tests pass
45+
46+
- [ ] **Run `dotnet test HdrHistogram.sln`** and confirm every test passes.
47+
_Why:_ Acceptance criterion 3 — existing tests must continue to pass without modification.
48+
_Verify:_ Test output shows 0 failed, 0 skipped (or same counts as pre-change baseline).
49+
50+
### 6. Commit the formatting change
51+
52+
- [ ] **Stage all modified files** (`git add -u`) and **create a commit** with the exact message:
53+
`chore: apply dotnet format to match .editorconfig`
54+
_Why:_ Acceptance criterion 6 — the commit message must match this string exactly so that
55+
tooling (e.g. `git log --grep`) and the blame-ignore-revs entry can reference it reliably.
56+
_Verify:_ `git log -1 --format=%s` outputs the required message verbatim.
57+
58+
### 7. Create `.git-blame-ignore-revs`
59+
60+
- [ ] **Record the SHA** of the formatting commit (`git rev-parse HEAD`) and **create
61+
`.git-blame-ignore-revs`** at the repository root containing that SHA, prefixed with a
62+
comment line: `# chore: apply dotnet format to match .editorconfig`
63+
_Why:_ Acceptance criterion 5 — the bulk formatting commit must be skippable via
64+
`git blame --ignore-revs-file .git-blame-ignore-revs` so that `git blame` output remains
65+
meaningful for future authors.
66+
_Verify:_ File exists at repo root; contains the correct 40-character SHA; running
67+
`git blame --ignore-revs-file .git-blame-ignore-revs HdrHistogram/Utilities/Bitwise.cs`
68+
does not attribute lines to the formatting commit.
69+
70+
### 8. Commit `.git-blame-ignore-revs`
71+
72+
- [ ] **Stage and commit `.git-blame-ignore-revs`** with message:
73+
`chore: add .git-blame-ignore-revs for formatting commit`
74+
_Why:_ The brief says to include this file in the same PR; it must be its own commit so it
75+
is not mixed with the formatting diff.
76+
_Verify:_ `git log --oneline -2` shows both the formatting commit and this follow-up commit.
77+
78+
### 9. Open a pull request
79+
80+
- [ ] **Push the branch** and **open a PR against `main`** using `gh pr create`.
81+
PR title: `chore: apply dotnet format to match .editorconfig (#115)`
82+
PR body must reference issue #115 and summarise: what was run, violation counts fixed,
83+
and note that `.git-blame-ignore-revs` is included.
84+
_Why:_ Required by the git workflow in CLAUDE.md; the brief asks for the PR to be opened.
85+
_Verify:_ PR is open, CI passes, PR description references issue #115.
86+
87+
---
88+
89+
## Acceptance Criterion Cross-Reference
90+
91+
| Acceptance Criterion (brief) | Covered By |
92+
|---|---|
93+
| `dotnet format --verify-no-changes HdrHistogram.sln` exits code 0 | Task 3 |
94+
| `dotnet build HdrHistogram.sln` succeeds with no errors or warnings | Task 4 |
95+
| All unit tests pass (`dotnet test HdrHistogram.sln`) | Task 5 |
96+
| No functional code changes — diffs contain only whitespace/newline additions | Tasks 1, 2 |
97+
| `.git-blame-ignore-revs` created at repo root with formatting commit SHA | Tasks 7, 8 |
98+
| Commit message is `chore: apply dotnet format to match .editorconfig` | Task 6 |

0 commit comments

Comments
 (0)