Skip to content

A linter for go.mod file - validates NO `replace` directive is committed

License

Notifications You must be signed in to change notification settings

strongo/gomodlint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gomodlint

A linter for go.mod file - validates NO replace directive is committed

Usage in pre-commit hook

if git diff --name-only --cached | grep -q ":\s*go\.mod"; then
  gomodlint
  exit_code=$?
  if [ $exit_code -ne 0 ]; then
    exit $exit_code
  fi
fi

Usage in GitHub Workflow

You should have a Go language installed in your workflow. Then you can use this action as follows:

    - name: go.mod validation
      run: go run github.com/strongo/gomodlint@latest

Free to use & modify - MIT License

Used by:

  • github.com/sneat-co - an extendable platform that allows to build apps with extension modules.
  • DALgo - Database Abstraction Layer in GO language

About

A linter for go.mod file - validates NO `replace` directive is committed

Resources

License

Stars

Watchers

Forks

Packages

No packages published