Skip to content

Needs language_version for go with gitleaks whereas pre-commit does not #987

@MRigal

Description

@MRigal

Summary

Hi all,
Thanks for the great software!
I've just tried using prek as a drop-in replacement for pre-commit, and except the support for Ruby #43, it would be ready for us to take on!

I just wanted to report that when installing the hook gitleaks, as I only have go 1.22.4 locally and as gitleaks requires go 1.23, prek does not run. Easily fixable with adding the language_version line, but I just wanted to report that.

error: Failed to install hook `gitleaks`
  caused by: command `go install` exited with an error:

[status]
exit status: 1

[stderr]
go: go.mod requires go >= 1.23.0 (running go 1.22.4; GOTOOLCHAIN=local)

Cheers,
Matthieu

Platform

Mac OS Tahoe 26.0.1

Version

prek 0.2.12 (15ef28a 2025-10-27)

.pre-commit-config.yaml

repos:
  - repo: https://github.com/gitleaks/gitleaks
    rev: v8.24.2
    hooks:
      - id: gitleaks
        args: [--config=.gitleaks.toml]
        language_version: ">= 1.23.0"  # line not required with pre-commit

Log file

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions