Skip to content

Conversation

@vlkv
Copy link

@vlkv vlkv commented Nov 7, 2025

What I have changed:

  • added flags to .bazelrc to enable linting aspects at every bazel build + flag to fail the build on errors from linters
  • added bazelisk to the root of //example
  • added gcc_toolchain because I do not have gcc installed on my host machine

How to run:

cd ./example
./bazelisk build //src:ts

Actual result NO ERRORS from eslint:

INFO: Invocation ID: 7767b568-08fd-4077-833d-a7ca686b0525
WARNING: Build option --@@aspect_rules_ts~//ts:skipLibCheck has changed, discarding analysis cache (this can be expensive, see https://bazel.build/advanced/performance/iteration-speed).
Analyzing: target //src:ts (0 packages loaded, 0 targets configured)
INFO: Analyzed target //src:ts (0 packages loaded, 21464 targets configured).
INFO: Found 1 target...
Target //src:ts up-to-date:
  bazel-bin/src/file.js
Aspect //tools/lint:linters.bzl%eslint of //src:ts up-to-date (nothing to build)
INFO: Elapsed time: 0.751s, Critical Path: 0.13s
INFO: 1 process: 1 internal.
INFO: Build completed successfully, 1 total action

Expected result: there SHOULD BE SOME ERRORS from eslint! Because they present in the example/src/file.ts

@aspect-workflows
Copy link

aspect-workflows bot commented Nov 7, 2025

Test

All tests were cache hits

5 tests (100.0%) were fully cached saving 2s.


Test

example

⚠️ Buildkite build #468 failed.

//:prettierrc failed to build

in //tools/lint:linters.bzl%eslint aspect on js_library rule //:prettierrc:
Traceback (most recent call last):
	File "/mnt/ephemeral/output/rules_lint/example/external/aspect_rules_lint~/lint/eslint.bzl", line 228,
column 19, in _eslint_aspect_impl
		eslint_fix(ctx, ctx.executable, files_to_lint, outputs.patch, outputs.human.out, outputs.human.exit_code,
format = ctx.attr._stylish_formatter, env = color_env)
	File "/mnt/ephemeral/output/rules_lint/example/external/aspect_rules_lint~/lint/eslint.bzl", line 198,
column 58, in eslint_fix
		"JS_BINARY__EXIT_CODE_OUTPUT_FILE": exit_code.path,
Error: 'NoneType' value has no field or method 'path'

//src:unused_import failed to build

in //tools/lint:linters.bzl%ruff aspect on py_library rule //src:unused_import:
Traceback (most recent call last):
	File "/mnt/ephemeral/output/rules_lint/example/external/aspect_rules_lint~/lint/ruff.bzl", line 179, column
17, in _ruff_aspect_impl
		ruff_fix(ctx, ctx.executable, files_to_lint, ctx.files._config_files, outputs.patch, outputs.human.out,
outputs.human.exit_code, env = color_env)
	File "/mnt/ephemeral/output/rules_lint/example/external/aspect_rules_lint~/lint/ruff.bzl", line 151, column
58, in ruff_fix
		"JS_BINARY__EXIT_CODE_OUTPUT_FILE": exit_code.path,
Error: 'NoneType' value has no field or method 'path'

//src:hello_shell failed to build

bash failed: error executing AspectRulesLintShellCheck command (from target //src:hello_shell) /bin/bash -c ... (remaining 5 arguments skipped)
 
Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
 

In src/hello.sh line 4:
[ -z $THING ] && echo "hello world"
     ^----^ SC2086 (info): Double quote to prevent globbing and word splitting.
 
Did you mean:
[ -z "$THING" ] && echo "hello world"
 

In src/hello.sh line 10:
grep '*foo*' file
     ^-----^ SC2063 (warning): Grep uses regex, but this looks like a glob.
 
For more information:
  https://www.shellcheck.net/wiki/SC2063 -- Grep uses regex, but this looks l...
  https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...

//src:unused_import_pyi failed to build

in //tools/lint:linters.bzl%ruff aspect on filegroup rule //src:unused_import_pyi:
Traceback (most recent call last):
	File "/mnt/ephemeral/output/rules_lint/example/external/aspect_rules_lint~/lint/ruff.bzl", line 179, column
17, in _ruff_aspect_impl
		ruff_fix(ctx, ctx.executable, files_to_lint, ctx.files._config_files, outputs.patch, outputs.human.out,
outputs.human.exit_code, env = color_env)
	File "/mnt/ephemeral/output/rules_lint/example/external/aspect_rules_lint~/lint/ruff.bzl", line 151, column
58, in ruff_fix
		"JS_BINARY__EXIT_CODE_OUTPUT_FILE": exit_code.path,
Error: 'NoneType' value has no field or method 'path'

//src:ts_dep failed to build

in //tools/lint:linters.bzl%eslint aspect on ts_project rule //src:ts_dep:
Traceback (most recent call last):
	File "/mnt/ephemeral/output/rules_lint/example/external/aspect_rules_lint~/lint/eslint.bzl", line 228,
column 19, in _eslint_aspect_impl
		eslint_fix(ctx, ctx.executable, files_to_lint, outputs.patch, outputs.human.out, outputs.human.exit_code,
format = ctx.attr._stylish_formatter, env = color_env)
	File "/mnt/ephemeral/output/rules_lint/example/external/aspect_rules_lint~/lint/eslint.bzl", line 198,
column 58, in eslint_fix
		"JS_BINARY__EXIT_CODE_OUTPUT_FILE": exit_code.path,
Error: 'NoneType' value has no field or method 'path'

18 other actions failed to build.

💡 To reproduce the build failures, run

bazel build //:prettierrc //src:unused_import //src:hello_shell //src:unused_import_pyi //src:ts_dep

Test (WORKSPACE) (Test)

example

⚠️ Buildkite build #468 failed.

//src:unused_import failed to build

in //tools/lint:linters.bzl%ruff aspect on py_library rule //src:unused_import:
Traceback (most recent call last):
	File "/mnt/ephemeral/output/rules_lint/example/external/aspect_rules_lint/lint/ruff.bzl", line 179, column
17, in _ruff_aspect_impl
		ruff_fix(ctx, ctx.executable, files_to_lint, ctx.files._config_files, outputs.patch, outputs.human.out,
outputs.human.exit_code, env = color_env)
	File "/mnt/ephemeral/output/rules_lint/example/external/aspect_rules_lint/lint/ruff.bzl", line 151, column
58, in ruff_fix
		"JS_BINARY__EXIT_CODE_OUTPUT_FILE": exit_code.path,
Error: 'NoneType' value has no field or method 'path'

//:eslintrc failed to build

in //tools/lint:linters.bzl%eslint aspect on js_library rule //:eslintrc:
Traceback (most recent call last):
	File "/mnt/ephemeral/output/rules_lint/example/external/aspect_rules_lint/lint/eslint.bzl", line 228, column
19, in _eslint_aspect_impl
		eslint_fix(ctx, ctx.executable, files_to_lint, outputs.patch, outputs.human.out, outputs.human.exit_code,
format = ctx.attr._stylish_formatter, env = color_env)
	File "/mnt/ephemeral/output/rules_lint/example/external/aspect_rules_lint/lint/eslint.bzl", line 198, column
58, in eslint_fix
		"JS_BINARY__EXIT_CODE_OUTPUT_FILE": exit_code.path,
Error: 'NoneType' value has no field or method 'path'

//:prettierrc failed to build

in //tools/lint:linters.bzl%eslint aspect on js_library rule //:prettierrc:
Traceback (most recent call last):
	File "/mnt/ephemeral/output/rules_lint/example/external/aspect_rules_lint/lint/eslint.bzl", line 228, column
19, in _eslint_aspect_impl
		eslint_fix(ctx, ctx.executable, files_to_lint, outputs.patch, outputs.human.out, outputs.human.exit_code,
format = ctx.attr._stylish_formatter, env = color_env)
	File "/mnt/ephemeral/output/rules_lint/example/external/aspect_rules_lint/lint/eslint.bzl", line 198, column
58, in eslint_fix
		"JS_BINARY__EXIT_CODE_OUTPUT_FILE": exit_code.path,
Error: 'NoneType' value has no field or method 'path'

//:stylelintrc failed to build

in //tools/lint:linters.bzl%eslint aspect on js_library rule //:stylelintrc:
Traceback (most recent call last):
	File "/mnt/ephemeral/output/rules_lint/example/external/aspect_rules_lint/lint/eslint.bzl", line 228, column
19, in _eslint_aspect_impl
		eslint_fix(ctx, ctx.executable, files_to_lint, outputs.patch, outputs.human.out, outputs.human.exit_code,
format = ctx.attr._stylish_formatter, env = color_env)
	File "/mnt/ephemeral/output/rules_lint/example/external/aspect_rules_lint/lint/eslint.bzl", line 198, column
58, in eslint_fix
		"JS_BINARY__EXIT_CODE_OUTPUT_FILE": exit_code.path,
Error: 'NoneType' value has no field or method 'path'

//src:ts_typings failed to build

in //tools/lint:linters.bzl%eslint aspect on ts_project rule //src:ts_typings:
Traceback (most recent call last):
	File "/mnt/ephemeral/output/rules_lint/example/external/aspect_rules_lint/lint/eslint.bzl", line 228, column
19, in _eslint_aspect_impl
		eslint_fix(ctx, ctx.executable, files_to_lint, outputs.patch, outputs.human.out, outputs.human.exit_code,
format = ctx.attr._stylish_formatter, env = color_env)
	File "/mnt/ephemeral/output/rules_lint/example/external/aspect_rules_lint/lint/eslint.bzl", line 198, column
58, in eslint_fix
		"JS_BINARY__EXIT_CODE_OUTPUT_FILE": exit_code.path,
Error: 'NoneType' value has no field or method 'path'

18 other actions failed to build.

💡 To reproduce the build failures, run

bazel build //src:unused_import //:eslintrc //:prettierrc //:stylelintrc //src:ts_typings

Lint

example

0 issues require fixes
0 issues can be fixed automatically


Lint [.]

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Vitaly Volkov seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

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