Skip to content

Fix CA1707 test-naming warnings and GitHub Actions Node 20 deprecation - #30

Merged
denmase merged 1 commit into
mainfrom
claude/noteeditor-translate-english-fworkt
Sep 18, 2026
Merged

denmase merged 1 commit into
mainfrom
claude/noteeditor-translate-english-fworkt

Conversation

@denmase

@denmase denmase commented Sep 18, 2026

Copy link
Copy Markdown
Owner

Summary

Two independent sources of noisy CI warnings:

  • CA1707 ("remove underscores from member name") was firing on every test method in
    MainFormMultiTabTests.cs despite the repo already having a [JianpuEditor.Tests/**/*.cs]
    .editorconfig section that suppresses it for test naming. The glob has a real quirk:
    **/*.cs only matches files inside a subdirectory, not files sitting directly in
    JianpuEditor.Tests/ itself — which is exactly where MainFormMultiTabTests.cs lives
    (Glue/DocumentTabTests.cs, one level down, was already covered, which is why this went
    unnoticed). Widened the glob to {*.cs,**/*.cs} to cover both cases.
  • The four pinned GitHub Actions (checkout, setup-dotnet, cache, upload-artifact) are
    still on major versions whose action.yml declares node20, which GitHub now runs on node24
    anyway but warns about every build ahead of node20's removal from runners. Bumped each to the
    latest major version that declares node24 in its own action.yml (verified by fetching the
    actual action.yml at each tag, not just release notes): checkout v4 → v7, setup-dotnet v4
    → v6, cache v4 → v6, upload-artifact v4 → v7, in both ci.yml and release.yml.

Test plan

  • A clean dotnet build of the whole solution (temporarily cross-compiling JianpuEditor.Tests
    with EnableWindowsTargeting, reverted, not committed) now produces 0 warnings, 0 errors
    (previously 10–11 CA1707 warnings from MainFormMultiTabTests.cs alone).
  • dotnet format --verify-no-changes passes for both projects.
  • Checked each action bump for breaking changes relevant to this repo's usage: checkout v7's
    fork-PR restriction only affects pull_request_target/workflow_run triggers, which this repo
    doesn't use; the others are internal Node/ESM migrations with no input/output changes affecting
    the options already in use here.

Not verified in this sandbox: the GitHub Actions version bumps themselves can't be executed
here (no GHA runner) — the real test is this PR's own CI run, which I'm watching.


🤖 Generated with Claude Code

https://claude.ai/code/session_01Pguj4XSScE141p1ScWoqEr


Generated by Claude Code

Two independent sources of noisy CI warnings:

- CA1707 ("remove underscores from member name") was firing on every
  test method in MainFormMultiTabTests.cs despite the repo already
  having a [JianpuEditor.Tests/**/*.cs] .editorconfig section that
  suppresses it for test naming. The glob has a real quirk: "**/*.cs"
  only matches files inside a subdirectory, not files sitting directly
  in JianpuEditor.Tests/ itself -- which is exactly where
  MainFormMultiTabTests.cs lives (Glue/DocumentTabTests.cs, one level
  down, was already covered, which is why this went unnoticed).
  Widened the glob to "{*.cs,**/*.cs}" to cover both cases. Confirmed
  with a clean rebuild of the whole solution: 0 warnings, 0 errors
  (previously 10-11 CA1707 warnings from this one file).

- The four pinned GitHub Actions (checkout, setup-dotnet, cache,
  upload-artifact) are still on major versions whose action.yml
  declares node20, which GitHub now runs on node24 anyway but warns
  about every build ahead of node20's removal from runners. Bumped each
  to the latest major version that declares node24 in its own
  action.yml (verified by fetching the actual action.yml at each tag,
  not just release notes): checkout v4 -> v7, setup-dotnet v4 -> v6,
  cache v4 -> v6, upload-artifact v4 -> v7, in both ci.yml and
  release.yml. Checked each for breaking changes relevant to this
  repo's usage (checkout v7's fork-PR restriction only affects
  pull_request_target/workflow_run triggers, which this repo doesn't
  use; the others are internal Node/ESM migrations with no input/output
  changes affecting the options already in use here).

Verified via the same sandbox pipeline as prior changes: a clean
`dotnet build` of the whole solution (temporarily cross-compiling
JianpuEditor.Tests with EnableWindowsTargeting, reverted, not
committed) now produces 0 warnings/0 errors, and dotnet format
--verify-no-changes passes for both projects. The GitHub Actions
version bumps themselves can't be executed in this sandbox (no GHA
runner here) -- verified by fetching each new tag's actual action.yml
to confirm node24 and reading each release's changelog for breaking
changes, but the real test is this branch's next CI run.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pguj4XSScE141p1ScWoqEr
@denmase
denmase merged commit 0f3f857 into main Sep 18, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants