Code AI platform with Code Search & Cody
Go to file
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
.aspect ci: bazel build and test in a single job (#49313) 2023-03-14 20:10:43 +02:00
.buildkite ci: be more precise when tearing down test DBs (#49411) 2023-03-16 14:46:49 +02:00
.github Update to go 1.19.8 (#50341) 2023-04-05 17:39:02 +02:00
.vscode syntax-highlighter: load all tree-sitter highlight configurations at startup (#50394) 2023-04-05 17:58:01 +01:00
client Cody: Fix IME composition, reply in the IDE/browser's language (#50465) 2023-04-11 14:14:02 +09:00
cmd bazel: add staticcheck analyzers (#50386) 2023-04-11 10:02:25 +02:00
dev bazel: add staticcheck analyzers (#50386) 2023-04-11 10:02:25 +02:00
doc Sourcegraph helm doc update (#50500) 2023-04-11 17:15:41 +10:00
docker-images Fix CVE-2023-0465 in Grafana image (#50431) 2023-04-06 08:33:51 +00:00
enterprise Cody: add patterns for queries that require context (#50519) 2023-04-10 19:09:05 -07:00
internal bazel: add staticcheck analyzers (#50386) 2023-04-11 10:02:25 +02:00
lib bazel: fix buf files (#49444) 2023-03-15 20:21:38 +00:00
migrations fix migration parents for 5.0 backport (#50400) 2023-04-05 21:30:07 +02:00
monitoring ranking: Better vacuuming of exported data (#49869) 2023-03-24 15:01:03 +00:00
schema Revert "feat: add ordering to auth providers in login screen" (#50450) 2023-04-07 07:00:50 +00:00
third_party bazel: update buildfiles (#47744) 2023-02-16 16:32:59 +01:00
third-party-licenses chore: update third-party licenses (#50499) 2023-04-10 06:48:12 +02:00
ui/assets Revert docker bazel frontend (#50326) 2023-04-04 10:24:05 +00:00
wolfi-images Add Wolfi base images (#47034) 2023-01-31 12:09:09 +00:00
wolfi-packages test the code host connection for Perforce (fixes #43855) (#49069) 2023-03-10 13:16:22 -08:00
.bazel_fix_commands.json bazel: add command sets that uses bazel under the hood (#48460) 2023-03-02 11:31:51 +01:00
.bazelignore bazel: build cody-ui and cody-shared (#50285) 2023-04-03 14:13:21 +00:00
.bazeliskrc chore: update to Aspect CLI 5.2.1 (#48798) 2023-03-07 10:13:33 +01:00
.bazelrc Revert docker bazel frontend (#50326) 2023-04-04 10:24:05 +00:00
.bazelversion build: upgrade bazel to 6.0.0 (#47049) 2023-01-29 17:37:55 +01:00
.browserslistrc web: migrate from yarn to pnpm (#46143) 2023-01-11 19:50:09 -08:00
.dockerignore web: migrate from yarn to pnpm (#46143) 2023-01-11 19:50:09 -08:00
.editorconfig chore: Add .lua to editorconfig. (#44267) 2022-11-11 15:25:32 +08:00
.eslintignore [experiment] Merge SvelteKit prototype into main (#47238) 2023-02-13 17:53:23 +01:00
.eslintrc.js Better import ordering with prettier (#48188) 2023-03-13 08:37:23 +00:00
.gitattributes bazel: Build syntax-highlighter (#48703) 2023-03-08 19:08:09 +08:00
.gitignore Sourcegraph App (single-binary branch) (#46547) 2023-01-19 17:35:39 -07:00
.golangci-warn.yml internal/resources-report: remove tool (#46941) 2023-01-25 10:34:59 -08:00
.golangci.yml bazel: fix remaining backend tests (#47961) 2023-03-01 17:03:01 +00:00
.graphqlrc.yml
.hadolint.yaml bump comby version to 1.7.1 (#35830) 2022-05-20 20:12:01 -07:00
.mailmap mailmap: update replacements for Joe (#29614) 2022-01-12 10:56:56 +08:00
.mocharc.js build: still need BAZEL_BINDIR for webpack_bundle custom rule (#48796) 2023-03-07 20:02:11 -08:00
.npmrc web: fix pnpm-lock issue (#47478) 2023-02-09 22:04:31 -08:00
.percy.yml Update browser extention installation detection logic on web (#32449) 2022-03-14 23:29:39 +06:00
.prettierignore Better import ordering with prettier (#48188) 2023-03-13 08:37:23 +00:00
.stylelintignore rework plugin structure and implement frontside blogpost (#46883) 2023-02-15 11:49:51 +02:00
.stylelintrc.json web: drop bootstrap depenedency (#41401) 2022-09-07 03:11:26 -07:00
.tool-versions Update to go 1.19.8 (#50341) 2023-04-05 17:39:02 +02:00
.trivyignore ci: ignore benign CVE-2021-43816 in prometheus (#31069) 2022-02-11 16:49:10 +00:00
babel.config.jest.js bazel: fix the web application bundle in Bazel (#50383) 2023-04-10 21:16:12 -07:00
babel.config.js bazel: fix the web application bundle in Bazel (#50383) 2023-04-10 21:16:12 -07:00
BUILD.bazel bazel: add staticcheck analyzers (#50386) 2023-04-11 10:02:25 +02:00
CHANGELOG.md Kubernetes Runtime (#49236) 2023-04-10 11:06:39 -06:00
CONTRIBUTING.md Docs: Fix docs page link in main CONTRIBUTING.md (#45160) 2022-12-05 14:57:45 +01:00
deps.bzl Update buildfiles 03/04 (#50300) 2023-04-03 17:15:17 +00:00
doc.go
flake.lock nix: use go1.20 (#47541) 2023-02-13 12:19:12 +02:00
flake.nix nix: use go1.20 (#47541) 2023-02-13 12:19:12 +02:00
gen.go chore: Update go-mockgen (#44305) 2022-11-11 19:24:00 +00:00
go.mod zoekt: update to sourcegraph/zoekt@b247fb51de (#50393) 2023-04-05 18:33:38 +00:00
go.sum zoekt: update to sourcegraph/zoekt@b247fb51de (#50393) 2023-04-05 18:33:38 +00:00
graphql-schema-linter.config.js
gulpfile.js web: drop legacy GraphQL schema generator (#45945) 2022-12-25 18:10:20 -08:00
jest.config.base.js bazel: wildcard jest tests (#49282) 2023-03-17 03:38:49 -07:00
jest.config.js tests: use glob for jest projects field (#29681) 2022-01-13 01:11:52 -08:00
jest.snapshot-resolver.js bazel: wildcard jest tests (#49282) 2023-03-17 03:38:49 -07:00
LICENSE update licensing language (#25620) 2021-10-04 15:40:59 +01:00
LICENSE.apache
LICENSE.enterprise
lighthouserc.js web: migrate from yarn to pnpm (#46143) 2023-01-11 19:50:09 -08:00
linter_deps.bzl bazel: add staticcheck analyzers (#50386) 2023-04-11 10:02:25 +02:00
mockgen.temp.yaml Executor Runtimes (#47496) 2023-04-04 09:18:26 -06:00
mockgen.test.yaml codeintel: Higher-level store cleanup (#50387) 2023-04-05 19:08:47 -05:00
mockgen.yaml mocks: Reorganize mock definitions into multiple files (#36967) 2022-06-27 20:59:16 +00:00
nogo_config.json bazel: add staticcheck analyzers (#50386) 2023-04-11 10:02:25 +02:00
package.json bazel: fix the web application bundle in Bazel (#50383) 2023-04-10 21:16:12 -07:00
pnpm-lock.yaml bazel: fix the web application bundle in Bazel (#50383) 2023-04-10 21:16:12 -07:00
pnpm-workspace.yaml cody: development branch (#49761) 2023-03-23 20:41:11 +01:00
postcss.config.js extensibility: add featured extensions to registry (#21665) 2021-06-10 13:55:20 -04:00
prettier.config.js clean up Cody CSS to increase shareability and improve display in web app (#50279) 2023-04-03 12:29:05 -07:00
README.md update readme and docs index for 5.0 (#49988) 2023-03-24 21:48:46 -06:00
renovate.json chore: add test plans to bot and release tool PRs (#31351) 2022-02-22 07:53:25 -08:00
SECURITY.md
service-catalog.yaml lib/servicecatalog: init to distribute catalog (#46999) 2023-01-26 17:22:27 -08:00
sg.config.yaml Add embeddings to server behind env var (#50288) 2023-04-04 16:45:50 +02:00
shell.nix nix: use bazelisk without influence from CC and CXX envvars (#50064) 2023-03-28 15:56:37 +02:00
svgo.config.js Performance: Optimize static SVG assets with SVGO (#26285) 2021-10-27 15:27:36 +01:00
tsconfig.all.json extract Cody UI package, add Cody to web app (#50270) 2023-04-02 17:41:20 -07:00
tsconfig.base.json web: fix pnpm-lock issue (#47478) 2023-02-09 22:04:31 -08:00
tsconfig.eslint.json web: fix pnpm-lock issue (#47478) 2023-02-09 22:04:31 -08:00
WORKSPACE Update to go 1.19.8 (#50341) 2023-04-05 17:39:02 +02:00

DocsContributingTwitterDiscord

Build status Scorecard Latest release Discord Contributors


Sourcegraph makes it easy to read, write, and fix code—even in big, complex codebases.

  • Code search: Search all of your repositories across all branches and all code hosts.
  • Code intelligence: Navigate code, find references, see code owners, trace history, and more.
  • Fix and refactor: Roll out large-scale changes to many repositories at once and track big migrations.

Getting started



Development

Refer to the Developing Sourcegraph guide to get started.

Documentation

The doc directory has additional documentation for developing and understanding Sourcegraph:

License

This repository contains both OSS-licensed and non-OSS-licensed files. We maintain one repository rather than two separate repositories mainly for development convenience.

All files in the enterprise and client/web/src/enterprise fall under LICENSE.enterprise.

The remaining files fall under the Apache 2 license. Sourcegraph OSS is built only from the Apache-licensed files in this repository.