From abe1817d6ea08ef2e3dcf52222ad4cb90134036f Mon Sep 17 00:00:00 2001 From: Adam Hughes Date: Fri, 14 May 2021 18:11:47 +0000 Subject: [PATCH 1/2] ci: remove deprecated maligned linter --- .golangci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.golangci.yml b/.golangci.yml index 7bd267c01a..c98dcd9c96 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -12,7 +12,6 @@ linters: - gosimple - govet - ineffassign - - maligned - misspell - nakedret # we would like to add these From 91a71d3a259f564240ae394916324e0a1946b255 Mon Sep 17 00:00:00 2001 From: Adam Hughes Date: Fri, 14 May 2021 18:11:30 +0000 Subject: [PATCH 2/2] ci: bump golangci-lint to v1.40.1 --- INSTALL.md | 13 +++++-------- scripts/run-linter | 2 +- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index d315e844a6..1448bde1b8 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -59,21 +59,18 @@ $ echo 'export GOPATH=${HOME}/go' >> ~/.bashrc && \ This is an optional (but highly recommended!) step. To ensure consistency and to catch certain kinds of issues early, we provide a -configuration file for golangci-lint. Every pull request must pass the +configuration file for `golangci-lint`. Every pull request must pass the checks specified there, and these will be run automatically before attempting to merge the code. If you are modifying Singularity and contributing your changes to the repository, it's faster to run these checks locally before uploading your pull request. -In order to install golangci-lint, you can run: +In order to download and install the latest version of `golangci-lint`, +you can run: +```sh +curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin ``` -$ curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | - sh -s -- -b $(go env GOPATH)/bin v1.31.0 -``` - -This will download and install golangci-lint from its Github releases -page (using version v1.31.0 at the moment). ## Clone the repo diff --git a/scripts/run-linter b/scripts/run-linter index 3e1d716bf4..4994e90e4b 100755 --- a/scripts/run-linter +++ b/scripts/run-linter @@ -2,7 +2,7 @@ set -e -golangci_lint_version=1.31.0 +golangci_lint_version=1.40.1 golangci_lint_install_url=https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh info() {