diff --git a/.bca-baseline.toml b/.bca-baseline.toml index e25f5cf00..151d5042b 100644 --- a/.bca-baseline.toml +++ b/.bca-baseline.toml @@ -601,24 +601,12 @@ qualified = "generate_html_report_with_vcs" metric = "nargs" value = 6.0 -[[entry]] -path = "big-code-analysis-cli/src/html_report.rs" -qualified = "write_table_classed" -metric = "nargs" -value = 5.0 - [[entry]] path = "big-code-analysis-cli/src/html_report.rs" qualified = "write_table_classed_with_tooltips" metric = "nargs" value = 7.0 -[[entry]] -path = "big-code-analysis-cli/src/html_report.rs" -qualified = "write_table_core" -metric = "nargs" -value = 7.0 - [[entry]] path = "big-code-analysis-cli/src/html_report.rs" qualified = "write_table_head" @@ -653,7 +641,7 @@ value = 49443.19551903411 path = "big-code-analysis-cli/src/markdown_report.rs" qualified = "" metric = "loc.ploc" -value = 633.0 +value = 583.0 [[entry]] path = "big-code-analysis-cli/src/markdown_report.rs" @@ -683,7 +671,7 @@ value = 6.0 path = "big-code-analysis-cli/src/markdown_report/hotspot.rs" qualified = "" metric = "loc.ploc" -value = 694.0 +value = 701.0 [[entry]] path = "big-code-analysis-cli/src/markdown_report/hotspot.rs" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 396003ae1..d02dd757b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -277,6 +277,16 @@ jobs: - uses: taiki-e/install-action@86f7a0ffb25f40114606501a311ebcfaf882ea32 # v2.88.0 with: tool: cargo-nextest + # Node is installed before the Rust tests, not only for the agent + # hook tests below: `html_report::tests::inline_sort_script_behaves_ + # under_a_dom_stub` runs the report's inline sort script under Node + # and, with `CI` set, fails rather than skips when Node is absent — + # so the pinned runtime, not whatever the image ships, is what it + # sees. + - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 + with: + node-version: "24" + check-latest: true # nextest runs the lib / bins / integration tests and writes the JUnit # report to target/nextest/ci/junit.xml (see .config/nextest.toml). It # does not run doctests — those are covered by the next step. @@ -287,10 +297,6 @@ jobs: # exercising the workspace's documentation examples. - name: cargo test --doc run: cargo test --doc --all-features --workspace --locked - - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 - with: - node-version: "24" - check-latest: true - name: Build analyzer for plugin integration tests run: cargo build -p big-code-analysis-cli --all-features --locked - name: Agent hook tests with the checkout analyzer @@ -408,6 +414,13 @@ jobs: - uses: taiki-e/install-action@86f7a0ffb25f40114606501a311ebcfaf882ea32 # v2.88.0 with: tool: cargo-nextest@0.9.146,cargo-llvm-cov@0.9.1 + # The instrumented run below is the same test set as the `test` job, + # including the Node-driven inline-sort-script test, which fails + # under `CI` when Node is missing rather than skipping. + - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 + with: + node-version: "24" + check-latest: true - name: Record coverage provenance run: | { @@ -622,6 +635,14 @@ jobs: - uses: taiki-e/install-action@86f7a0ffb25f40114606501a311ebcfaf882ea32 # v2.88.0 with: tool: cargo-nextest + # The two `(cli)` legs run the CLI crate's lib tests, one of which + # drives the report's inline sort script under Node and fails under + # `CI` when Node is absent — on every leg, so the verdict never + # depends on what the runner image happens to ship. + - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 + with: + node-version: "24" + check-latest: true # The one thing a partial feature set breaks that the clippy run # above cannot see (#1472): a test gated on the union of its rows # must be *absent* when none of those features is enabled, not diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5dd44f1a3..aae257e4e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -56,7 +56,9 @@ repos: - id: test name: test language: system - files: '\.rs$' + # The `.mjs` is the DOM-stub harness a Rust unit test drives, so an + # edit to it is an edit to that test. + files: '(\.rs|big-code-analysis-cli/tests/fixtures/.*\.mjs)$' entry: cargo test pass_filenames: false diff --git a/CHANGELOG.md b/CHANGELOG.md index 02595104d..ae76484b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,20 @@ for historical reference. ### Changed +- **The HTML report's column headers are native sort buttons.** Each + header's label is now a `