Skip to content

Commit 28229d0

Browse files
authored
Merge pull request #85 from hugoh/golangci-baseline-lint-excludes
fix(golangci): drop lint excludes now covered by template baseline
2 parents 191885a + 96b2521 commit 28229d0

8 files changed

Lines changed: 41 additions & 28 deletions

File tree

.copier-answers.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
2-
_commit: v1.16.9
2+
_commit: v1.19.0
33
_src_path: https://github.com/hugoh/go-tools.git
44
coverage_total: 100
55
golangci_extra_disable: []
@@ -11,7 +11,6 @@ golangci_settings: ''
1111
golangci_test_exclude_linters:
1212
- depguard
1313
- goconst
14-
- varnamelen
1514
has_executable: true
1615
has_fuzz: true
1716
has_gen: false

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ permissions: {}
1111

1212
jobs:
1313
hk:
14-
uses: hugoh/go-tools/.github/workflows/go-hk.yml@f9585764f4dcb3cb7bf8a81096573692db329e7e
14+
uses: hugoh/go-tools/.github/workflows/go-hk.yml@37285d93779492692decb112f28f287551effedd
1515
permissions:
1616
contents: read
1717

1818
goci:
19-
uses: hugoh/go-tools/.github/workflows/go-ci.yml@f9585764f4dcb3cb7bf8a81096573692db329e7e
19+
uses: hugoh/go-tools/.github/workflows/go-ci.yml@37285d93779492692decb112f28f287551effedd
2020
permissions:
2121
contents: read

.golangci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,20 @@ version: "2"
22
linters:
33
default: all
44
disable:
5+
- depguard
6+
- exhaustruct
7+
- exhaustruct_v5
58
- gomodguard
69
- noinlineerr
710
- paralleltest
11+
- testpackage
812
- wsl
913
exclusions:
1014
rules:
1115
- path: _test\.go$
1216
linters:
17+
- err113
18+
- varnamelen
1319
- depguard
1420
- goconst
1521
- varnamelen

.renovaterc.json

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,7 @@
11
{
22
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3-
"extends": ["github>hugoh/go-tools:go-renovaterc"],
4-
"packageRules": [
5-
{
6-
"description": "hk.pkl is Copier-managed (regenerated on every `copier update` from go-tools' template). Let Copier own its version instead of Renovate bumping it directly, to avoid the two racing to update the same file.",
7-
"matchManagers": ["custom.regex"],
8-
"matchFileNames": ["hk.pkl"],
9-
"enabled": false
10-
},
11-
{
12-
"description": "mise.toml [tools] versions are Copier-managed too (regenerated on every `copier update` from go-tools' template's mise.toml.jinja). Let Copier own tool versions instead of Renovate bumping them directly, to avoid the two racing to update the same file. Covers both the built-in mise manager and hk-config's custom.regex manager (which bumps the `hk = \"...\"` line in mise.toml alongside hk.pkl).",
13-
"matchManagers": ["mise", "custom.regex"],
14-
"matchFileNames": ["mise.toml"],
15-
"enabled": false
16-
}
3+
"extends": [
4+
"github>hugoh/go-tools:go-renovaterc",
5+
"github>hugoh/go-tools//presets/copier-owned-files"
176
]
187
}

cog.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@ tag_prefix = "v"
22
disable_changelog = true
33
disable_bump_commit = true
44
ignore_merge_commits = true
5+
6+
[commit_types.perf]
7+
bump_patch = true

hk.pkl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
amends "package://github.com/jdx/hk/releases/download/v1.53.0/hk@1.53.0#/Config.pkl"
2-
import "package://github.com/jdx/hk/releases/download/v1.53.0/hk@1.53.0#/Builtins.pkl"
3-
import "package://github.com/hugoh/hk-config/releases/download/v1.2.4/hk-config@1.2.4#/base.pkl" as Base
1+
amends "package://github.com/jdx/hk/releases/download/v1.56.0/hk@1.56.0#/Config.pkl"
2+
import "package://github.com/jdx/hk/releases/download/v1.56.0/hk@1.56.0#/Builtins.pkl"
3+
import "package://github.com/hugoh/hk-config/releases/download/v1.4.1/hk-config@1.4.1#/base.pkl" as Base
44

55
min_hk_version = Base.min_hk_version
66

mise-tasks/lint-release

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,20 @@
11
#!/usr/bin/env bash
22
#MISE description="Check release config if present"
33
#MISE sources=[".goreleaser.yml"]
4-
test ! -f .goreleaser.yml || goreleaser check
4+
set -uo pipefail
5+
6+
[ -f .goreleaser.yml ] || exit 0
7+
8+
out=$(goreleaser check 2>&1)
9+
ec=$?
10+
printf '%s\n' "$out"
11+
[ "$ec" -eq 0 ] && exit 0
12+
13+
# goreleaser check fails even on configs it calls "valid" if they use a
14+
# deprecated property (e.g. brews instead of homebrew_casks). Deprecation
15+
# is a lint concern, not a validity one, so don't hard-fail CI on it.
16+
if [ "$ec" -eq 2 ] && printf '%s\n' "$out" | grep -q 'configuration is valid, but uses deprecated properties'; then
17+
exit 0
18+
fi
19+
20+
exit "$ec"

mise.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
[tools]
2-
go = "1.26.5"
3-
"go:github.com/vladopajic/go-test-coverage/v2" = "2.18.8"
4-
golangci-lint = "2.12.2"
2+
go = "1.27.0"
3+
golangci-lint = "2.13.1"
4+
gotestsum = "1.13.0"
5+
"go:github.com/vladopajic/go-test-coverage/v2" = "2.19.0"
6+
"go:golang.org/x/tools/cmd/deadcode" = "0.49.0"
7+
"go:golang.org/x/vuln/cmd/govulncheck" = "1.7.0"
58
#
69
cocogitto = "7.0.0"
7-
gotestsum = "1.13.0"
810
hk = "1.52.0"
911
rumdl = "0.2.34"
1012
zizmor = "1.27.0"
@@ -21,8 +23,6 @@ shfmt = "3.13.1"
2123
tombi = "1.2.0"
2224
"github:owenlamont/ryl" = "0.21.0"
2325
"npm:cpd" = "5.0.10"
24-
"go:golang.org/x/tools/cmd/deadcode" = "0.48.0"
25-
"go:golang.org/x/vuln/cmd/govulncheck" = "1.6.0"
2626

2727
[env]
2828
COVEROUT = "cover.out"

0 commit comments

Comments
 (0)