golangci-lint icon indicating copy to clipboard operation
golangci-lint copied to clipboard

Automatically check `.golangci.reference.yml` is up to date with code

Open mateusoliveira43 opened this issue 1 year ago • 1 comments

Your feature request related to a problem? Please describe.

Today, the documentation from .golangci.reference.yml is not programmatically checked. This can lead to undocumented fields (example https://github.com/golangci/golangci-lint/pull/4285). With so many available options, it is impossible to check all of them just with reviewing the yaml file.

Describe the solution you'd like.

Add a CI check to confirm that .golangci.reference.yml is up to date with code. Example implementation https://github.com/golangci/golangci-lint/pull/4286

Describe alternatives you've considered.

Did not think about another alternative.

Additional context.

This can improve user experience with the product.

mateusoliveira43 avatar Dec 26 '23 16:12 mateusoliveira43

I think its ideal to tightly couple your documentation to your code and having this type of check would help ensure that. I think most engineers can admit that they are guilty of neglecting documentation at times (✋: I can) . I'm in favor of this feature! Great idea in my opinion.

chrishalbert avatar Jan 05 '24 17:01 chrishalbert