Skip to content

chore: trim tooling to what a small library needs - #230

Merged
obalunenko merged 5 commits into
masterfrom
chore/trim-tooling
Nov 15, 2026
Merged

obalunenko merged 5 commits into
masterfrom
chore/trim-tooling

Conversation

@obalunenko

Copy link
Copy Markdown
Owner

Description

Follow-up to a review of the repository. The tooling outweighed the library: two lint configs, three coverage reporters, five tool modules and about twenty scripts, against about 480 lines of Go. Some of it was broken. Five commits:

  1. fix(make): mark the targets phony and let the full lint fail.
    • .PHONY listed the targets with commas, so it declared vet, and the like. Checked: after touch vet, make vet was a no-op.
    • VERSION referenced $(git …) as a make variable, which expands to nothing, and nothing used it. APP_NAME was only echoed.
    • .golangci.yml had issues-exit-code: 0, so make lint-full passed with any findings.
  2. ci: lint with one config. CI gated on the 5-linter .golangci.pipe.yml, while the 25-linter .golangci.yml only fed Sonar. The code passes the full config with 0 issues, so CI now gates on it. The errcheck settings and the revive defer rule move over from the pipe config; I checked that the exported and defer rules still fire.
  3. chore: remove dead scripts and config:
    • go_lint, golangci_ci_execute and browser-opener.sh;
    • GO111MODULE=on;
    • lint exclusions for paths that do not exist and gci settings, though gci is off;
    • the goreleaser checksum section, though builds are skipped;
    • test-regression and the undefined colored call in help.
  4. ci: drop SonarCloud and the coverage badge. Codecov already covers coverage, and golangci-lint covers the lint gate. Also removes what only Sonar read: the checkstyle report, the go test JSON report and the second lint run in the reports job.
  5. chore: drop gotestsum and gocov tools. go test and go tool cover -html do the same job. These tool modules needed a newer Go than oldstable, which is why CI could not use make test; now it does.

What stays: the go vet and test matrix (stable and oldstable), golangci-lint, Codecov, CodeQL, goreleaser release notes, dependabot, and the goimports and golangci-lint tool modules.

Github Issue

—

Possible failures/side-effects

  • The lint job is stricter now: 25 linters instead of 5. It passes on master today with 0 issues, but new code has to meet the full config.
  • Sonar. The SonarCloud project and the SONAR_TOKEN secret are no longer used; delete them in SonarCloud and in the repo settings if you no longer need them.
  • Local runs:
    • checked make help, make test with GOTOOLCHAIN=local, make prepare-cover-report, make lint-full, make check-releaser and make install-tools;
    • checked YAML syntax of the workflow, dependabot, golangci and goreleaser configs, plus golangci-lint config verify;
    • the workflow itself is checked only by this PR's CI run.

Other notes

Independent of #229. The only overlap is the README badges at the top, which #229 does not touch.

🤖 Generated with Claude Code

obalunenko and others added 5 commits November 16, 2026 00:50
- .PHONY listed the targets with commas, so it declared "vet," and the
  like: a file named vet made `make vet` a no-op.
- Drop VERSION, APP_NAME and BIN_DIR. VERSION referenced $(git ...) as a
  make variable, which expands to nothing; no script used VERSION, and
  APP_NAME was only echoed.
- .golangci.yml set issues-exit-code: 0, so `make lint-full` passed with
  any findings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CI gated on .golangci.pipe.yml with 5 linters, while .golangci.yml with
25 linters only fed Sonar and never failed. The code passes the full
config, so gate on it and drop the pipe config. Its errcheck settings and
the revive defer rule move into .golangci.yml.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- go_lint (golint is deprecated) and golangci_ci_execute, which nothing
  called, and the unused browser-opener.sh.
- GO111MODULE=on, the default since Go 1.16.
- Lint exclusions for paths the repo does not have (*.pb.go, vendor/,
  third_party, builtin, examples) and settings of gci, which is off.
- The goreleaser checksum section: builds are skipped, so there is
  nothing to sum.
- test-regression, an alias of test, and the call of the undefined
  colored function in help.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov already reports coverage on PRs and has a badge, and the lint job
gates on golangci-lint, so Sonar duplicated both. The coverbadger badge
was a third coverage number, and coverbadger is not even pinned in tools/.

This also drops what only Sonar read: the checkstyle report, the go test
JSON report and the second lint run in the reports job.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The go command covers what they did: go test runs the tests and go tool
cover renders the HTML report. The tool modules needed a newer Go than
the oldstable the library supports, which is why CI could not run
make test; now it does. Dependabot no longer bumps them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Nov 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (8a2e8ae) to head (cf71872).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #230   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            3         3           
  Lines           99        99           
=========================================
  Hits            99        99           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@obalunenko
obalunenko merged commit 8fe5733 into master Nov 15, 2026
10 checks passed
@obalunenko
obalunenko deleted the chore/trim-tooling branch November 15, 2026 20:56
obalunenko added a commit that referenced this pull request Nov 15, 2026
#230 dropped the scan, and Sonar has not analyzed anything since. Restore
it in the reports job with its inputs: the coverage profile, the go test
JSON report and the golangci-lint checkstyle report.

The checkstyle report is now requested with a flag in that one step, not
in .golangci.yml, so local lint runs no longer leave linters-report.xml
behind. sonar-project.properties drops the stale projectVersion and the
vendor/ exclusions, as vendor/ is gone.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant