Skip to content

Commit 32dcd71

Browse files
authored
Merge pull request #205 from loicreynier/feat-add-editorconfig-checker
Add editorconfig-checker
2 parents 2597510 + 1879f0d commit 32dcd71

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ use nix
157157
- `dhall format`: built-in formatter
158158
- [clang-format](https://clang.llvm.org/docs/ClangFormat.html)
159159
- [hadolint](https://github.com/hadolint/hadolint)
160+
- [editorconfig-checker](https://github.com/editorconfig-checker/editorconfig-checker)
160161

161162
You must configure which languages should be formatted by `clang_format` using
162163
`clang-format.types_or`. For example to check both C and C++ files:

modules/hooks.nix

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ in
278278
# 2. Below which there are haskell files, or
279279
# 3. In which there is a package.yaml that references haskell files
280280
# that have been changed at arbitrary locations specified in that
281-
# file.
281+
# file.
282282
# In other words: We have no choice but to always run `hpack` on every `package.yaml` directory.
283283
pass_filenames = false;
284284
};
@@ -666,5 +666,13 @@ in
666666
};
667667
};
668668

669+
editorconfig-checker =
670+
{
671+
name = "editorconfig-checker";
672+
description = "Verify that the files are in harmony with the `.editorconfig`.";
673+
entry = "${tools.editorconfig-checker}/bin/editorconfig-checker";
674+
types = [ "file" ];
675+
};
676+
669677
};
670678
}

nix/tools.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
, clippy
1010
, deadnix
1111
, dhall
12+
, editorconfig-checker
1213
, elmPackages
1314
, git
1415
, gitAndTools
@@ -44,7 +45,7 @@
4445
}:
4546

4647
{
47-
inherit actionlint alejandra cabal-fmt cabal2nix cargo clang-tools clippy deadnix dhall hadolint hindent hlint hpack html-tidy nix-linter nixfmt nixpkgs-fmt ormolu rustfmt shellcheck shfmt statix stylish-haskell stylua typos go mdsh revive;
48+
inherit actionlint alejandra cabal-fmt cabal2nix cargo clang-tools clippy deadnix dhall editorconfig-checker hadolint hindent hlint hpack html-tidy nix-linter nixfmt nixpkgs-fmt ormolu rustfmt shellcheck shfmt statix stylish-haskell stylua typos go mdsh revive;
4849
inherit (elmPackages) elm-format elm-review elm-test;
4950
# TODO: these two should be statically compiled
5051
inherit (haskellPackages) brittany fourmolu;

0 commit comments

Comments
 (0)