Check that no inits functions are present in Go code.
Init functions cause an import to have side effects, and side effects are hard to test, reduce readability and increase the complexity of code.
go get 4d63.com/gochecknoinits
gochecknoinits [path] [path] [path] [etc]
-t to include tests.
gochecknoinits -t [path]
Note: Paths are only inspected recursively if the Go
/... recursive path suffix is appended to the path.
We found that 4d63.com/gochecknoinits demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket installs a GitHub app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.