Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vale #103

Merged
merged 18 commits into from
Feb 9, 2024
Merged

Vale #103

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ https://github.com/google/shipshape is an old, abandoned attempt to open-source
It is also inspired by <https://github.com/github/super-linter>.

[aspect cli]: https://docs.aspect.build/v/cli
[tricorder]: https://static.googleusercontent.com/media/research.google.com/en//pubs/archive/43322.pdf
[tricorder]: https://static.googleusercontent.com/media/research.google.com/en/pubs/archive/43322.pdf
[reviewdog]: https://github.com/reviewdog/reviewdog

## Supported tools
Expand All @@ -37,7 +37,7 @@ It is also inspired by <https://github.com/github/super-linter>.
| JavaScript | [Prettier] | [ESLint] |
| Jsonnet | [jsonnetfmt] | |
| Kotlin | [ktfmt] | |
| Markdown | [Prettier] | |
| Markdown | [Prettier] | [Vale] |
| Protocol Buffer | [buf] | [buf lint] |
| Python | [ruff] | [flake8], [ruff] |
| SQL | [prettier-plugin-sql] | |
Expand Down Expand Up @@ -70,6 +70,7 @@ It is also inspired by <https://github.com/github/super-linter>.
[golangci-lint]: https://github.com/golangci/golangci-lint
[clang-format]: https://clang.llvm.org/docs/ClangFormat.html
[#112]: https://github.com/aspect-build/rules_lint/issues/112
[vale]: https://vale.sh/

1. Non-hermetic: requires that a swift toolchain is installed on the machine.
See https://github.com/bazelbuild/rules_swift#1-install-swift
Expand Down
5 changes: 5 additions & 0 deletions docs/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,9 @@ stardoc_with_diff_test(
bzl_library_target = "//lint:shellcheck",
)

stardoc_with_diff_test(
name = "vale",
bzl_library_target = "//lint:vale",
)

update_docs(name = "update")
141 changes: 141 additions & 0 deletions docs/vale.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions example/.aspect/cli/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ lint:
- //tools:lint.bzl%flake8
- //tools:lint.bzl%pmd
- //tools:lint.bzl%ruff
- //tools:lint.bzl%vale
11 changes: 11 additions & 0 deletions example/.vale.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# NB: this path doesn't exist in the source tree, it's created by the copy_to_directory rule
# in tools/BUILD.bazel.
# If you want vale to run outside Bazel, such as with an editor extension,
# you could also use `write_source_files` to have the tools/vale_styles folder written into the source tree as well.
StylesPath = tools/vale_styles

MinAlertLevel = warning
Packages = Google,write-good

[*]
BasedOnStyles = Vale,Google,write-good
7 changes: 7 additions & 0 deletions example/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
load("@aspect_bazel_lib//lib:copy_to_bin.bzl", "copy_to_bin")
load("@aspect_rules_js//js:defs.bzl", "js_library")
load("@npm//:defs.bzl", "npm_link_all_packages")
load("@rules_python//python:pip.bzl", "compile_pip_requirements")
Expand Down Expand Up @@ -47,3 +48,9 @@ alias(
name = "format",
actual = "//tools:format",
)

copy_to_bin(
name = ".vale_ini",
srcs = [".vale.ini"],
visibility = ["//src:__subpackages__"],
)
Loading
Loading