Skip to content

Commit

Permalink
Add Vale pre-commit hook to check spelling/style
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaume-d committed Jun 12, 2021
1 parent a359629 commit 7565ef2
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,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)
Expand Down
53 changes: 53 additions & 0 deletions config/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -842,6 +842,59 @@ PreCommit:
install_command: 'gem install travis'
include: '.travis.yml'

Vale:
enabled: false
command: "vale"
ad_hoc:
message_pattern: !ruby/regexp /^(?<file>[^:]+):(?<line>[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'
Expand Down

0 comments on commit 7565ef2

Please sign in to comment.