sourcegraph/cmd
William Bezuidenhout 4df176b87e
bazel: add staticcheck analyzers (#50386)
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>
2023-04-11 10:02:25 +02:00
..
blobstore add default value for DOCKER_BAZEL (#50324) 2023-04-04 08:55:14 +00:00
frontend Conditionally render cody for repo sidebar web (#50452) 2023-04-10 14:13:23 +00:00
github-proxy add default value for DOCKER_BAZEL (#50324) 2023-04-04 08:55:14 +00:00
gitserver cleanup: make logging consistent, clean up code. (#50502) 2023-04-10 18:20:49 +04:00
loadtest add default value for DOCKER_BAZEL (#50324) 2023-04-04 08:55:14 +00:00
migrator Offline drift check improvements (#50207) 2023-04-04 23:19:36 -07:00
repo-updater add default value for DOCKER_BAZEL (#50324) 2023-04-04 08:55:14 +00:00
searcher add default value for DOCKER_BAZEL (#50324) 2023-04-04 08:55:14 +00:00
server Add embeddings to server behind env var (#50288) 2023-04-04 16:45:50 +02:00
sitemap Housekeeping: Rename variables to avoid collisions with packages (#47179) 2023-01-31 16:28:43 +01:00
sourcegraph-oss svcmain: introduce urfave/cli (#49518) 2023-03-17 12:31:49 +02:00
symbols bazel: add staticcheck analyzers (#50386) 2023-04-11 10:02:25 +02:00
worker add default value for DOCKER_BAZEL (#50324) 2023-04-04 08:55:14 +00:00
README.md Reminder to keep architecture diagram in-sync (#36869) 2022-06-08 19:40:36 -07:00

This directory contains Sourcegraph services and binaries.

When a services is added, removed, or when a service's dependencies change, update our architecture diagram.