diff --git a/.config/home-manager/home.nix b/.config/home-manager/home.nix index 0d2fcc8f..6d956bb4 100644 --- a/.config/home-manager/home.nix +++ b/.config/home-manager/home.nix @@ -72,6 +72,7 @@ pkgs.zellij pkgs.nixpkgs-fmt pkgs.nil + pkgs.typos pkgs.cargo-make pkgs.hyperfine pkgs.zoxide diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 22b0fc91..9a810714 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -6,3 +6,5 @@ updates: interval: 'daily' time: '08:00' timezone: 'Asia/Tokyo' + ignore: + - dependency-name: 'crate-ci/typos' diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index ff153a99..3a452d84 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -14,6 +14,7 @@ jobs: - uses: dprint/check@v2.2 with: dprint-version: '0.36.1' + shellscript: runs-on: ubuntu-latest timeout-minutes: 5 @@ -37,3 +38,11 @@ jobs: shopt -s globstar shellcheck ./**/*.bash shfmt --diff ./**/*.bash + + typos: + timeout-minutes: 15 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + # Keep same version as *.nix + - uses: crate-ci/typos@v1.15.0 diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 512fca6e..52660e52 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -2,7 +2,7 @@ "recommendations": [ "editorconfig.editorconfig", "dprint.dprint", - "streetsidesoftware.code-spell-checker", + "tekumara.typos-vscode", "github.vscode-github-actions", "timonwong.shellcheck", "foxundermoon.shell-format", diff --git a/.vscode/settings.json b/.vscode/settings.json index 7146c606..0c913feb 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,17 +1,6 @@ { "editor.defaultFormatter": "dprint.dprint", "editor.formatOnSave": true, - "cSpell.words": [ - "deno", - "dprint", - "Eugeny", - "gnachman", - "mvdan", - "shfmt", - "shopt", - "sorin-ionescu", - "nixpkgs" - ], "[shellscript]": { "editor.defaultFormatter": "foxundermoon.shell-format" }, diff --git a/Makefile.toml b/Makefile.toml index fae896c9..7baf1318 100644 --- a/Makefile.toml +++ b/Makefile.toml @@ -28,6 +28,13 @@ script = [ "dprint fmt", ] +[tasks.typos-check] +category = "Tools" +description = "Run formatters without changes" +script = [ + "typos", +] + [tasks.prevent-secret] category = "Tools" script = [ @@ -37,7 +44,7 @@ script = [ [tasks.check] category = "Tools" description = 'Parallel runner for all tests and linters' -run_task = { name = ["format-check", "prevent-secret"] } +run_task = { name = ["typos-check", "format-check", "prevent-secret"] } [tasks.versions] category = "Tools" @@ -47,10 +54,11 @@ script = [ "dprint --version", "shellcheck --version", "shfmt --version", - # Returnes NON 0, why...? :< + # Returns NON 0, why...? :< # "nixpkgs-fmt --version", "gitleaks version", "fd --version", + "typos --version", ] [tasks.help] diff --git a/default.nix b/default.nix index 8caad43c..f58e2754 100644 --- a/default.nix +++ b/default.nix @@ -15,5 +15,6 @@ pkgs.mkShell { pkgs.cargo-make pkgs.coreutils pkgs.fd + pkgs.typos ]; }