Skip to content

Find duplicate constants #29

@kalexmills

Description

@kalexmills

In large codebases it's possible to end up with constants redefined across multiple packages. Usually we would like each constant to have a single source of truth. We currently don't have a way to detect for that.

I have a need for a linter which finds constants like these. I was going to write my own but after taking a look here, I realized it would be easier to add on to this one.

I've authored a PR which adds this feature, with a --find-duplicates flag. It also includes backwards compatible changes to the Issue struct, to allow integration with golangci-lint, if it is merged.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions