Skip to content

Commit

Permalink
Share same paths with module
Browse files Browse the repository at this point in the history
  • Loading branch information
kachick committed Aug 2, 2023
1 parent c332112 commit 9c15988
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
7 changes: 3 additions & 4 deletions 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,10 +38,7 @@ func main() {
{"dprint", []string{"fmt"}},
{"shfmt", append([]string{"--language-dialect", "bash", "--write"}, bashPaths...)},
{"nixpkgs-fmt", nixPaths},
{"typos", []string{
".",
".github", ".vscode", "home/.config", "home/.local", "home/.stack",
"--write-changes"}},
{"typos", append(dotfiles.GetTyposTargetedRoots(), "--write-changes")},
{"go", []string{"fmt", "./..."}},
}

Expand Down
6 changes: 3 additions & 3 deletions 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,9 +38,7 @@ func main() {
{"shfmt", append([]string{"--language-dialect", "bash", "--diff"}, bashPaths...)},
{"shellcheck", bashPaths},
{"nixpkgs-fmt", append([]string{"--check"}, nixPaths...)},
{"typos", []string{
".",
".github", ".vscode", "home/.config", "home/.local", "home/.stack"}},
{"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 9c15988

Please sign in to comment.