v1.0.0
Using Bzlmod with Bazel 6
- Enable with
common --enable_bzlmod
in.bazelrc
. - Add to your
MODULE.bazel
file:
bazel_dep(name = "aspect_rules_lint", version = "1.0.0")
# Next, follow the install instructions for
# - linting: https://github.com/aspect-build/rules_lint/blob/v1.0.0/docs/linting.md
# - formatting: https://github.com/aspect-build/rules_lint/blob/v1.0.0/docs/formatting.md
Using WORKSPACE
Paste this snippet into your file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "aspect_rules_lint",
sha256 = "3eddc2b7f989cb7d490fe0e67e59db76dcd4e8fa5df352feaff90f92d2f08ec6",
strip_prefix = "rules_lint-1.0.0",
url = "https://github.com/aspect-build/rules_lint/releases/download/v1.0.0/rules_lint-v1.0.0.tar.gz",
)
# aspect_rules_lint depends on aspect_bazel_lib.
http_archive(
name = "aspect_bazel_lib",
sha256 = "6d758a8f646ecee7a3e294fbe4386daafbe0e5966723009c290d493f227c390b",
strip_prefix = "bazel-lib-2.7.7",
url = "https://github.com/aspect-build/bazel-lib/releases/download/v2.7.7/bazel-lib-v2.7.7.tar.gz",
)
load("@aspect_bazel_lib//lib:repositories.bzl", "aspect_bazel_lib_dependencies")
# aspect_bazel_lib depends on bazel_skylib
aspect_bazel_lib_dependencies()
load(
"@aspect_rules_lint//format:repositories.bzl",
# Fetch additional formatter binaries you need:
"fetch_java_format",
"fetch_ktfmt",
"fetch_swiftformat",
"rules_lint_dependencies",
)
rules_lint_dependencies()
fetch_java_format()
fetch_ktfmt()
fetch_swiftformat()
load("@aspect_rules_lint//lint:checkstyle.bzl", "fetch_checkstyle")
fetch_checkstyle()
load("@aspect_rules_lint//lint:pmd.bzl", "fetch_pmd")
fetch_pmd()
load("@aspect_rules_lint//lint:vale.bzl", "fetch_vale")
fetch_vale()
load("@aspect_rules_lint//lint:ktlint.bzl", "fetch_ktlint")
fetch_ktlint()
########################
# Optional: multitool provides defaults for some tools such as yamlfmt
# If you do not set up multitool, you must provide these tools yourself
load("@rules_multitool//multitool:multitool.bzl", "multitool")
multitool(
name = "multitool",
lockfiles = [
"@aspect_rules_lint//format:multitool.lock.json",
"@aspect_rules_lint//lint:multitool.lock.json",
],
)
What's Changed
- docs: clarify warning vs error by @alexeagle in #241
- chore: Real time instead of user time when formatting by @honnix in #240
- feat: format.sh has same behavior with arguments by @mrmeku in #244
- chore: bump example to rules_js 2.0.0-alpha.7 by @gregmagolan in #247
- chore: upgrade example to eslint 9 by @alexeagle in #246
- feat(format): add SCSS and Less as CSS variants by @alexeagle in #248
- feat: print better command to fix format check fails by @alexeagle in #249
- chore(deps): example update to rules_js2 RC by @alexeagle in #250
- fix(example): demonstrate use of type definitions in eslint aspect by @jgao54 in #174
- docs(format): include API docs for each language/tool by @alexeagle in #251
- fix: move mnemonic to after label in report, exit_code and patch output filename by @gregmagolan in #252
- Changes by create-pull-request action by @github-actions in #253
- chore: bump example to bazel-lib 2.7.5 by @gregmagolan in #254
- chore: show less noisy prettier in example by @alexeagle in #256
- Changes by create-pull-request action by @github-actions in #258
- docs: clarify what's not recommended by @alexeagle in #264
- chore: bump example to bazel-lib 2.7.7 by @gregmagolan in #265
- prettier log level followup by @alexeagle in #257
- fix(format): "File name too long" when using --disable_git_attribute_checks by @mattnworb in #262
- feat: add format_multirun() attribute to disable slow gitattribute checks by @mattnworb in #263
- chore: bump to Aspect CLI 5.9.36 by @gregmagolan in #268
- refactor: introduce mnemonic convention for rules_lint linters by @gregmagolan in #266
- chore: test on Bazel 7 by @alexeagle in #191
- Changes by create-pull-request action by @github-actions in #271
- chore(example): enable proto toolchain resolution by @alexeagle in #267
- Correct docstring for eslint (#275) by @jmeekhof in #276
- Changes by create-pull-request action by @github-actions in #274
- chore: add --check_direct_dependencies to .bazelrc by @gregmagolan in #277
- feat: Optimize the git ignore checks by @mrmeku in #270
- chore(deps): update yamlfmt and gofumpt to latest by @hunshcn in #278
- feat: auto-update multitool versions by @hunshcn in #281
- Only run aspect actions when input files provided by @psalaberria002 in #273
- feat: Add Cuda format support by @jsharpe in #285
- fix(format): print FIX_CMD only when check by @hunshcn in #280
- Changes by create-pull-request action by @github-actions in #286
- refactor: combine mirroring into one step by @alexeagle in #289
- Update mirror.yml by @alexeagle in #291
- Changes by create-pull-request action by @github-actions in #292
- Feat: clang-tidy for linting of C/C++ code by @peakschris in #287
- Update clang_tidy_wrapper.bash shebang by @jsharpe in #299
- Fix safe_flag parsing in clang_tidy.bzl by @jsharpe in #300
- Changes by create-pull-request action by @github-actions in #301
- chore: fix ruff mirroring by @alexeagle in #306
- Changes by create-pull-request action by @github-actions in #308
- feat: include ruff in multitool by @alexeagle in #309
- chore: update buildifier pre-commit by @alexeagle in #311
- chore: mirror latest vale release by @alexeagle in #310
- Fix ironic typo by @SpencerC in #316
- Changes by create-pull-request action by @github-actions in #315
- fix: ruff 0.5.0 windows release doesn't nest a folder by @alexeagle in #318
- feat: linter aspect factories allow customizing rule kinds by @alexeagle in #321
- Changes by create-pull-request action by @github-actions in #328
- feat: add GraphQL format support (#319) by @sallustfire in #322
- Fix Rust formatting when //:format is called in different subdirectory by @dmeister in #327
- feat: produce new human-readable output group by @alexeagle in #331
- fix: connect eslint --debug by @sallustfire in #334
- feat: color the human-readable outputs by @alexeagle in #333
- fix: lint.sh script --fix flag by @alexeagle in #338
- fix(eslint): print relative paths in stylish output by @alexeagle in #337
- chore: run formatter by @alexeagle in #336
- fix: include transitive type declarations with eslint by @sallustfire in #339
- chore(deps): example: upgrade buf to latest rules and tool runtime by @alexeagle in #342
- feat: stylelint by @alexeagle in #341
- Changes by create-pull-request action by @github-actions in #343
- Changes by create-pull-request action by @github-actions in #348
- chore(docs): fix eslint copy-pasta by @alexeagle in #345
- Changes by create-pull-request action by @github-actions in #352
- Changes by create-pull-request action by @github-actions in #356
- chore: update bazel-lib version in WORKSPACE snippet by @alexeagle in #354
- chore: mirror newest vale release by @alexeagle in #357
- Remove cxxopt flags when linting C sources. by @agoessling in #359
- Add C example and file extension. by @agoessling in #349
- fix: filter out 'external' sources from linting by @alexeagle in #358
- chore(deps): bump bazel-lib minimum by @alexeagle in #360
- Changes by create-pull-request action by @github-actions in #361
- Fix crash caused by fail-on-violation and no lintable files in target by @tokongs in #362
- chore(deps): update stardoc by @alexeagle in #363
- Revert "chore(deps): update stardoc" by @alexeagle in #364
- chore: update stardoc by @alexeagle in #365
- Changes by create-pull-request action by @github-actions in #366
- Changes by create-pull-request action by @github-actions in #367
- fix: don't run eslint with zero files to check by @alexeagle in #370
- Changes by create-pull-request action by @github-actions in #373
- Add --respect-project-filters to scalafmt by @vinnybod in #372
- Add a checkstyle linter by @vinnybod in #374
- fix: handle empty exit_code File when fail_on_violation is set by @gregmagolan in #375
- Changes by create-pull-request action by @github-actions in #376
- fix(example): include clang-tidy in bazel lint setup by @alexeagle in #379
- Changes by create-pull-request action by @github-actions in #380
- chore: final docs for 1.0 by @alexeagle in #381
New Contributors
- @jgao54 made their first contribution in #174
- @jmeekhof made their first contribution in #276
- @peakschris made their first contribution in #287
- @SpencerC made their first contribution in #316
- @sallustfire made their first contribution in #322
- @dmeister made their first contribution in #327
- @agoessling made their first contribution in #359
- @vinnybod made their first contribution in #372
Full Changelog: v0.21.0...v1.0.0