Skip to content

fix: resolve govet inline and modernize lint errors#524

Merged
k1LoW merged 1 commit into
mainfrom
fix-lint
May 22, 2026
Merged

fix: resolve govet inline and modernize lint errors#524
k1LoW merged 1 commit into
mainfrom
fix-lint

Conversation

@k1LoW
Copy link
Copy Markdown
Owner

@k1LoW k1LoW commented May 22, 2026

make lint was failing on two issues:

  • table.go:435 — govet inline flagged ptrInt64(0) because ptrInt64 in apply.go is annotated with //go:fix inline.
  • action.go:657 — modernize slicesbackward flagged the manual reverse index loop in generateDeleteActions.

Changes:

  • Inline the single ptrInt64(0) callsite in table.go to new(int64) and remove the now-unused helper from apply.go.
  • Rewrite the backward loop in generateDeleteActions using slices.Backward.

Verified with make lint (0 issues) and go test ./... (all packages pass).

The `ptrInt64` helper in apply.go was annotated with `//go:fix inline`,
so govet flagged its remaining callsite in table.go. Inline the call and
drop the now-unused helper. Also convert the backward index loop in
generateDeleteActions to `slices.Backward`, which modernize had flagged.
@github-actions
Copy link
Copy Markdown
Contributor

Code Metrics Report

main (38d7305) #524 (96e8372) +/-
Coverage 33.7% 33.7% -0.1%
Code to Test Ratio 1:0.9 1:0.9 +0.0
Test Execution Time 11s 13s +2s
Details
  |                     | main (38d7305) | #524 (96e8372) |  +/-  |
  |---------------------|----------------|----------------|-------|
- | Coverage            |          33.7% |          33.7% | -0.1% |
  |   Files             |             31 |             31 |     0 |
  |   Lines             |           3407 |           3405 |    -2 |
- |   Covered           |           1151 |           1150 |    -1 |
+ | Code to Test Ratio  |          1:0.9 |          1:0.9 |  +0.0 |
  |   Code              |           7022 |           7018 |    -4 |
  |   Test              |           6578 |           6578 |     0 |
- | Test Execution Time |            11s |            13s |   +2s |

Code coverage of files in pull request scope (28.1% → 28.0%)

Files Coverage +/- Status
action.go 80.7% -0.1% modified
apply.go 1.4% +0.0% modified
table.go 4.2% 0.0% modified

Reported by octocov

@k1LoW k1LoW self-assigned this May 22, 2026
@k1LoW k1LoW marked this pull request as ready for review May 22, 2026 06:02
@k1LoW k1LoW merged commit 73090bc into main May 22, 2026
1 check passed
@k1LoW k1LoW deleted the fix-lint branch May 22, 2026 06:23
@github-actions github-actions Bot mentioned this pull request May 11, 2026
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