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 301301 } ;
302302 } ;
303303 } ;
304+ convco = mkOption {
305+ description = "convco hook" ;
306+ type = types . submodule {
307+ imports = [ hookModule ] ;
308+ options . settings = {
309+ configPath =
310+ mkOption {
311+ type = types . nullOr ( types . oneOf [ types . str types . path ] ) ;
312+ description = "Path to the configuration file (YAML or JSON)" ;
313+ default = null ;
314+ } ;
315+ } ;
316+ } ;
317+ } ;
304318 credo = mkOption {
305319 description = "credo hook" ;
306320 type = types . submodule {
@@ -2542,9 +2556,13 @@ in
25422556 package = tools . convco ;
25432557 entry =
25442558 let
2559+ cmdArgs =
2560+ mkCmdArgs ( with hooks . convco . settings ; [
2561+ [ ( configPath != null ) "--config ${ configPath } " ]
2562+ ] ) ;
25452563 convco = hooks . convco . package ;
25462564 script = pkgs . writeShellScript "precommit-convco" ''
2547- cat $1 | ${ convco } /bin/convco check --from-stdin
2565+ cat $1 | ${ convco } /bin/convco check --from-stdin ${ cmdArgs }
25482566 '' ;
25492567 # need version >= 0.4.0 for the --from-stdin flag
25502568 toolVersionCheck = lib . versionAtLeast convco . version "0.4.0" ;
You can’t perform that action at this time.
0 commit comments