Skip to content

fix lint issue on structtag#8096

Merged
bbrks merged 1 commit intomainfrom
lint-improvement
Mar 9, 2026
Merged

fix lint issue on structtag#8096
bbrks merged 1 commit intomainfrom
lint-improvement

Conversation

@torcolvin
Copy link
Collaborator

The issue with the structtag was found with newer versions of staticcheck on the .golangci-strict.yml

  • allow parallel runners by default, useful for working on multiple parts of a repo simultaneously, or one file, and then editing another

- allow parallel runners by default, useful for working on multiple parts of a repo simultaneously
Copilot AI review requested due to automatic review settings March 6, 2026 14:37
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR resolves a structtag lint violation flagged by newer staticcheck and updates golangci-lint configuration to permit running multiple linters concurrently against the same repo checkout.

Changes:

  • Fix invalid JSON struct tag on StartupConfig.DeprecatedConfig to satisfy structtag checks.
  • Enable run.allow-parallel-runners in both standard and strict golangci-lint configurations.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
rest/config_startup.go Fixes an invalid json struct tag that newer linters reject.
.golangci.yml Enables parallel runners to reduce friction when running lint concurrently.
.golangci-strict.yml Enables parallel runners for the strict lint configuration used in CI.

@torcolvin torcolvin requested a review from bbrks March 6, 2026 15:47
@torcolvin
Copy link
Collaborator Author

This ends up being a behavior change, previously the structtag was literally "-".

From https://pkg.go.dev/encoding/json

As a special case, if the field tag is "-", the field is always omitted. Note that a field with name "-" can still be generated using the tag "-,".

I highly doubt anyone knew about this and was relying on this behavior.

@bbrks bbrks merged commit f92e278 into main Mar 9, 2026
32 checks passed
@bbrks bbrks deleted the lint-improvement branch March 9, 2026 17:10
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.

3 participants