Skip to content

Commit 7565ef2

Browse files
committed
Add Vale pre-commit hook to check spelling/style
1 parent a359629 commit 7565ef2

File tree

3 files changed

+56
-1
lines changed

3 files changed

+56
-1
lines changed

CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
## master (unreleased)
44

55
* Add `--disable-pending-cops` as default flag to `RuboCop` pre-commit hook to ignore non-existent cops. Requires RuboCop `0.82.0` or newer.
6-
* Add "ad-hoc" line-aware command hooks
6+
* Add "ad-hoc" line-aware command hooks.
7+
* Add `Vale` pre-commit hook to check spelling and style in text and source files.
78

89
## 0.58.0
910

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -565,6 +565,7 @@ issue](https://github.com/sds/overcommit/issues/238) for more details.
565565
* [TrailingWhitespace](lib/overcommit/hook/pre_commit/trailing_whitespace.rb)
566566
* [TravisLint](lib/overcommit/hook/pre_commit/travis_lint.rb)
567567
* [TsLint](lib/overcommit/hook/pre_commit/ts_lint.rb)
568+
* Vale
568569
* [Vint](lib/overcommit/hook/pre_commit/vint.rb)
569570
* [W3cCss](lib/overcommit/hook/pre_commit/w3c_css.rb)
570571
* [W3cHtml](lib/overcommit/hook/pre_commit/w3c_html.rb)

config/default.yml

+53
Original file line numberDiff line numberDiff line change
@@ -842,6 +842,59 @@ PreCommit:
842842
install_command: 'gem install travis'
843843
include: '.travis.yml'
844844

845+
Vale:
846+
enabled: false
847+
command: "vale"
848+
ad_hoc:
849+
message_pattern: !ruby/regexp /^(?<file>[^:]+):(?<line>[0-9]+):/
850+
flags:
851+
- '--output=line'
852+
include:
853+
# All known extensions for all supported formats are included
854+
# (see https://docs.errata.ai/vale/scoping#formats), even
855+
# the non-built-in ones that require additional software and/or
856+
# configuration: they can be disabled easily using 'exclude':
857+
- '**/*.adoc'
858+
- '**/*.bsh'
859+
- '**/*.c'
860+
- '**/*.cc'
861+
- '**/*.cpp'
862+
- '**/*.cs'
863+
- '**/*.css'
864+
- '**/*.csx'
865+
- '**/*.cxx'
866+
- '**/*.dita'
867+
- '**/*.java'
868+
- '**/*.js'
869+
- '**/*.go'
870+
- '**/*.h'
871+
- '**/*.hpp'
872+
- '**/*.hs'
873+
- '**/*.html'
874+
- '**/*.less'
875+
- '**/*.lua'
876+
- '**/*.md'
877+
- '**/*.php'
878+
- '**/*.pl'
879+
- '**/*.pm'
880+
- '**/*.pod'
881+
- '**/*.py'
882+
- '**/*.py3'
883+
- '**/*.pyi'
884+
- '**/*.pyw'
885+
- '**/*.R'
886+
- '**/*.r'
887+
- '**/*.rb'
888+
- '**/*.rpy'
889+
- '**/*.rst'
890+
- '**/*.sass'
891+
- '**/*.sbt'
892+
- '**/*.scala'
893+
- '**/*.swift'
894+
- '**/*.txt'
895+
- '**/*.xhtml'
896+
- '**/*.xml'
897+
845898
Vint:
846899
enabled: false
847900
description: 'Analyze with Vint'

0 commit comments

Comments
 (0)