Skip to content

Commit

Permalink
chore: add typos fixer
Browse files Browse the repository at this point in the history
  • Loading branch information
mrexox committed Nov 27, 2023
1 parent cd774d8 commit b83e1a1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .lefthook.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@ glob = "*.go"
[pre-commit.commands.lychee]
glob = "*.md"
run = "lychee {staged_files}"

[pre-commit.commands.typos]
run = "typos --write-changes {staged_files}"
stage_fixed = true
4 changes: 2 additions & 2 deletions internal/config/hook.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ var errPipedAndParallelSet = errors.New("conflicting options 'piped' and 'parall
type Hook struct {
// Should be unmarshalled with `mapstructure:"commands"`
// But replacing '{cmd}' is still an issue
// Unmarshaling it manually, so omit auto unmarshaling
// Unmarshalling it manually, so omit auto unmarshalling
Commands map[string]*Command `mapstructure:"-" yaml:",omitempty" json:"commands,omitempty" toml:"commands,omitempty"`

// Should be unmarshalled with `mapstructure:"scripts"`
// But parsing keys with dots in it is still an issue: https://github.com/spf13/viper/issues/324
// Unmarshaling it manually, so omit auto unmarshaling
// Unmarshalling it manually, so omit auto unmarshalling
Scripts map[string]*Script `mapstructure:"-" yaml:",omitempty" json:"scripts,omitempty" toml:"scripts,omitempty"`

Files string `mapstructure:"files" yaml:",omitempty" json:"files,omitempty" toml:"files,omitempty"`
Expand Down

0 comments on commit b83e1a1

Please sign in to comment.