Skip to content

strongo/gomodlint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 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:

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •