Skip to content

Add editorconfig-checker #205

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ use nix
- `dhall format`: built-in formatter
- [clang-format](https://clang.llvm.org/docs/ClangFormat.html)
- [hadolint](https://github.com/hadolint/hadolint)
- [editorconfig-checker](https://github.com/editorconfig-checker/editorconfig-checker)

You must configure which languages should be formatted by `clang_format` using
`clang-format.types_or`. For example to check both C and C++ files:
Expand Down
10 changes: 9 additions & 1 deletion modules/hooks.nix
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ in
# 2. Below which there are haskell files, or
# 3. In which there is a package.yaml that references haskell files
# that have been changed at arbitrary locations specified in that
# file.
# file.
# In other words: We have no choice but to always run `hpack` on every `package.yaml` directory.
pass_filenames = false;
};
Expand Down Expand Up @@ -666,5 +666,13 @@ in
};
};

editorconfig-checker =
{
name = "editorconfig-checker";
description = "Verify that the files are in harmony with the `.editorconfig`.";
entry = "${tools.editorconfig-checker}/bin/editorconfig-checker";
types = [ "file" ];
};

};
}
3 changes: 2 additions & 1 deletion nix/tools.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
, clippy
, deadnix
, dhall
, editorconfig-checker
, elmPackages
, git
, gitAndTools
Expand Down Expand Up @@ -44,7 +45,7 @@
}:

{
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;
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;
inherit (elmPackages) elm-format elm-review elm-test;
# TODO: these two should be statically compiled
inherit (haskellPackages) brittany fourmolu;
Expand Down