Skip to content

Conversation

@ytsarev
Copy link
Member

@ytsarev ytsarev commented Mar 13, 2025

Description of your changes

Before:

golangci-lint config verify
jsonschema: "run" does not validate with "/properties/run/additionalProperties": additionalProperties 'skip-files' not allowed
jsonschema: "output" does not validate with "/properties/output/additionalProperties": additionalProperties 'format' not allowed
jsonschema: "linters-settings.govet" does not validate with "/properties/linters-settings/properties/govet/additionalProperties": additionalProperties 'check-shadowing' not allowed
jsonschema: "linters-settings.errcheck" does not validate with "/properties/linters-settings/properties/errcheck/additionalProperties": additionalProperties 'ignore' not allowed
jsonschema: "linters-settings" does not validate with "/properties/linters-settings/additionalProperties": additionalProperties 'maligned' not allowed
jsonschema: "issues" does not validate with "/properties/issues/additionalProperties": additionalProperties 'max-per-linter' not allowed
Failed executing command with error: the configuration contains invalid elements

After:

golangci-lint config verify
echo $?
0

Originally updated in the context of upbound/function-azresourcegraph#43

I have:

@ytsarev ytsarev changed the title Update golangci configuration to work with latest linter versions Update golangci-lint configuration to work with latest linter versions Mar 13, 2025
.golangci.yml Outdated
maligned:
# print struct with more effective memory layout or not, false by default
suggest-new: true
min-complexity: 20
Copy link
Member

@negz negz Mar 14, 2025

Choose a reason for hiding this comment

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

Was this supposed to change from 10 to 20?

Copy link
Member Author

Choose a reason for hiding this comment

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

good catch, this was specific for function-azresourcegraph, will amend

* Follow golangci-lint config verify errors and fix according to the latest https://golangci-lint.run/usage/configuration/ and https://golangci-lint.run/usage/linters

* It should proactively fix the associated pipeline failures

Signed-off-by: Yury Tsarev <[email protected]>
@ytsarev ytsarev force-pushed the update-golangci-yml branch from 5b49bef to 115fb89 Compare March 14, 2025 01:17
@ytsarev ytsarev requested a review from negz March 14, 2025 01:18
@phisco phisco merged commit 45bc905 into crossplane:main Mar 24, 2025
6 checks passed
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.

4 participants