Skip to content

Commit 8452d2e

Browse files
Merge pull request #79 from cert-manager/self-upgrade-main
[CI] Merge self-upgrade-main into main
2 parents 16e1e56 + b0d9219 commit 8452d2e

File tree

4 files changed

+15
-14
lines changed

4 files changed

+15
-14
lines changed

.golangci.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,10 @@ formatters:
7373
sections:
7474
- standard # Standard section: captures all standard packages.
7575
- default # Default section: contains all imports that could not be matched to another section type.
76-
- prefix(github.com/cert-manager/image-tool) # Custom section: groups all imports with the specified Prefix.
76+
- localmodule # Local module section: contains all local packages. This section is not present unless explicitly enabled.
7777
- blank # Blank section: contains all blank imports. This section is not present unless explicitly enabled.
7878
- dot # Dot section: contains all dot imports. This section is not present unless explicitly enabled.
79+
custom-order: true
7980
exclusions:
8081
generated: lax
8182
paths: [third_party, builtin$, examples$]

klone.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,45 +10,45 @@ targets:
1010
- folder_name: boilerplate
1111
repo_url: https://github.com/cert-manager/makefile-modules.git
1212
repo_ref: main
13-
repo_hash: a0b43109b7ada33a472a12af4332a6148464b1ab
13+
repo_hash: 2121d6bf1ec6440011bc03021015af1c18ec0eba
1414
repo_path: modules/boilerplate
1515
- folder_name: cert-manager
1616
repo_url: https://github.com/cert-manager/makefile-modules.git
1717
repo_ref: main
18-
repo_hash: a0b43109b7ada33a472a12af4332a6148464b1ab
18+
repo_hash: 2121d6bf1ec6440011bc03021015af1c18ec0eba
1919
repo_path: modules/cert-manager
2020
- folder_name: executable
2121
repo_url: https://github.com/cert-manager/makefile-modules.git
2222
repo_ref: main
23-
repo_hash: a0b43109b7ada33a472a12af4332a6148464b1ab
23+
repo_hash: 2121d6bf1ec6440011bc03021015af1c18ec0eba
2424
repo_path: modules/executable
2525
- folder_name: generate-verify
2626
repo_url: https://github.com/cert-manager/makefile-modules.git
2727
repo_ref: main
28-
repo_hash: a0b43109b7ada33a472a12af4332a6148464b1ab
28+
repo_hash: 2121d6bf1ec6440011bc03021015af1c18ec0eba
2929
repo_path: modules/generate-verify
3030
- folder_name: go
3131
repo_url: https://github.com/cert-manager/makefile-modules.git
3232
repo_ref: main
33-
repo_hash: a0b43109b7ada33a472a12af4332a6148464b1ab
33+
repo_hash: 2121d6bf1ec6440011bc03021015af1c18ec0eba
3434
repo_path: modules/go
3535
- folder_name: help
3636
repo_url: https://github.com/cert-manager/makefile-modules.git
3737
repo_ref: main
38-
repo_hash: a0b43109b7ada33a472a12af4332a6148464b1ab
38+
repo_hash: 2121d6bf1ec6440011bc03021015af1c18ec0eba
3939
repo_path: modules/help
4040
- folder_name: klone
4141
repo_url: https://github.com/cert-manager/makefile-modules.git
4242
repo_ref: main
43-
repo_hash: a0b43109b7ada33a472a12af4332a6148464b1ab
43+
repo_hash: 2121d6bf1ec6440011bc03021015af1c18ec0eba
4444
repo_path: modules/klone
4545
- folder_name: repository-base
4646
repo_url: https://github.com/cert-manager/makefile-modules.git
4747
repo_ref: main
48-
repo_hash: a0b43109b7ada33a472a12af4332a6148464b1ab
48+
repo_hash: 2121d6bf1ec6440011bc03021015af1c18ec0eba
4949
repo_path: modules/repository-base
5050
- folder_name: tools
5151
repo_url: https://github.com/cert-manager/makefile-modules.git
5252
repo_ref: main
53-
repo_hash: a0b43109b7ada33a472a12af4332a6148464b1ab
53+
repo_hash: 2121d6bf1ec6440011bc03021015af1c18ec0eba
5454
repo_path: modules/tools

make/_shared/go/.golangci.override.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,11 @@ formatters:
7070
enable: [ gci, gofmt ]
7171
settings:
7272
gci:
73+
custom-order: true
7374
sections:
7475
- standard # Standard section: captures all standard packages.
7576
- default # Default section: contains all imports that could not be matched to another section type.
76-
- prefix({{REPO-NAME}}) # Custom section: groups all imports with the specified Prefix.
77+
- localmodule # Local module section: contains all local packages. This section is not present unless explicitly enabled.
7778
- blank # Blank section: contains all blank imports. This section is not present unless explicitly enabled.
7879
- dot # Dot section: contains all dot imports. This section is not present unless explicitly enabled.
7980
exclusions:

make/_shared/go/01_mod.mk

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ generate-golangci-lint-config: | $(NEEDS_GOLANGCI-LINT) $(NEEDS_YQ) $(bin_dir)/s
117117
cp $(golangci_lint_config) $(bin_dir)/scratch/golangci-lint.yaml.tmp
118118
$(YQ) -i 'del(.linters.enable)' $(bin_dir)/scratch/golangci-lint.yaml.tmp
119119
$(YQ) eval-all -i '. as $$item ireduce ({}; . * $$item)' $(bin_dir)/scratch/golangci-lint.yaml.tmp $(golangci_lint_override)
120-
$(YQ) -i '(.. | select(tag == "!!str")) |= sub("{{REPO-NAME}}", "$(repo_name)")' $(bin_dir)/scratch/golangci-lint.yaml.tmp
121120
mv $(bin_dir)/scratch/golangci-lint.yaml.tmp $(golangci_lint_config)
122121

123122
shared_generate_targets += generate-golangci-lint-config
@@ -147,9 +146,9 @@ fix-golangci-lint: | $(NEEDS_GOLANGCI-LINT) $(NEEDS_YQ) $(NEEDS_GCI) $(bin_dir)/
147146
@find . -name go.mod -not \( -path "./$(bin_dir)/*" -or -path "./make/_shared/*" \) \
148147
| while read d; do \
149148
target=$$(dirname $${d}); \
150-
echo "Running 'GOVERSION=$(VENDORED_GO_VERSION) $(bin_dir)/tools/golangci-lint fmt -c $(CURDIR)/$(golangci_lint_config)' in directory '$${target}'"; \
149+
echo "Running 'GOVERSION=$(VENDORED_GO_VERSION) $(bin_dir)/tools/golangci-lint run --fix -c $(CURDIR)/$(golangci_lint_config) --timeout $(golangci_lint_timeout)' in directory '$${target}'"; \
151150
pushd "$${target}" >/dev/null; \
152-
GOVERSION=$(VENDORED_GO_VERSION) $(GOLANGCI-LINT) fmt -c $(CURDIR)/$(golangci_lint_config) || exit; \
151+
GOVERSION=$(VENDORED_GO_VERSION) $(GOLANGCI-LINT) run --fix -c $(CURDIR)/$(golangci_lint_config) --timeout $(golangci_lint_timeout) || exit; \
153152
popd >/dev/null; \
154153
echo ""; \
155154
done

0 commit comments

Comments
 (0)