Skip to content

Commit

Permalink
Merge pull request #245 from kachick/improve-typos-integration
Browse files Browse the repository at this point in the history
Improve typos integration
  • Loading branch information
kachick authored Aug 2, 2023
2 parents 4ffdf34 + 9c15988 commit 641d346
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 4 deletions.
2 changes: 0 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ updates:
directory: '/'
schedule:
interval: 'daily'
time: '08:00'
timezone: 'Asia/Tokyo'
ignore:
- dependency-name: 'crate-ci/typos'
- package-ecosystem: 'gomod'
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,12 @@ jobs:
- uses: actions/checkout@v3
# Keep same version as used in *.nix
- uses: crate-ci/[email protected]
with:
# https://github.com/crate-ci/typos/issues/779#issuecomment-1635761199
files: |
.
.github
.vscode
home/.config
home/.local
home/.stack
4 changes: 3 additions & 1 deletion cmd/fmt/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import (
"sync"

doublestar "github.com/bmatcuk/doublestar/v4"

"github.com/kachick/dotfiles"
)

func main() {
Expand Down Expand Up @@ -36,7 +38,7 @@ func main() {
{"dprint", []string{"fmt"}},
{"shfmt", append([]string{"--language-dialect", "bash", "--write"}, bashPaths...)},
{"nixpkgs-fmt", nixPaths},
{"typos", []string{".", ".github", "home/.config", ".vscode", "--write-changes"}},
{"typos", append(dotfiles.GetTyposTargetedRoots(), "--write-changes")},
{"go", []string{"fmt", "./..."}},
}

Expand Down
4 changes: 3 additions & 1 deletion cmd/lint/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import (
"sync"

doublestar "github.com/bmatcuk/doublestar/v4"

"github.com/kachick/dotfiles"
)

func main() {
Expand Down Expand Up @@ -36,7 +38,7 @@ func main() {
{"shfmt", append([]string{"--language-dialect", "bash", "--diff"}, bashPaths...)},
{"shellcheck", bashPaths},
{"nixpkgs-fmt", append([]string{"--check"}, nixPaths...)},
{"typos", []string{".", ".github", "home/.config", ".vscode"}},
{"typos", dotfiles.GetTyposTargetedRoots()},
{"gitleaks", []string{"detect"}},
{"go", []string{"vet", "./..."}},
}
Expand Down
9 changes: 9 additions & 0 deletions linter.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package dotfiles

func GetTyposTargetedRoots() []string {
return []string{
".",
".github", ".vscode",
"home/.config", "home/.local", "home/.stack",
}
}

0 comments on commit 641d346

Please sign in to comment.