The analyze_and_test job intermittently fails on windows-latest only, at the dart analyze --fatal-infos step. The same commit passes on ubuntu-latest and macos-latest, and dart analyze --fatal-infos is clean locally. This blocks PRs on a non-deterministic, environment-specific failure.
Affected workflow
Symptom
The step reports dart_code_linter plugin warnings against pre-existing test files, and each warning is emitted twice. With --fatal-infos, these become fatal. Examples:
warning - test\absolute_paths_test.dart:19:5 - Avoid using 'late' keyword. - avoid-late-keyword
warning - test\absolute_paths_test.dart:19:5 - Avoid using 'late' keyword. - avoid-late-keyword
warning - test\custom_rule_test.dart:7:7 - File name does not match with first class name. - prefer-match-file-name
warning - test\directory_structure_test.dart:29:3 - Avoid using dynamic type. - avoid-dynamic
Evidence it's environmental, not a code defect
- Same commit:
ubuntu-latest and macos-latest pass; only windows-latest fails.
dart analyze --fatal-infos is clean on local macOS.
- Earlier commits on the same branch passed
analyze_and_test (windows-latest).
- The diagnostics are duplicated — a known artifact of the analyzer plugin double-reporting.
Suspected root cause
analysis_options.yaml registers dart_code_linter as an analyzer plugin, so its rules are surfaced through dart analyze (in addition to the dedicated dart run dart_code_linter:metrics analyze lib step). The plugin appears to load/report non-deterministically on Windows, intermittently emitting (and duplicating) these warnings, which --fatal-infos then treats as fatal.
Suggested directions (for maintainers to evaluate)
- Rely on the dedicated
dart run dart_code_linter:metrics analyze lib step for these rules and drop the dart_code_linter analyzer-plugin registration from analysis_options.yaml, so dart analyze only enforces core lints. OR
- Exclude
test/** from the dart_code_linter rules (these warnings are all in test files). OR
- Pin/upgrade
dart_code_linter (currently ^4.0.3) if a fixed version addresses the duplicate/non-deterministic reporting.
Environment
- Dart SDK:
stable (via dart-lang/setup-dart@v1)
analyzer 12.1.0, dart_code_linter ^4.0.3
The
analyze_and_testjob intermittently fails on windows-latest only, at thedart analyze --fatal-infosstep. The same commit passes onubuntu-latestandmacos-latest, anddart analyze --fatal-infosis clean locally. This blocks PRs on a non-deterministic, environment-specific failure.Affected workflow
.github/workflows/dart_skills_lint_workflow.yamlanalyze_and_test, matrixwindows-latestdart analyze --fatal-infosSymptom
The step reports
dart_code_linterplugin warnings against pre-existing test files, and each warning is emitted twice. With--fatal-infos, these become fatal. Examples:Evidence it's environmental, not a code defect
ubuntu-latestandmacos-latestpass; onlywindows-latestfails.dart analyze --fatal-infosis clean on local macOS.analyze_and_test (windows-latest).Suspected root cause
analysis_options.yamlregistersdart_code_linteras an analyzerplugin, so its rules are surfaced throughdart analyze(in addition to the dedicateddart run dart_code_linter:metrics analyze libstep). The plugin appears to load/report non-deterministically on Windows, intermittently emitting (and duplicating) these warnings, which--fatal-infosthen treats as fatal.Suggested directions (for maintainers to evaluate)
dart run dart_code_linter:metrics analyze libstep for these rules and drop thedart_code_linteranalyzer-pluginregistration fromanalysis_options.yaml, sodart analyzeonly enforces core lints. ORtest/**from thedart_code_linterrules (these warnings are all in test files). ORdart_code_linter(currently^4.0.3) if a fixed version addresses the duplicate/non-deterministic reporting.Environment
stable(viadart-lang/setup-dart@v1)analyzer 12.1.0,dart_code_linter ^4.0.3