ci: skip cargo fmt on the Windows lint leg (#2200)

One rustfmt call with every source root of the workspace is now longer
than a Windows command line may be (os error 206). rustfmt's result is
the same on every system; the Linux and macOS legs keep checking it.
The lint-command guard states the per-system stages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
David MannandClaude Opus 5.5 committed 2026-11-18 12:43:50 +01:00
1 parent 06180c1a3f
commit 1cc156dcc3
2 files changed
+14 -4

No files matched your search

+8 -3
View File
@@ -25,7 +25,9 @@ if [ "$RUNNER_OS" = Linux ]; then
python3 scripts/test-workspace-concurrency.py
python3 scripts/test-workspace-tests.py
fi
cargo fmt --check
if [ "$RUNNER_OS" != Windows ]; then
cargo fmt --check
fi
cargo clippy --workspace --all-targets --locked -- -D warnings
cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
"""
@@ -96,11 +98,14 @@ TESTS = [
class WorkspaceTests(unittest.TestCase):
def test_every_leg_lints_with_both_feature_sets(self):
for os_name in ("Linux", "macOS", "Windows"):
# Windows skips only rustfmt: one call with every source root of the workspace is longer
# than a Windows command line may be (os error 206), and Linux and macOS check the same
# formatting.
for os_name, expected in (("Linux", COMMON), ("macOS", COMMON), ("Windows", COMMON[1:])):
with self.subTest(os=os_name):
result = commands(os_name, name="lint-command")
self.assertEqual(result.returncode, 0, result.stderr)
self.assertEqual(result.stdout.splitlines(), COMMON)
self.assertEqual(result.stdout.splitlines(), expected)
def test_linux_and_macos_run_one_feature_set_with_doctests(self):
for os_name in ("Linux", "macOS"):