-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Expand file tree
/
Copy pathdevenv.nix
More file actions
75 lines (71 loc) · 1.98 KB
/
Copy pathdevenv.nix
File metadata and controls
75 lines (71 loc) · 1.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
{ pkgs, lib, config, inputs, ... }:
{
dotenv.enable = true;
scripts = {
"asciidoc-linter".exec = "${pkgs.uv}/bin/uv tool run --from git+https://github.com/docToolchain/asciidoc-linter/@52e7fa5982d980eefd5b548f68ff6f58767fe772 asciidoc-linter $@";
};
git-hooks.hooks = {
actionlint.enable = true;
asciidoc-linter = {
enable = true;
name = "Asciidoc Linter";
entry = "asciidoc-linter --format plain";
files = "\\.adoc$";
#pass_filenames = true;
};
ameba = {
enable = true;
name = "Ameba";
entry = "${pkgs.ameba}/bin/ameba --fix";
files = "\\.cr$";
excludes = ["^lib/"];
pass_filenames = true;
};
check-toml.enable = true;
check-vcs-permalinks.enable = true;
circleci.enable = true;
crystal.enable = true;
makefile_both = {
enable = true;
name = "Change both Makefile and Makefile.win";
entry = ''${pkgs.runtimeShell} -c 'test "$#" -ne 1 || (echo "Changes only in $@" && false)' --'';
files = "^Makefile(\.win)?$";
pass_filenames = true;
};
mbake = {
enable = true;
name = "Mbake";
entry = "${pkgs.mbake}/bin/mbake format --config .mbake.toml";
files = "Makefile|.*\\.Makefile|Makefile\\..*|.*\\.mk";
pass_filenames = true;
};
rumdl.enable = true;
shellcheck = {
enable = true;
excludes = [
".*\.zsh$"
];
};
shfmt = {
enable = true;
settings = {
indent = 2;
case-indent = true;
simplify = false;
};
excludes = ["^lib/"];
};
typos.enable = true;
zizmor.enable = true;
};
profiles = {
lint.module = {
# More expensive hooks that we don't want to execute on every commit all the time
git-hooks.hooks = {
# reuse always runs on all files in the repo which takes some time.
# Violations are very rare, so a longer feedback loop doesn't matter much.
reuse.enable = true;
};
};
};
}