File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -141,6 +141,12 @@ codequality: licensecheck
141
141
fi
142
142
@golangci-lint run --max-issues-per-linter 0 --max-same-issues 0 || exit 1
143
143
144
+ @echo -n " KEEP-SORTED "
145
+ @which keep-sorted > /dev/null; if [ $$? -ne 0 ]; then \
146
+ $(GO) install github.com/keep-sorted/keep-sorted@latest; \
147
+ fi
148
+ @keep-sorted --mode lint $(GOFILES_NOVENDOR) || exit 1
149
+
144
150
@printf '%s\n' '$(OK)'
145
151
146
152
licensecheck :
156
162
@$(GO ) generate ./...
157
163
158
164
fmt :
165
+ @keep-sorted --mode fix $(GOFILES_NOVENDOR )
159
166
@gofumpt -w $(GOFILES_NOVENDOR )
160
167
@$(GO ) mod tidy
161
168
Original file line number Diff line number Diff line change @@ -16,34 +16,38 @@ import (
16
16
// but originate from elsewhere. They should be well known and properly
17
17
// documented already.
18
18
var ignoredEnvs = set .Map ([]string {
19
+ // keep-sorted start
19
20
"APPDATA" ,
20
21
"GIT_AUTHOR_EMAIL" ,
21
22
"GIT_AUTHOR_NAME" ,
22
23
"GNUPGHOME" ,
23
- "GOPATH" ,
24
24
"GOPASS_CONFIG_NOSYSTEM" , // name assembled, tests can't catch it
25
25
"GOPASS_DEBUG_FILES" , // indirect usage
26
26
"GOPASS_DEBUG_FUNCS" , // indirect usage
27
27
"GOPASS_GPG_OPTS" , // indirect usage
28
28
"GOPASS_UMASK" , // indirect usage
29
- "PASSWORD_STORE_UMASK" , // indirect usage
29
+ "GOPATH" ,
30
30
"GPG_TTY" ,
31
31
"HOME" ,
32
32
"LOCALAPPDATA" ,
33
+ "PASSWORD_STORE_UMASK" , // indirect usage
33
34
"XDG_CACHE_HOME" ,
34
35
"XDG_CONFIG_HOME" ,
35
36
"XDG_DATA_HOME" ,
37
+ // keep-sorted end
36
38
})
37
39
38
40
// ignoredOptions is a list of config options that are used by gopass
39
41
// but may not be covered easily by a regexp.
40
42
var ignoredOptions = set .Map ([]string {
43
+ // keep-sorted start
41
44
"core.post-hook" ,
42
45
"core.pre-hook" ,
43
46
"include.path" ,
44
47
"recipients.hash" ,
45
48
"user.email" ,
46
49
"user.name" ,
50
+ // keep-sorted end
47
51
})
48
52
49
53
func TestConfigOptsInDocs (t * testing.T ) {
You can’t perform that action at this time.
0 commit comments