File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 315315 default = "" ;
316316 example = ".cmake-format.json" ;
317317 } ;
318+ inPlace = mkOption {
319+ type = types . bool ;
320+ description = "Format files in place (`--in-place`) instead of only checking formatting (`--check`)." ;
321+ default = false ;
322+ } ;
318323 } ;
319324 } ;
320325 } ;
@@ -3016,8 +3021,10 @@ in
30163021 # Searches automatically for the config path.
30173022 then ""
30183023 else "-C ${ hooks . cmake-format . settings . configPath } " ;
3024+ modeFlag =
3025+ if hooks . cmake-format . settings . inPlace then "--in-place" else "--check" ;
30193026 in
3020- "${ hooks . cmake-format . package } /bin/cmake-format --check ${ maybeConfigPath } " ;
3027+ "${ hooks . cmake-format . package } /bin/cmake-format ${ modeFlag } ${ maybeConfigPath } " ;
30213028 files = "\\ .cmake$|CMakeLists.txt" ;
30223029 } ;
30233030 commitizen =
You can’t perform that action at this time.
0 commit comments