Skip to content

[golangci-lint] Deny md5 and sha1 crypto packages #42

Description

@sc-brandon

Using depguard: https://github.com/OpenPeeDeeP/depguard in golangci-lint.

Example: https://github.com/open-telemetry/opentelemetry-go/blob/bb5b0a8e61deb5ed46cb99abc17de3565b168d23/.golangci.yml#L38-L48

  settings:
    depguard:
      rules:
        non-tests:
          files:
            - '!$test'
            - '!**/*test/*.go'
            - '!**/internal/matchers/*.go'
          deny:
            - pkg: testing
            - pkg: github.com/stretchr/testify
            - pkg: crypto/md5
            - pkg: crypto/sha1
            - pkg: crypto/**/pkix

More discussion on Slack.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions