Skip to content

Commit

Permalink
chore: Add cspell check hook for lefthook (#103)
Browse files Browse the repository at this point in the history
  • Loading branch information
hustcer authored Nov 4, 2024
1 parent 4e14dd5 commit 9cbb247
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 3 deletions.
18 changes: 18 additions & 0 deletions cspell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# REF:
# https://cspell.org/configuration/
# Usage:
# npx cspell --no-progress .

words:
- ECODE
- endfor
- dotenv
- nushell
- hustcer
- rsbuild
- justfile
- lefthook
- linewise
- hovercards
ignorePaths:

33 changes: 33 additions & 0 deletions lefthook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# EXAMPLE USAGE
# Refer for explanation to following link:
# https://github.com/evilmartians/lefthook/blob/master/docs/configuration.md
#
# pre-push:
# commands:
# packages-audit:
# tags: frontend security
# run: yarn audit
# gems-audit:
# tags: backend security
# run: bundle audit
#
min_version: 1.7.12
no_tty: false
skip_output:
- meta # Skips lefthook version printing
- skips # Skips "skip" printing (i.e. no files matched)
- summary # Skips summary block (successful and failed steps) printing
- success # Skips successful steps printing
- failure # Skips failed steps printing
- execution_info # Skips printing `EXECUTE > ...` logging

pre-commit:
parallel: true
commands:
spell-check:
skip:
- merge
- rebase
stage_fixed: true
glob: "*.*"
run: cspell --no-progress {staged_files}
2 changes: 1 addition & 1 deletion nu/milestone.nu
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export def 'milestone-bind-for-issue' [
}
}

# Guess milestone by the merged date of the PR and the infomation of open milestones.
# Guess milestone by the merged date of the PR and the information of open milestones.
def guess-milestone-for-pr [repo: string, pr: string] {
# Query github open milestone list by gh
let milestones = gh api -X GET $'/repos/($repo)/milestones' --paginate | from json
Expand Down
4 changes: 2 additions & 2 deletions nu/release.nu
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#
# TODO:
# [√] Make sure the release tag does not exist;
# [√] Make sure there are no uncommit changes;
# [√] Make sure there are no uncommitted changes;
# [√] Update change log if required;
# [√] Create a release tag and push it to the remote repo;
# Usage:
Expand All @@ -25,7 +25,7 @@ export def 'make-release' [
let majorTag = $releaseVer | split row '.' | first
let statusCheck = (git status --porcelain)
if not ($statusCheck | is-empty) {
echo $'You have uncommit changes, please commit them and try `release` again!(char nl)'
echo $'You have uncommitted changes, please commit them and try `release` again!(char nl)'
exit 5
}
if ($update_log) {
Expand Down

0 comments on commit 9cbb247

Please sign in to comment.