Skip to content

ci: pin golangci-lint to v2.15.0 and split Squeeze - #158

Merged
kolkov merged 1 commit into
mainfrom
fix/ci-lint-pin-squeeze
Nov 6, 2026
Merged

kolkov merged 1 commit into
mainfrom
fix/ci-lint-pin-squeeze

Conversation

@kolkov

@kolkov kolkov commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

The lint job installs golangci-lint latest. That now resolves to v2.15.0, which flags the cognitive complexity of tensor.Squeeze (24 > 20). As a result, lint fails on every PR, #157 included, without any change to the code.

  • Pin golangci-lint-action to version: v2.15.0, so a new linter release no longer changes CI by itself. Bumping it becomes a deliberate change.
  • Split Squeeze: the two shape computations move into squeezeAllOnes and squeezeAxes, and the behaviour stays the same. A new table test covers the raw Squeeze directly: all size-1 dims, negative and duplicate axes, the size check and the nil input. It passes on the old code too.

Locally, golangci-lint v2.15.0 reports 0 issues over all packages, and internal/tensor and internal/onnx/... tests pass.

The lint job installed golangci-lint 'latest', which resolved to v2.15.0 and
flagged the cognitive complexity of tensor.Squeeze (24 > 20), turning lint
red on every PR without a code change. The version is now pinned, so a new
linter release no longer changes CI on its own.

Squeeze keeps its behaviour; the two shape computations move into
squeezeAllOnes and squeezeAxes. A table test covers the raw Squeeze
directly (all ones, negative and duplicate axes, the size check).
@codecov

codecov Bot commented Nov 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@kolkov
kolkov merged commit 269e5a3 into main Nov 6, 2026
11 checks passed
@kolkov
kolkov deleted the fix/ci-lint-pin-squeeze branch November 6, 2026 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant