You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to get this working on Windows, I've added select statements for some things in linters.bzl, and an echo statement to lint.sh. It's now working in example except it stops on first issue, and prints a different issue each time:
d:\workdir\rules_lint\example>bash lint.sh --keep_going src:all
bazel build --aspects=//tools/lint:linters.bzl%buf,//tools/lint:linters.bzl%eslint,//tools/lint:linters.bzl%flake8,//tools/lint:linters.bzl%pmd,//tools/lint:linters.bzl%ruff,//tools/lint:linters.bzl%shellcheck,//tools/lint:linters.bzl%golangci_lint,//tools/lint:linters.bzl%vale --build_event_json_file=/tmp/tmp.3z2v30BWf8 --output_groups=rules_lint_report --remote_download_regex='.*aspect_rules_lint.report' --keep_going src:all
WARNING: Running Bazel server needs to be killed, because the startup options are different.
Starting local Bazel server and connecting to it...
WARNING: For repository 'rules_java', the root module requires module version rules_java@5.5.0, but got rules_java@7.1.0 in the resolved dependency graph.
WARNING: For repository 'platforms', the root module requires module version platforms@0.0.7, but got platforms@0.0.8 in the resolved dependency graph.
DEBUG: C:/users/browchri/_bazel_browchri/ipvyj7f4/external/aspect_rules_ts~1.3.3/ts/private/ts_project.bzl:74:14:
WARNING: disabling ts_project workers which are not currently support on Windows hosts.
See https://github.com/aspect-build/rules_ts/issues/228 for more details.
INFO: Analyzed 10 targets (251 packages loaded, 16879 targets configured).
INFO: Found 10 targets...
INFO: Elapsed time: 31.865s, Critical Path: 2.25s
INFO: 1 process: 1 internal.
INFO: Build completed successfully, 1 total action
INFO: Build Event Protocol files produced successfully.
From bazel-out/x64_windows-fastbuild/bin/src/ESLint.ts.aspect_rules_lint.report:
src\file.ts: line 2, col 7, Error - Type string trivially inferred from a string literal, remove type annotation. (@typescript-eslint/no-inferrable-types)
1 problem
Version
Development (host) and target OS/architectures:
Windows
Output of bazel --version:
bazel 7.0.0
Version of the Aspect rules, or other relevant rules from your WORKSPACE or MODULE.bazel file:
as latest example repo
Language(s) and/or frameworks involved:
How to reproduce
clone rules_lint
cd examples
bash lint.sh --keep_going src:all
Any other information?
No response
The text was updated successfully, but these errors were encountered:
I imagine that's because we have ctx.actions.run_shell with a bash one-liner to ignore the failing exit code from eslint. https://bazel.build/rules/lib/builtins/actions#run_shell
I imagine that needs to be windows-aware and do something different, ideally with a batch script?
alexeagle
changed the title
[Bug]: lint.sh stops on first issue
[Bug]: lint.sh stops on first issue on Windows
Mar 27, 2024
This issue will be fixed by #287; it is a feature of jq that it outputs CRLF on windows. The CRLFs break the subsequent bash script loops. I've added a fix to lint.sh.
What happened?
Trying to get this working on Windows, I've added select statements for some things in linters.bzl, and an echo statement to lint.sh. It's now working in example except it stops on first issue, and prints a different issue each time:
Version
Development (host) and target OS/architectures:
Windows
Output of
bazel --version
:bazel 7.0.0
Version of the Aspect rules, or other relevant rules from your
WORKSPACE
orMODULE.bazel
file:as latest example repo
Language(s) and/or frameworks involved:
How to reproduce
clone rules_lint cd examples bash lint.sh --keep_going src:all
Any other information?
No response
The text was updated successfully, but these errors were encountered: