Skip to content

Go analyzers to enforce code consistency and discourage bad practices.

License

Notifications You must be signed in to change notification settings

dorfire/go-analyzers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-analyzers

Static analyzers for Go to enforce code consistency and discourage bad practices.

Available analyzers

visibilityorder

Breaking code example:

image

Resulting compilation error:

image

onlyany

Forces the use of any (introduced in Go 1.8) instead of interface{}.

Installation (with Bazel)

In your WORKSPACE file:

http_archive(
    name = "com_github_dorfire_go_analyzers",
    sha256 = "2c07d07f67d7c402073548e8b1b36ffb23efa410d6958bacc4c12b02fcb1eac9",
    strip_prefix = "go-analyzers-master",
    urls = ["https://github.com/dorfire/go-analyzers/archive/refs/heads/master.tar.gz"],
)

In your NoGo target file (e.g. build/BUILD.bazel):

load("@io_bazel_rules_go//go:def.bzl", "nogo")

nogo(
    name = "nogo",
    # ...
    deps = [
        "@com_github_dorfire_go_analyzers//src/onlyany",
        "@com_github_dorfire_go_analyzers//src/visibilityorder",
        # ...
    ],
)

About

Go analyzers to enforce code consistency and discourage bad practices.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •