mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 14:31:56 +00:00
We cannot use the staticcheck analyzer directly, since it's actually a collection of analyzers. So we have to pull out each "micro" analyzer and create a seperate bazel target with it. Each bazel target actually just uses `staticcheck.go` and embeds the analyzer it SHOULD use when invoked as that target. Ex: ``` bazel build //dev/linters/staticcheck:SA6001 ``` The above target will do the following: * Set `AnalyzerName` to `SA6001` in `staticcheck.go` uses x_def * Set the importpath to `github.com/sourcegraph/sourcegraph/dev/llinters/staticcheck/SA6001`. **This is very important, otherwise there won't be different libraries with different analyzer names, just one library with one analyzer set invoked by different targets**. ## Test plan bazel build //cmd/frontend/... green ci <!-- All pull requests REQUIRE a test plan: https://docs.sourcegraph.com/dev/background-information/testing_principles --> --------- Co-authored-by: Jean-Hadrien Chabran <jh@chabran.fr>
164 lines
5.1 KiB
Python
164 lines
5.1 KiB
Python
load("@bazel_gazelle//:deps.bzl", "go_repository")
|
|
|
|
def linter_dependencies():
|
|
go_repository(
|
|
name = "com_github_timakin_bodyclose",
|
|
build_file_proto_mode = "disable_global",
|
|
importpath = "github.com/timakin/bodyclose",
|
|
sum = "h1:ig99OeTyDwQWhPe2iw9lwfQVF1KB3Q4fpP3X7/2VBG8=",
|
|
version = "v0.0.0-20200424151742-cb6215831a94",
|
|
)
|
|
|
|
go_repository(
|
|
name = "com_github_ashanbrown_forbidigo",
|
|
build_file_proto_mode = "disable_global",
|
|
importpath = "github.com/ashanbrown/forbidigo",
|
|
sum = "h1:WXhzLjOlnuDYPYQo/eFlcFMi8X/kLfvWLYu6CSoebis=",
|
|
version = "v1.5.1",
|
|
)
|
|
|
|
go_repository(
|
|
name = "com_github_gostaticanalysis_analysisutil",
|
|
build_file_proto_mode = "disable_global",
|
|
importpath = "github.com/gostaticanalysis/analysisutil",
|
|
version = "v0.7.1",
|
|
sum = "h1:ZMCjoue3DtDWQ5WyU16YbjbQEQ3VuzwxALrpYd+HeKk=",
|
|
)
|
|
|
|
go_repository(
|
|
name = "com_github_gostaticanalysis_comment",
|
|
build_file_proto_mode = "disable_global",
|
|
importpath = "github.com/gostaticanalysis/comment",
|
|
version = "v1.4.2",
|
|
sum = "h1:hlnx5+S2fY9Zo9ePo4AhgYsYHbM2+eAv8m/s1JiCd6Q=",
|
|
)
|
|
|
|
go_repository(
|
|
name = "com_github_gordonklaus_ineffassign",
|
|
build_file_proto_mode = "disable_global",
|
|
importpath = "github.com/gordonklaus/ineffassign",
|
|
version = "v0.0.0-20230107090616-13ace0543b28",
|
|
sum = "h1:9alfqbrhuD+9fLZ4iaAVwhlp5PEhmnBt7yvK2Oy5C1U=",
|
|
)
|
|
|
|
go_repository(
|
|
name = "com_github_go_critic_go_critic",
|
|
build_file_proto_mode = "disable_global",
|
|
importpath = "github.com/go-critic/go-critic",
|
|
version = "v0.6.7",
|
|
sum = "h1:1evPrElnLQ2LZtJfmNDzlieDhjnq36SLgNzisx06oPM=",
|
|
)
|
|
|
|
go_repository(
|
|
name = "com_github_go_toolsmith_astcast",
|
|
build_file_proto_mode = "disable_global",
|
|
importpath = "github.com/go-toolsmith/astcast",
|
|
version = "v1.1.0",
|
|
sum = "h1:+JN9xZV1A+Re+95pgnMgDboWNVnIMMQXwfBwLRPgSC8=",
|
|
)
|
|
|
|
go_repository(
|
|
name = "com_github_go_toolsmith_astcopy",
|
|
build_file_proto_mode = "disable_global",
|
|
importpath = "github.com/go-toolsmith/astcopy",
|
|
version = "v1.0.2",
|
|
sum = "h1:YnWf5Rnh1hUudj11kei53kI57quN/VH6Hp1n+erozn0=",
|
|
)
|
|
|
|
go_repository(
|
|
name = "com_github_go_toolsmith_astequal",
|
|
build_file_proto_mode = "disable_global",
|
|
importpath = "github.com/go-toolsmith/astequal",
|
|
version = "v1.1.0",
|
|
sum = "h1:kHKm1AWqClYn15R0K1KKE4RG614D46n+nqUQ06E1dTw=",
|
|
)
|
|
|
|
go_repository(
|
|
name = "com_github_go_toolsmith_astfmt",
|
|
build_file_proto_mode = "disable_global",
|
|
importpath = "github.com/go-toolsmith/astfmt",
|
|
version = "v1.1.0",
|
|
sum = "h1:iJVPDPp6/7AaeLJEruMsBUlOYCmvg0MoCfJprsOmcco=",
|
|
)
|
|
|
|
go_repository(
|
|
name = "com_github_go_toolsmith_astp",
|
|
build_file_proto_mode = "disable_global",
|
|
importpath = "github.com/go-toolsmith/astp",
|
|
version = "v1.1.0",
|
|
sum = "h1:dXPuCl6u2llURjdPLLDxJeZInAeZ0/eZwFJmqZMnpQA=",
|
|
)
|
|
|
|
go_repository(
|
|
name = "com_github_go_toolsmith_pkgload",
|
|
build_file_proto_mode = "disable_global",
|
|
importpath = "github.com/go-toolsmith/pkgload",
|
|
version = "v1.0.2-0.20220101231613-e814995d17c5",
|
|
sum = "h1:eD9POs68PHkwrx7hAB78z1cb6PfGq/jyWn3wJywsH1o=",
|
|
)
|
|
|
|
go_repository(
|
|
name = "com_github_go_toolsmith_strparse",
|
|
build_file_proto_mode = "disable_global",
|
|
importpath = "github.com/go-toolsmith/strparse",
|
|
version = "v1.1.0",
|
|
sum = "h1:GAioeZUK9TGxnLS+qfdqNbA4z0SSm5zVNtCQiyP2Bvw=",
|
|
)
|
|
|
|
go_repository(
|
|
name = "com_github_go_toolsmith_typep",
|
|
build_file_proto_mode = "disable_global",
|
|
importpath = "github.com/go-toolsmith/typep",
|
|
version = "v1.1.0",
|
|
sum = "h1:fIRYDyF+JywLfqzyhdiHzRop/GQDxxNhLGQ6gFUNHus=",
|
|
)
|
|
|
|
go_repository(
|
|
name = "com_github_quasilyte_go_ruleguard",
|
|
importpath = "github.com/quasilyte/go-ruleguard",
|
|
version = "v0.3.19",
|
|
sum = "h1:tfMnabXle/HzOb5Xe9CUZYWXKfkS1KwRmZyPmD9nVcc=",
|
|
)
|
|
|
|
go_repository(
|
|
name = "com_github_quasilyte_gogrep",
|
|
importpath = "github.com/quasilyte/gogrep",
|
|
version = "v0.5.0",
|
|
sum = "h1:eTKODPXbI8ffJMN+W2aE0+oL0z/nh8/5eNdiO34SOAo=",
|
|
)
|
|
|
|
go_repository(
|
|
name = "com_github_quasilyte_regex_syntax",
|
|
importpath = "github.com/quasilyte/regex/syntax",
|
|
version = "v0.0.0-20200407221936-30656e2c4a95",
|
|
sum = "h1:L8QM9bvf68pVdQ3bCFZMDmnt9yqcMBro1pC7F+IPYMY=",
|
|
)
|
|
|
|
go_repository(
|
|
name = "com_github_quasilyte_stdinfo",
|
|
importpath = "github.com/quasilyte/stdinfo",
|
|
version = "v0.0.0-20220114132959-f7386bf02567",
|
|
sum = "h1:M8mH9eK4OUR4lu7Gd+PU1fV2/qnDNfzT635KRSObncs=",
|
|
)
|
|
|
|
go_repository(
|
|
name = "org_golang_x_exp_typeparams",
|
|
importpath = "golang.org/x/exp/typeparams",
|
|
version = "v0.0.0-20230203172020-98cc5a0785f9",
|
|
sum = "h1:6WHiuFL9FNjg8RljAaT7FNUuKDbvMqS1i5cr2OE2sLQ=",
|
|
)
|
|
|
|
go_repository(
|
|
name = "com_github_kyoh86_exportloopref",
|
|
importpath = "github.com/kyoh86/exportloopref",
|
|
version = "v0.1.11",
|
|
sum = "h1:1Z0bcmTypkL3Q4k+IDHMWTcnCliEZcaPiIe0/ymEyhQ=",
|
|
)
|
|
|
|
go_repository(
|
|
name = "co_honnef_go_tools",
|
|
importpath = "honnef.co/go/tools",
|
|
version = "v0.4.3",
|
|
sum = "h1:o/n5/K5gXqk8Gozvs2cnL0F2S1/g1vcGCAx2vETjITw=",
|
|
)
|