From 781e96e2a0e85ea526faba9ba35f706824a38951 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Tue, 3 Jan 2023 10:45:06 +0000 Subject: [PATCH] Remove Go's install-deps.sh script --- go/Makefile | 7 ++----- go/README.md | 11 ----------- go/scripts/install-deps.sh | 22 ---------------------- 3 files changed, 2 insertions(+), 38 deletions(-) delete mode 100755 go/scripts/install-deps.sh diff --git a/go/Makefile b/go/Makefile index 4faf28c41ea..2983ec2b6c7 100644 --- a/go/Makefile +++ b/go/Makefile @@ -1,4 +1,4 @@ -all: extractor ql/lib/go.dbscheme install-deps +all: extractor ql/lib/go.dbscheme ifeq ($(OS),Windows_NT) EXE = .exe @@ -36,9 +36,6 @@ autoformat: 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)" -install-deps: - bash scripts/install-deps.sh $(CODEQL_LOCK_MODE) - ifeq ($(QHELP_OUT_DIR),) # If not otherwise specified, compile qhelp to markdown in place QHELP_OUT_DIR := ql/src @@ -75,7 +72,7 @@ tools-win64: $(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)) -.PHONY: extractor-common extractor extractor-full install-deps +.PHONY: extractor-common extractor extractor-full extractor-common: codeql-extractor.yml LICENSE ql/lib/go.dbscheme \ tools/tokenizer.jar $(CODEQL_TOOLS) rm -rf $(EXTRACTOR_PACK_OUT) diff --git a/go/README.md b/go/README.md index b7c4d5cb98e..fc51b519035 100644 --- a/go/README.md +++ b/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 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 To analyze a Go codebase, either use the [CodeQL command-line diff --git a/go/scripts/install-deps.sh b/go/scripts/install-deps.sh deleted file mode 100755 index 321e92957d5..00000000000 --- a/go/scripts/install-deps.sh +++ /dev/null @@ -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 []" - 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