make nim fmt more flexible

This commit is contained in:
Daylin Morgan 2024-02-20 04:46:05 -06:00
parent a484190180
commit 39c2821120
Signed by: daylin
GPG key ID: C1E52E7DD81DF79F

View file

@ -31,7 +31,7 @@ let
(_, pkgName) = root.splitPath()
srcFile = root / "src" / (pkgName & ".nim")
proc formatNimCode(pattern = r"^src/.*\.nim$") =
proc formatNimCode(pattern = r"^[src|tests].*\.nim(s)?$") =
let srcFiles = gorgeExCd(fmt"nimgrep --filenames -r '{pattern}' --noColor").output.split("\n")[0..^2]
for file in srcFiles:
# let cmd = "nph $1" % [file]
@ -84,4 +84,4 @@ task lexidInc, "bump lexigraphic id":
else:
echo "next version is: ", newVersion,"\n"
switch("path","$nim")