mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Remove Go's install-deps.sh script
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
all: extractor ql/lib/go.dbscheme install-deps
|
all: extractor ql/lib/go.dbscheme
|
||||||
|
|
||||||
ifeq ($(OS),Windows_NT)
|
ifeq ($(OS),Windows_NT)
|
||||||
EXE = .exe
|
EXE = .exe
|
||||||
@@ -36,9 +36,6 @@ autoformat:
|
|||||||
check-formatting:
|
check-formatting:
|
||||||
test -z "$$(find . -path '**/vendor' -prune -or -type f -iname '*.go' ! -empty -print0 | xargs -0 grep -L "//\s*autoformat-ignore" | xargs gofmt -l)"
|
test -z "$$(find . -path '**/vendor' -prune -or -type f -iname '*.go' ! -empty -print0 | xargs -0 grep -L "//\s*autoformat-ignore" | xargs gofmt -l)"
|
||||||
|
|
||||||
install-deps:
|
|
||||||
bash scripts/install-deps.sh $(CODEQL_LOCK_MODE)
|
|
||||||
|
|
||||||
ifeq ($(QHELP_OUT_DIR),)
|
ifeq ($(QHELP_OUT_DIR),)
|
||||||
# If not otherwise specified, compile qhelp to markdown in place
|
# If not otherwise specified, compile qhelp to markdown in place
|
||||||
QHELP_OUT_DIR := ql/src
|
QHELP_OUT_DIR := ql/src
|
||||||
@@ -75,7 +72,7 @@ tools-win64: $(addsuffix .exe,$(addprefix tools/win64/,$(BINARIES)))
|
|||||||
$(addsuffix .exe,$(addprefix tools/win64/,$(BINARIES))):
|
$(addsuffix .exe,$(addprefix tools/win64/,$(BINARIES))):
|
||||||
env GOOS=windows GOARCH=amd64 go build -mod=vendor -o $@ ./extractor/cli/$(basename $(@F))
|
env GOOS=windows GOARCH=amd64 go build -mod=vendor -o $@ ./extractor/cli/$(basename $(@F))
|
||||||
|
|
||||||
.PHONY: extractor-common extractor extractor-full install-deps
|
.PHONY: extractor-common extractor extractor-full
|
||||||
extractor-common: codeql-extractor.yml LICENSE ql/lib/go.dbscheme \
|
extractor-common: codeql-extractor.yml LICENSE ql/lib/go.dbscheme \
|
||||||
tools/tokenizer.jar $(CODEQL_TOOLS)
|
tools/tokenizer.jar $(CODEQL_TOOLS)
|
||||||
rm -rf $(EXTRACTOR_PACK_OUT)
|
rm -rf $(EXTRACTOR_PACK_OUT)
|
||||||
|
|||||||
11
go/README.md
11
go/README.md
@@ -9,17 +9,6 @@ It contains two major components:
|
|||||||
- static analysis libraries and queries written in [CodeQL](https://codeql.github.com/docs/) that can be
|
- static analysis libraries and queries written in [CodeQL](https://codeql.github.com/docs/) that can be
|
||||||
used to analyze such a database to find coding mistakes or security vulnerabilities.
|
used to analyze such a database to find coding mistakes or security vulnerabilities.
|
||||||
|
|
||||||
## Installation
|
|
||||||
|
|
||||||
Clone this repository.
|
|
||||||
|
|
||||||
Run `scripts/install-deps.sh`. This will ensure that the necessary external CodeQL packs are
|
|
||||||
downloaded to your machine. You will need to re-run this script whenever you pull new commits from
|
|
||||||
the repo.
|
|
||||||
|
|
||||||
If you want to use the CodeQL extension for Visual Studio Code, import this repository into your VS
|
|
||||||
Code workspace.
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
To analyze a Go codebase, either use the [CodeQL command-line
|
To analyze a Go codebase, either use the [CodeQL command-line
|
||||||
|
|||||||
@@ -1,22 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Installs any necessary QL pack dependencies from the package registry.
|
|
||||||
# The optional argument must be a valid value for the `--mode` option to `codeql pack install`
|
|
||||||
|
|
||||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
|
|
||||||
GO_ROOT=$(dirname "$SCRIPT_DIR")
|
|
||||||
|
|
||||||
if [ $# -eq 0 ]; then
|
|
||||||
LOCK_MODE="use-lock"
|
|
||||||
elif [ $# -eq 1 ]; then
|
|
||||||
LOCK_MODE=$1
|
|
||||||
else
|
|
||||||
echo "Usage: install-deps.sh [<lock-mode>]"
|
|
||||||
echo " lock-mode: One of 'use-lock' (default), 'verify', 'update', or 'no-lock'"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
for d in ql/lib ql/src ql/test ql/examples
|
|
||||||
do
|
|
||||||
codeql pack install --mode ${LOCK_MODE} "${GO_ROOT}/${d}"
|
|
||||||
done
|
|
||||||
Reference in New Issue
Block a user