Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Add cspell check hook for lefthook #103

Merged
merged 1 commit into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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