-
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Technical/Add commit spellcheck linter
* Added commit spellcheck linter, configuration * Updated lefthook config
- Loading branch information
Showing
3 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
|
||
enableGlobDot: true | ||
|
||
patterns: | ||
- name: GithubUser | ||
pattern: /\[@.+\]/gmx | ||
|
||
languageSettings: | ||
- languageId: markdown | ||
ignoreRegExpList: | ||
- GithubUser | ||
|
||
words: | ||
- bestwebua | ||
- codecov | ||
- consts | ||
- crtypto | ||
- funcs | ||
- golangci | ||
- gomod | ||
- gotestsum | ||
- lefthook | ||
- markdownlint | ||
- multihomed | ||
- punycode | ||
- rubocop | ||
- shellcheck | ||
- shortcuting | ||
- struct | ||
- structs | ||
- truemail | ||
- yamlint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
configuration=$(if [ "$2" = "" ]; then echo "$2"; else echo " $1 $2"; fi) | ||
latest_commit=$(git rev-parse HEAD) | ||
|
||
spellcheck_info() { | ||
echo "Checking the spelling of the latest commit ($latest_commit) message..." | ||
} | ||
|
||
compose_cspell_command() { | ||
echo "cspell-cli lint stdin$configuration" | ||
} | ||
|
||
cspell="$(compose_cspell_command)" | ||
|
||
spellcheck_latest_commit() { | ||
git log -1 --pretty=%B | $cspell | ||
} | ||
|
||
spellcheck_info | ||
spellcheck_latest_commit |