File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed
Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change 290290 } ;
291291 } ;
292292 } ;
293+ convco = mkOption {
294+ description = "convco hook" ;
295+ type = types . submodule {
296+ imports = [ hookModule ] ;
297+ options . settings = {
298+ configPath =
299+ mkOption {
300+ type = types . nullOr ( types . oneOf [ types . str types . path ] ) ;
301+ description = "Path to the configuration file (YAML or JSON)" ;
302+ default = null ;
303+ } ;
304+ } ;
305+ } ;
306+ } ;
293307 credo = mkOption {
294308 description = "credo hook" ;
295309 type = types . submodule {
@@ -2462,9 +2476,13 @@ in
24622476 package = tools . convco ;
24632477 entry =
24642478 let
2479+ cmdArgs =
2480+ mkCmdArgs ( with hooks . convco . settings ; [
2481+ [ ( configPath != null ) "--config ${ configPath } " ]
2482+ ] ) ;
24652483 convco = hooks . convco . package ;
24662484 script = pkgs . writeShellScript "precommit-convco" ''
2467- cat $1 | ${ convco } /bin/convco check --from-stdin
2485+ cat $1 | ${ convco } /bin/convco check --from-stdin ${ cmdArgs }
24682486 '' ;
24692487 # need version >= 0.4.0 for the --from-stdin flag
24702488 toolVersionCheck = lib . versionAtLeast convco . version "0.4.0" ;
You can’t perform that action at this time.
0 commit comments