Skip to content

Commit b266625

Browse files
committed
feat: enable additional linters/formatters
1 parent b159c0c commit b266625

File tree

2 files changed

+40
-1
lines changed

2 files changed

+40
-1
lines changed

.editorconfig

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Editor configuration, see http://editorconfig.org
2+
root = true
3+
4+
[*]
5+
end_of_line = lf
6+
insert_final_newline = true
7+
trim_trailing_whitespace = true
8+
charset = utf-8
9+
indent_style = space
10+
indent_size = 2
11+
12+
[*.md]
13+
max_line_length = off
14+
trim_trailing_whitespace = false
15+
indent_size = unset
16+
17+
[*.py]
18+
indent_size = 4
19+
20+
[*.sh]
21+
indent_style = space
22+
indent_size = 4
23+
binary_next_line = true
24+
switch_case_indent = true
25+
space_redirects = false
26+
keep_padding = true

flake.nix

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,20 @@
6363
treefmt = {config, ...}: {
6464
flakeFormatter = true;
6565
projectRootFile = "flake.nix";
66-
programs.alejandra.enable = true;
66+
67+
programs = {
68+
alejandra.enable = true;
69+
gofumpt.enable = true;
70+
ruff.enable = true;
71+
shellcheck.enable = true;
72+
shfmt.enable = true;
73+
};
74+
75+
settings.formatter = lib.mkIf config.programs.shfmt.enable {
76+
# Empty out the CLI options list so that `shfmt` uses the settings
77+
# from `.editorconfig`.
78+
shfmt.options = lib.mkForce [];
79+
};
6780
};
6881
};
6982
});

0 commit comments

Comments
 (0)