Skip to content

Commit

Permalink
Use SCIP
Browse files Browse the repository at this point in the history
  • Loading branch information
firelizzard18 committed Apr 9, 2024
1 parent a04bd46 commit 5fc4954
Show file tree
Hide file tree
Showing 6 changed files with 782 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .gitlab/common.gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ build-image:golang:
paths:
- .go-mod-cache
- .golangci-cache
needs:
- job: build-image:golang
optional: true
variables:
GOMODCACHE: ${CI_PROJECT_DIR}/.go-mod-cache
GOLANGCI_LINT_CACHE: ${CI_PROJECT_DIR}/.golangci-cache
Expand Down
5 changes: 3 additions & 2 deletions .gitlab/scan.gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ secret_detection:
- if: $CI_PIPELINE_SOURCE

code_intelligence:
image: sourcegraph/lsif-go:v1
extends: [ .rules all, .go ]
allow_failure: true
script:
- lsif-go
- scip-go
- scip convert
artifacts:
reports:
lsif: dump.lsif
13 changes: 12 additions & 1 deletion scripts/images/ci-golang/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
ARG VERSION=1.20
FROM golang:1.22 as build

WORKDIR /root/build
COPY go.mod go.sum ./

ENV CGO_ENABLED 0
RUN go install github.com/sourcegraph/scip/cmd/scip && \
go install github.com/sourcegraph/scip-go/cmd/scip-go

FROM golang:${VERSION}

RUN apt update -y && apt install -y git-lfs
RUN apt update -y && apt install -y git-lfs

COPY --from=build /go/bin/scip /go/bin/scip-go /bin/
15 changes: 15 additions & 0 deletions scripts/images/ci-golang/dependencies.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Copyright 2023 The Accumulate Authors
//
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.

//go:build tools
// +build tools

package accumulate

import (
_ "github.com/sourcegraph/scip-go/cmd/scip-go"
_ "github.com/sourcegraph/scip/cmd/scip"
)
111 changes: 111 additions & 0 deletions scripts/images/ci-golang/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
module ci-golang

go 1.22.1

require (
github.com/sourcegraph/scip v0.3.3
github.com/sourcegraph/scip-go v0.1.12
)

require (
github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect
github.com/Masterminds/semver v1.4.2 // indirect
github.com/Masterminds/sprig v2.15.0+incompatible // indirect
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/agnivade/levenshtein v1.1.1 // indirect
github.com/alecthomas/kingpin v2.2.6+incompatible // indirect
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect
github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect
github.com/aokoli/goutils v1.0.1 // indirect
github.com/bufbuild/buf v1.25.0 // indirect
github.com/bufbuild/connect-go v1.9.0 // indirect
github.com/bufbuild/connect-opentelemetry-go v0.4.0 // indirect
github.com/bufbuild/protocompile v0.5.1 // indirect
github.com/cockroachdb/errors v1.8.9 // indirect
github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f // indirect
github.com/cockroachdb/redact v1.1.3 // indirect
github.com/containerd/stargz-snapshotter/estargz v0.14.3 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/docker/cli v24.0.4+incompatible // indirect
github.com/docker/distribution v2.8.2+incompatible // indirect
github.com/docker/docker v24.0.4+incompatible // indirect
github.com/docker/docker-credential-helpers v0.8.0 // indirect
github.com/docker/go-connections v0.4.0 // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/efritz/pentimento v0.0.0-20190429011147-ade47d831101 // indirect
github.com/envoyproxy/protoc-gen-validate v0.3.0-java // indirect
github.com/felixge/fgprof v0.9.3 // indirect
github.com/getsentry/sentry-go v0.12.0 // indirect
github.com/go-chi/chi/v5 v5.0.10 // indirect
github.com/go-enry/go-enry/v2 v2.7.2 // indirect
github.com/go-enry/go-oniguruma v1.2.1 // indirect
github.com/go-logr/logr v1.2.4 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/gofrs/uuid/v5 v5.0.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/go-containerregistry v0.15.2 // indirect
github.com/google/pprof v0.0.0-20230705174524-200ffdc848b8 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/hexops/gotextdiff v1.0.3 // indirect
github.com/hhatto/gocloc v0.4.2 // indirect
github.com/huandu/xstrings v1.0.0 // indirect
github.com/imdario/mergo v0.3.4 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jdxcode/netrc v0.0.0-20221124155335-4616370d1a84 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/k0kubun/pp/v3 v3.1.0 // indirect
github.com/klauspost/compress v1.16.7 // indirect
github.com/klauspost/pgzip v1.2.6 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/mattn/go-colorable v0.1.12 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/moby/term v0.5.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/morikuni/aec v1.0.0 // indirect
github.com/mwitkow/go-proto-validators v0.0.0-20180403085117-0950a7990007 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.1.0-rc4 // indirect
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pkg/profile v1.7.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/pseudomuto/protoc-gen-doc v1.5.1 // indirect
github.com/pseudomuto/protokit v0.2.0 // indirect
github.com/rogpeppe/go-internal v1.9.0 // indirect
github.com/rs/cors v1.9.0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/sourcegraph/sourcegraph/lib v0.0.0-20220511160847-5a43d3ea24eb // indirect
github.com/spf13/cobra v1.7.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/stretchr/testify v1.8.4 // indirect
github.com/tetratelabs/wazero v1.3.0 // indirect
github.com/urfave/cli/v2 v2.25.7 // indirect
github.com/vbatts/tar-split v0.11.3 // indirect
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
go.opentelemetry.io/otel v1.16.0 // indirect
go.opentelemetry.io/otel/metric v1.16.0 // indirect
go.opentelemetry.io/otel/sdk v1.16.0 // indirect
go.opentelemetry.io/otel/trace v1.16.0 // indirect
go.uber.org/atomic v1.11.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.24.0 // indirect
golang.org/x/crypto v0.21.0 // indirect
golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 // indirect
golang.org/x/mod v0.16.0 // indirect
golang.org/x/net v0.22.0 // indirect
golang.org/x/sync v0.6.0 // indirect
golang.org/x/sys v0.18.0 // indirect
golang.org/x/term v0.18.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/tools v0.19.0 // indirect
golang.org/x/tools/go/vcs v0.1.0-deprecated // indirect
google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4 // indirect
google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit 5fc4954

Please sign in to comment.