Skip to content

golangci-lint2 pre-commit action not working #1081

@joeyberkovitz

Description

@joeyberkovitz

when running golangci-lint2 as part of the trunk pre-commit action, it never detects any errors because any files that are staged for the current commit are considered "existing".

running the linter manually via trunk using --show-existing is the only way to error out on any files that are staged for commit.

the golangci-lint pre-commit hook uses the following args: golangci-lint run --new-from-rev HEAD --fix. maybe the --new-from-rev is what matters to us?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions