File tree Expand file tree Collapse file tree 3 files changed +33
-1
lines changed Expand file tree Collapse file tree 3 files changed +33
-1
lines changed Original file line number Diff line number Diff line change @@ -149,6 +149,7 @@ use nix
149
149
## Spell checkers
150
150
151
151
- [ hunspell] ( https://github.com/hunspell/hunspell )
152
+ - [ typos] ( https://github.com/crate-ci/typos )
152
153
153
154
## Other Formatters
154
155
Original file line number Diff line number Diff line change 154
154
default = "\\ .js$" ;
155
155
} ;
156
156
} ;
157
+ typos =
158
+ {
159
+ write =
160
+ mkOption {
161
+ type = types . bool ;
162
+ description = lib . mdDoc "Whether to write fixes out." ;
163
+ default = false ;
164
+ } ;
165
+
166
+ diff =
167
+ mkOption {
168
+ type = types . bool ;
169
+ description = lib . mdDoc "Wheter to print a diff of what would change." ;
170
+ default = false ;
171
+ } ;
172
+
173
+ format =
174
+ mkOption {
175
+ type = types . enum [ "silent" "brief" "long" "json" ] ;
176
+ description = lib . mdDoc "Output format." ;
177
+ default = "long" ;
178
+ } ;
179
+ } ;
157
180
158
181
revive =
159
182
{
529
552
entry = "${ tools . hunspell } /bin/hunspell -l" ;
530
553
files = "\\ .((txt)|(html)|(xml)|(md)|(rst)|(tex)|(odf)|\\ d)$" ;
531
554
} ;
555
+ typos =
556
+ {
557
+ name = "typos" ;
558
+ description = "Source code spell checker" ;
559
+ entry = with settings . typos ;
560
+ "${ tools . typos } /bin/typos --format ${ format } ${ lib . optionalString write "-w" } ${ lib . optionalString diff "--diff" } " ;
561
+ } ;
532
562
html-tidy =
533
563
{
534
564
name = "html-tidy" ;
Original file line number Diff line number Diff line change 36
36
, stylish-haskell
37
37
, stylua
38
38
, texlive
39
+ , typos
39
40
, writeScript
40
41
, writeText
41
42
, go
42
43
, revive ? null
43
44
} :
44
45
45
46
{
46
- inherit actionlint alejandra cabal-fmt cabal2nix cargo clang-tools clippy deadnix dhall hadolint hindent hlint hpack html-tidy nix-linter nixfmt nixpkgs-fmt ormolu rustfmt shellcheck shfmt statix stylish-haskell stylua go mdsh revive ;
47
+ inherit actionlint alejandra cabal-fmt cabal2nix cargo clang-tools clippy deadnix dhall hadolint hindent hlint hpack html-tidy nix-linter nixfmt nixpkgs-fmt ormolu rustfmt shellcheck shfmt statix stylish-haskell stylua typos go mdsh revive ;
47
48
inherit ( elmPackages ) elm-format elm-review elm-test ;
48
49
# TODO: these two should be statically compiled
49
50
inherit ( haskellPackages ) brittany fourmolu ;
You can’t perform that action at this time.
0 commit comments