File tree Expand file tree Collapse file tree 4 files changed +25
-4
lines changed Expand file tree Collapse file tree 4 files changed +25
-4
lines changed Original file line number Diff line number Diff line change @@ -202,6 +202,7 @@ use nix
202
202
- [ tagref] ( https://github.com/stepchowfun/tagref )
203
203
- [ treefmt] ( https://github.com/numtide/treefmt )
204
204
- [ topiary] ( https://github.com/tweag/topiary )
205
+ - [ checkmake] ( https://github.com/mrtazz/checkmake )
205
206
206
207
You must configure which languages should be formatted by ` clang_format ` using
207
208
` clang-format.types_or ` . For example to check both C and C++ files:
Original file line number Diff line number Diff line change @@ -1167,5 +1167,18 @@ in
1167
1167
pass_filenames = true ;
1168
1168
entry = "${ settings . treefmt . package } /bin/treefmt --fail-on-change" ;
1169
1169
} ;
1170
+
1171
+ checkmake = {
1172
+ name = "checkmake" ;
1173
+ description = "Experimental linter/analyzer for Makefiles." ;
1174
+ types = [ "makefile" ] ;
1175
+ entry =
1176
+ ## NOTE: `checkmake` 0.2.2 landed in nixpkgs on 12 April 2023. Once
1177
+ ## this gets into a NixOS release, the following code will be useless.
1178
+ lib . throwIf
1179
+ ( tools . checkmake == null )
1180
+ "The version of nixpkgs used by pre-commit-hooks.nix must have `checkmake` in version at least 0.2.2 for it to work on non-Linux systems."
1181
+ "${ tools . checkmake } /bin/checkmake" ;
1182
+ } ;
1170
1183
} ;
1171
1184
}
Original file line number Diff line number Diff line change 1
- { actionlint
1
+ { stdenv
2
+
3
+ , actionlint
2
4
, alejandra
3
5
, ansible-lint
4
6
, cabal-fmt
5
7
, cabal2nix
6
8
, callPackage
7
9
, cargo
10
+ , checkmake
8
11
, clang-tools
9
12
, clippy
10
13
, commitizen
81
84
chktex = tex ;
82
85
commitizen = commitizen . overrideAttrs ( _ : _ : { doCheck = false ; } ) ;
83
86
bats = if bats ? withLibraries then ( bats . withLibraries ( p : [ p . bats-support p . bats-assert p . bats-file ] ) ) else bats ;
87
+
88
+ ## NOTE: `checkmake` 0.2.2 landed in nixpkgs on 12 April 2023. Once this gets
89
+ ## into a NixOS release, the following code will be useless.
90
+ checkmake = if stdenv . isLinux || checkmake . version >= "0.2.2" then checkmake else null ;
84
91
}
You can’t perform that action at this time.
0 commit comments