diff --git a/CHANGELOG.md b/CHANGELOG.md index a154d308..26a3746b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,8 @@ ## master (unreleased) * Add `--disable-pending-cops` as default flag to `RuboCop` pre-commit hook to ignore non-existent cops. Requires RuboCop `0.82.0` or newer. -* Add "ad-hoc" line-aware command hooks +* Add "ad-hoc" line-aware command hooks. +* Add `Vale` pre-commit hook to check spelling and style in text and source files. ## 0.58.0 diff --git a/README.md b/README.md index 7ca87a3f..13ac99e5 100644 --- a/README.md +++ b/README.md @@ -567,6 +567,7 @@ issue](https://github.com/sds/overcommit/issues/238) for more details. * [TrailingWhitespace](lib/overcommit/hook/pre_commit/trailing_whitespace.rb) * [TravisLint](lib/overcommit/hook/pre_commit/travis_lint.rb) * [TsLint](lib/overcommit/hook/pre_commit/ts_lint.rb) +* Vale * [Vint](lib/overcommit/hook/pre_commit/vint.rb) * [W3cCss](lib/overcommit/hook/pre_commit/w3c_css.rb) * [W3cHtml](lib/overcommit/hook/pre_commit/w3c_html.rb) diff --git a/config/default.yml b/config/default.yml index 51189348..576ce478 100644 --- a/config/default.yml +++ b/config/default.yml @@ -842,6 +842,59 @@ PreCommit: install_command: 'gem install travis' include: '.travis.yml' + Vale: + enabled: false + command: "vale" + ad_hoc: + message_pattern: !ruby/regexp /^(?[^:]+):(?[0-9]+):/ + flags: + - '--output=line' + include: + # All known extensions for all supported formats are included + # (see https://docs.errata.ai/vale/scoping#formats), even + # the non-built-in ones that require additional software and/or + # configuration: they can be disabled easily using 'exclude': + - '**/*.adoc' + - '**/*.bsh' + - '**/*.c' + - '**/*.cc' + - '**/*.cpp' + - '**/*.cs' + - '**/*.css' + - '**/*.csx' + - '**/*.cxx' + - '**/*.dita' + - '**/*.java' + - '**/*.js' + - '**/*.go' + - '**/*.h' + - '**/*.hpp' + - '**/*.hs' + - '**/*.html' + - '**/*.less' + - '**/*.lua' + - '**/*.md' + - '**/*.php' + - '**/*.pl' + - '**/*.pm' + - '**/*.pod' + - '**/*.py' + - '**/*.py3' + - '**/*.pyi' + - '**/*.pyw' + - '**/*.R' + - '**/*.r' + - '**/*.rb' + - '**/*.rpy' + - '**/*.rst' + - '**/*.sass' + - '**/*.sbt' + - '**/*.scala' + - '**/*.swift' + - '**/*.txt' + - '**/*.xhtml' + - '**/*.xml' + Vint: enabled: false description: 'Analyze with Vint'