Tags: aspect-build/rules_lint
Tags
feat: Add cppcheck lint aspect (#617) Add `cppcheck` as `lint` aspect as per #569. A local test can be ran using: `cd example; bazel lint //src:hello_cc` The aspect supports human readable output and `xml` output, e.g. `cd example; bazel build //... --aspects=//tools/lint:linters.bzl%cppcheck --output_groups=rules_lint_xml` ### Changes are visible to end-users: yes - Searched for relevant documentation and updated as needed: yes - Breaking change (forces users to change their own code or config): no - Suggested release notes appear below: yes "Add cppcheck linter" ### Test plan - Manual testing: `cd example; bazel build //... --aspects=//tools/lint:linters.bzl%cppcheck --output_groups=rules_lint_xml`: This will produce following output: ``` INFO: Analyzed 194 targets (0 packages loaded, 0 targets configured). INFO: Found 194 targets... Aspect //tools/lint:linters.bzl%cppcheck of //src:hello_cc up-to-date: bazel-bin/src/hello_cc.AspectRulesLintCppCheck.xml Aspect //tools/lint:linters.bzl%cppcheck of //src/cpp/main:hello-greet up-to-date: bazel-bin/src/cpp/main/hello-greet.AspectRulesLintCppCheck.xml Aspect //tools/lint:linters.bzl%cppcheck of //src:hello_c up-to-date: bazel-bin/src/hello_c.AspectRulesLintCppCheck.xml Aspect //tools/lint:linters.bzl%cppcheck of //src/cpp/lib:hello-time up-to-date: bazel-bin/src/cpp/lib/hello-time.AspectRulesLintCppCheck.xml Aspect //tools/lint:linters.bzl%cppcheck of //src/cpp/main:hello-world up-to-date: bazel-bin/src/cpp/main/hello-world.AspectRulesLintCppCheck.xml INFO: Elapsed time: 0.227s, Critical Path: 0.01s INFO: 1 process: 1 internal. INFO: Build completed successfully, 1 total action ``` --------- Co-authored-by: Alex Eagle <alex@aspect.build>
fix: Shell formatter finds files without extension (#622) This lets `shfmt` format shell scripts identified only by their shebang but without any extension. Closes #549 ### Changes are visible to end-users: yes - Breaking change (forces users to change their own code or config): no but... The formatter will now format more files in the users' repository. The "Shell" run is also slower. For reference, it runs in about 10 seconds on my laptop in the https://github.com/Checkmk/checkmk repository. I would say that it is acceptable. For comparison, formatting our (unfortunately closed-source) C++ code takes 5 sec. ### Test plan - Covered by existing test cases: `shfmt` is already supported - New test cases added: Copied a `hello.sh` to `hello_sh` (no extension) in the example directory and made sure it's picked up by the formatter. - Manual testing: I also ran `bazel run //:format` with the current patch in https://github.com/Checkmk/checkmk and it reformatted files identified only by their shebang
PreviousNext