Skip to content

Commit

Permalink
Update nix-pre-commit-hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
roberth committed Oct 8, 2019
1 parent 58f66d3 commit cecf124
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 14 deletions.
8 changes: 8 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
eval "$(lorri direnv)"

# Use system PKI
unset SSL_CERT_FILE
unset NIX_SSL_CERT_FILE

# Install pre-commit hooks
eval "$shellHook"
31 changes: 21 additions & 10 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
repos:
- repo: .pre-commit-hooks/
rev: master
hooks:
- id: ormolu
- id: shellcheck
#- id: hlint
- id: nixpkgs-fmt
exclude: (tests/agent-test/testdata)

# DO NOT MODIFY
# This file was generated by nix-pre-commit-hooks
{
"repos": [
{
"hooks": [
{
"id": "nixpkgs-fmt"
},
{
"id": "ormolu"
},
{
"id": "shellcheck"
}
],
"repo": ".pre-commit-hooks/",
"rev": "master"
}
]
}
11 changes: 10 additions & 1 deletion nix/packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,16 @@ recurseIntoAttrs {
inherit (internal) hercules-ci-api-swagger;
tests = if pkgs.stdenv.isLinux then internal.tests else null;
pre-commit-check =
(import sources.nix-pre-commit-hooks).run { src = gitignoreSource ../.; };
(import sources.nix-pre-commit-hooks).run {
src = ../.;
hooks = {
# TODO: hlint.enable = true;
ormolu.enable = true;
shellcheck.enable = true;
nixpkgs-fmt.enable = true;
nixpkgs-fmt.excludes = [ "tests/agent-test/testdata/" ];
};
};

# Not traversed for derivations:
inherit internal;
Expand Down
6 changes: 3 additions & 3 deletions nix/sources.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@
"homepage": "https://pre-commit.com/",
"owner": "hercules-ci",
"repo": "nix-pre-commit-hooks",
"rev": "e3661fe899c999fa6c77b5fcc3f4689657fb8f09",
"sha256": "09ns5s0b9918wlj9jximz49pjphsivysmfqcyn696wnjrq607b5q",
"rev": "1f5b70278150e17783c67ea8648d4295f29fb1b9",
"sha256": "1my4sz698iq7i0m68n3xz3vkynvq6crw17annj7hgngvhpq4ysrb",
"type": "tarball",
"url": "https://github.com/hercules-ci/nix-pre-commit-hooks/archive/e3661fe899c999fa6c77b5fcc3f4689657fb8f09.tar.gz",
"url": "https://github.com/hercules-ci/nix-pre-commit-hooks/archive/1f5b70278150e17783c67ea8648d4295f29fb1b9.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"nixos-19.03": {
Expand Down

0 comments on commit cecf124

Please sign in to comment.