diff --git a/CHANGELOG.md b/CHANGELOG.md index cc62360..ef0d8ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.17.11] - 2026-01-08 + +### Changed + +- "Double-dip" running of `golangci-lint` in stavefile.go: run once with `--fix` & without reporting exit code, then run a second time without `--fix` & report exit code as well as any output. + +- Bumped `stave` to `v0.9.5`. + ## [0.17.10] - 2026-01-07 ### Changed @@ -472,7 +480,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [0.4.0] - 2025-10-30 -[unreleased]: https://github.com/preminger/goctx/compare/v0.17.10...HEAD +[unreleased]: https://github.com/preminger/goctx/compare/v0.17.11...HEAD +[0.17.11]: https://github.com/preminger/goctx/compare/v0.17.10...v0.17.11 [0.17.10]: https://github.com/preminger/goctx/compare/v0.17.9...v0.17.10 [0.17.9]: https://github.com/preminger/goctx/compare/v0.17.8...v0.17.9 [0.17.8]: https://github.com/preminger/goctx/compare/v0.17.7...v0.17.8 diff --git a/go.mod b/go.mod index c09f7cb..e597f5b 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/sebdah/goldie/v2 v2.8.0 github.com/spf13/cobra v1.10.2 github.com/stretchr/testify v1.11.1 - github.com/yaklabco/stave v0.9.4 + github.com/yaklabco/stave v0.9.5 golang.org/x/tools v0.40.0 ) diff --git a/go.sum b/go.sum index 4fa24a2..a4820b4 100644 --- a/go.sum +++ b/go.sum @@ -145,8 +145,8 @@ github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e h1:JVG44RsyaB9T2KIHavM github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e/go.mod h1:RbqR21r5mrJuqunuUZ/Dhy/avygyECGrLceyNeo4LiM= github.com/yaklabco/direnv/v2 v2.37.2-0.20260103155829-e362a6bcef30 h1:75OkK0/2gGInt4i9h2XRUN/7Phtu6Nq9oxuFCZKtvug= github.com/yaklabco/direnv/v2 v2.37.2-0.20260103155829-e362a6bcef30/go.mod h1:1ty/+Bkj+xVwSri8uDCsOzp15bC9MIzjyWvp6zuf+yY= -github.com/yaklabco/stave v0.9.4 h1:Kq1atetrg7Kk/aCFpwdc6ALfQGFXwHJR+r9p1cKV2DA= -github.com/yaklabco/stave v0.9.4/go.mod h1:GAPyyyPA4M/5qkPvfbB4R8ZJw6ftk05wqWVj5aUBoI8= +github.com/yaklabco/stave v0.9.5 h1:dJZFgHj76r+RqyBKJ04PCX2FvvJ9k9jb2fNuhi1UhHw= +github.com/yaklabco/stave v0.9.5/go.mod h1:GAPyyyPA4M/5qkPvfbB4R8ZJw6ftk05wqWVj5aUBoI8= go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= golang.org/x/exp v0.0.0-20251209150349-8475f28825e9 h1:MDfG8Cvcqlt9XXrmEiD4epKn7VJHZO84hejP9Jmp0MM= diff --git a/stavefile.go b/stavefile.go index 6e2919c..d102735 100644 --- a/stavefile.go +++ b/stavefile.go @@ -244,7 +244,12 @@ func (Lint) Markdown() error { // Go runs golangci-lint with auto-fix enabled func (Lint) Go() error { st.Deps(Init) - out, err := sh.Output("golangci-lint", "run", "--fix", "--allow-parallel-runners", "--build-tags='!ignore'") + + args := []string{"run", "--allow-parallel-runners", "--build-tags='!ignore'", "--fix"} + + _ = sh.Run("golangci-lint", args...) //nolint:errcheck // Intentional; re-run without `--fix` on next line. + + out, err := sh.Output("golangci-lint", lo.Slice(args, 0, len(args)-1)...) if err != nil { titleStyle, blockStyle := ui.GetBlockStyles() outputln(titleStyle.Render("golangci-lint output"))