You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enable typos.configPath to be of type path. This way, we can
use excludes from .typos.toml when running
`pre-commit run typos --all-files`. Otherwise, the execution
differs from a normal invocation of typos, which is unexpected
and leads to wrong results.
To not break anything, and to be compliant with the existing
API, I modified configPath to be either a Nix path or a string.
[0]: #387 (comment)
Copy file name to clipboardExpand all lines: modules/hooks.nix
+51-6
Original file line number
Diff line number
Diff line change
@@ -1430,7 +1430,7 @@ in
1430
1430
configuration=
1431
1431
mkOption{
1432
1432
type=types.str;
1433
-
description=lib.mdDoc"Multiline-string configuration passed as config file. If set, config set in `typos.settings.configPath` gets ignored.";
1433
+
description=lib.mdDoc"Multiline-string configuration passed as config file. It is recommended to use `configPath` instead for a more natural experience of typos.";
1434
1434
default="";
1435
1435
example=''
1436
1436
[files]
@@ -1444,11 +1444,14 @@ in
1444
1444
'';
1445
1445
};
1446
1446
1447
+
# It is recommended to use a Nix path here as this way, the excludes
1448
+
# from the config file can be taken into account by pre-commit when
1449
+
# running `$ pre-commit run --all-files`.
1447
1450
configPath=
1448
1451
mkOption{
1449
-
type=types.str;
1450
-
description=lib.mdDoc"Path to a custom config file.";
0 commit comments