|
3 | 3 | All notable changes to the `code-metrics` plugin are documented here. Format follows |
4 | 4 | [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); this plugin uses semantic versioning. |
5 | 5 |
|
| 6 | +## [0.2.2] |
| 7 | + |
| 8 | +### Fixed |
| 9 | + |
| 10 | +- **`principles`: the Halstead split-file answer overstated what the formula supports.** The |
| 11 | + quick guide said difficulty "should not have" moved when a file was split, and eval 1 expected |
| 12 | + the same. Difficulty `(n1/2) * (N2/n2)` carries no explicit length term, but both factors change |
| 13 | + per half on a split, and a radon run on two functions measured together and apart gave 1.667 for |
| 14 | + the whole against 1.000 and 1.800 for the halves. The entry and the eval now say per-file |
| 15 | + difficulty legitimately moves on a split, in either direction. |
| 16 | +- **`principles`: the §8.2.115 reading is labelled as the plugin's.** thresholds.md, measures.md, |
| 17 | + and the configuration reference presented "a function's non-empty lines as a percentage of the |
| 18 | + file's" as the clause's words. The clause states `MaxNumberOfNonEmptyLinesOfCode` with a default |
| 19 | + of "5%" and names no base; the percentage-of-file base is this plugin's reading, and thresholds.md |
| 20 | + now carries the four-part verification record for it (OMG ASCQM v1.1 and the ISO edition, as of |
| 21 | + 2026-09-11, recheck on a new revision). The same files now name ISO/IEC 5055:2021 as the ISO |
| 22 | + publication of ASCQM v1.0, with v1.1 identical for the cited clauses, and note that the |
| 23 | + document's informative CWE summary rows carry different defaults (1000 lines per file, 10%) from |
| 24 | + its detection patterns (5%, 90%). |
| 25 | +- **`principles`: McCabe's framing and Campbell's switch rule are quoted as written.** McCabe 1976 |
| 26 | + frames cyclomatic complexity for modules that are "testable and maintainable", not testability |
| 27 | + alone; Campbell v1.7 states "a switch and all its cases combined incurs a single structural |
| 28 | + increment". measures.md and literature.md carry both verbatim. |
| 29 | + |
| 30 | +### Changed |
| 31 | + |
| 32 | +- **`principles`: the quick guide answers "which measure should I look at" with an intent-keyed |
| 33 | + tree**, each branch grounded in its primary: testing burden to cyclomatic (McCabe; NIST SP 500-235 |
| 34 | + sets the test count equal to it), readability to cognitive (Campbell), diff size and copying to |
| 35 | + lines per file and duplication (ISO/IEC 5055 CWE-1080 and CWE-1041), and whether a suite would |
| 36 | + catch a fault to the mutation-testing presence gate, because coverage records execution and the |
| 37 | + primary literature disagrees on how well it predicts fault detection (Inozemtseva and Holmes |
| 38 | + 2014 against Gopinath, Jensen and Groce 2014 and Kochhar, Thung and Lo 2015). A duplication entry |
| 39 | + states that no reference ships and that the percentage moves with `duplication.min_tokens`, and |
| 40 | + the routing table names the plugin's report-schema reference for the report vocabulary. |
| 41 | +- **`principles`: the no-verdict rule is stated once**, at the top of the skill body, and the |
| 42 | + reference files no longer cite the marketplace's ADR by number, which a consumer of the installed |
| 43 | + plugin cannot read. |
| 44 | +- **`principles`: the reference files state present-tense facts and carry no research narrative.** |
| 45 | + The thresholds file's account of how ten candidate values were commissioned from a social post, |
| 46 | + scrutinized at an interview, and full-text searched is replaced by a table of popular numbers with |
| 47 | + no found source, naming what was checked and what was not; literature.md states each source's |
| 48 | + confidence and its basis without narrating the pass that established it. For the record, that |
| 49 | + candidate list was 22 (cyclomatic), 22 (cognitive), 80 (Halstead difficulty), 500 (lines per |
| 50 | + file), 100 (coverage), 25 (CRAP), and four zeros for count-based concerns; 20 and 1000 survived |
| 51 | + as shipped defaults because a citation exists for them, and the rest traced to no source. |
| 52 | +- **`principles`: a `## Next` section** names the audit skill for the measure in question and |
| 53 | + `/code-metrics:setup` for setting the reader's own reference values, in the mention-only shape |
| 54 | + the sibling skills use. |
| 55 | +- **`principles`: literature.md gains a coverage-and-test-effectiveness section** citing the five |
| 56 | + primaries above with their DOIs, and a duplication row in the thresholds table records that no |
| 57 | + duplication reference ships and why. |
| 58 | + |
6 | 59 | ## [0.2.1] |
7 | 60 |
|
8 | 61 | ### Changed |
|
0 commit comments