1
1
forked from extern/flakelight
flakelight/builtin-modules/editorconfig.nix
2023-04-16 16:31:17 -07:00

14 lines
409 B
Nix

{ src, lib }:
let
inherit (lib) getExe optionalAttrs optionalString pathExists;
in
{
checks = optionalAttrs (pathExists (src + /.editorconfig)) {
# By default, high false-positive flags are disabled.
editorconfig = { editorconfig-checker }:
"${getExe editorconfig-checker}"
+ optionalString (!pathExists (src + /.ecrc))
" -disable-indent-size -disable-max-line-length";
};
}