Add supported_cli_lint_modes#7150
Conversation
✅
|
|
This pull request has been automatically marked as stale because it has not had recent activity. If you think this pull request should stay open, please remove the |
|
@bdovaz is this PR still draft ? 🙃 |
Yes, as you can see, I still have 4 linters to fix. There's very little left, but I'm still working on it. |
…upported_cli_lint_modes
…linter into supported_cli_lint_modes
|
Bugbot is not enabled for this team, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
The per-mode tests set <LINTER>_CLI_LINT_MODE then built the linter, which now raises when the mode is unsupported (runtime enforcement). Probe the linter's supported modes before applying the override so unsupported modes are skipped instead of erroring; move the skip logic into LinterTestRoot and drop the redundant per-mode wrappers in utilstest.
The per-mode test refactor moved php_good_1.php / php_good_2.php into the .automation/test/php/good/ subfolder, but runtime-image.test.js still copied them from the old flat path, failing the PHP_PHPCSFIXER runtime-image tests with ENOENT.
The fixture reorg moved .automation/test/perl/perl_good_2 to .automation/test/perl/good/perl_good_2.pl (subfolder + .pl extension), but filters_test.test_file_contains_true still referenced the old flat path, failing with a missing-file assertion.

Fixes #7120
Proposed Changes
supported_cli_lint_modesschema to explicitly establish which modes each linter supports.success/failuretests in each of the supported modes. This is important because until now, only the mode configured incli_lint_modewas tested.filetolist_of_filesorprojectin cases where it has been possible.Readiness Checklist
Author/Contributor
Reviewing Maintainer
breakingif this is a large fundamental changeautomation,bug,documentation,enhancement,infrastructure, orperformance