Skip to content

Commit

Permalink
chore: Add cspell checking hook
Browse files Browse the repository at this point in the history
  • Loading branch information
hustcer committed Nov 8, 2024
1 parent 1371a71 commit 93d0da1
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 6 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ All notable changes to this project will be documented in this file.

### Features

- Make sure major vesion tag always point to the latest semver tag that has the same major version
- Make sure major version tag always point to the latest semver tag that has the same major version

## [1.5] - 2024-04-27

Expand All @@ -64,7 +64,7 @@ All notable changes to this project will be documented in this file.

- Add daily checking workflow to make sure `setup-moonbit` works, close #1 (#3)
- Make moonbit.nu works on both Github runners and local machine
- Use `http get` instead of `aria2c` for binary downloading when `aira2c` is not installed (#9)
- Use `http get` instead of `aria2c` for binary downloading when `aria2c` is not installed (#9)
- Add moondoc command

### Miscellaneous Tasks
Expand Down
22 changes: 22 additions & 0 deletions cspell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# REF:
# https://cspell.org/configuration/
# Usage:
# npx cspell --no-progress .

words:
- msvc
- esep
- rsort
- ECODE
- endfor
- dotenv
- libtcc
- nushell
- hustcer
- rsbuild
- moonbit
- moondoc
- justfile
- lefthook
- linewise
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.8.0
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}
6 changes: 3 additions & 3 deletions nu/moonbit.nu
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# [√] This script should run both in Github Runners and local machines
# [√] Setup moonbit toolchains of specified version
# [√] Setup Moonbit Core support
# [√] Setup monnbit core of `bleeding` version support
# [√] Setup moonbit core of `bleeding` version support
# Description: Scripts for setting up MoonBit environment
# Usage:
# setup moonbit
Expand All @@ -28,7 +28,7 @@ export-env {
$env.config.color_config.leading_trailing_space_bg = { attr: n }
}

# Download binary file from CLI_HOST with aira2c or `http get`
# Download binary file from CLI_HOST with aria2c or `http get`
def fetch-release [ version: string, archive: string ] {
let version = $version | str replace + %2B
print $'Fetch binaries from (ansi g)($CLI_HOST)/binaries/($version)/($archive)(ansi reset)'
Expand All @@ -39,7 +39,7 @@ def fetch-release [ version: string, archive: string ] {
}
}

# Download moonbit core from CLI_HOST with aira2c or `http get`
# Download moonbit core from CLI_HOST with aria2c or `http get`
def fetch-core [ version: string ] {
let version = $version | str replace + %2B
let suffix = if (windows?) { $'($version).zip' } else { $'($version).tar.gz' }
Expand Down
2 changes: 1 addition & 1 deletion nu/release.nu
Original file line number Diff line number Diff line change
Expand Up @@ -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 93d0da1

Please sign in to comment.