diff --git a/.golangci-travis.yml b/.golangci-travis.yml deleted file mode 100644 index cca9f2365f5d..000000000000 --- a/.golangci-travis.yml +++ /dev/null @@ -1,39 +0,0 @@ -run: - deadline: 60m10s - modules-download-mode: vendor - -issues: - max-per-linter: 0 - max-same-issues: 0 - -linters: - disable-all: true - enable: - - deadcode - - errcheck - - gocritic - - gofmt - - goimports - - gosimple - - govet - - ineffassign - - interfacer - - nakedret - - misspell - - staticcheck - - structcheck - - typecheck - - unconvert - - unparam - - varcheck - - vet - - vetshadow - - whitespace - -linters-settings: - errcheck: - ignore: github.com/hashicorp/terraform-plugin-sdk/helper/schema:ForceNew|Set,fmt:.*,io:Close - misspell: - ignore-words: - - hdinsight - - exportfs diff --git a/.golangci.yml b/.golangci.yml index ababb07bf761..41744b039ff8 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -9,6 +9,7 @@ issues: linters: disable-all: true enable: + - asciicheck - deadcode - errcheck - gocritic diff --git a/GNUmakefile b/GNUmakefile index dc821ff93994..8b3aeb501054 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -53,15 +53,6 @@ goimports: lint: ./scripts/run-lint.sh -# we have split off static check because it causes travis to fail with an OOM error -lintunused: - @echo "==> Checking source code against static check linters..." - (while true; do sleep 300; echo "(I'm still alive and linting!)"; done) & PID=$$!; echo $$PID; \ - golangci-lint run ./... -v --no-config --concurrency 1 --deadline=30m10s --disable-all --enable=unused; ES=$$?; kill -9 $$PID; exit $$ES - -lintrest: - ./scripts/run-lint-rest.sh - depscheck: @echo "==> Checking source code with go mod tidy..." @go mod tidy diff --git a/scripts/run-lint-rest.sh b/scripts/run-lint-rest.sh deleted file mode 100755 index 8994336206de..000000000000 --- a/scripts/run-lint-rest.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env bash - -function checkForConditionalRun { - if [ "$TRAVIS" == "ci" ]; - then - echo "Checking if this should be conditionally run.." - result=$(git diff --name-only origin/master | grep azurerm/) - if [ "$result" = "" ]; - then - echo "No changes committed to ./azurerm - nothing to lint - exiting" - exit 0 - fi - fi -} - -function runLinters { - echo "==> Checking source code against linters..." - (while true; do sleep 300; echo "(I'm still alive and linting!)"; done) & PID="$!"; echo "Watcher subprocess: $PID"; \ - golangci-lint run ./... -v --concurrency 1 --config .golangci-travis.yml ; ES="$?"; kill -9 "$PID"; exit "$ES" -} - -function main { - checkForConditionalRun - runLinters -} - -main diff --git a/version/version.go b/version/version.go index b2d946a5d206..081f1948ffef 100644 --- a/version/version.go +++ b/version/version.go @@ -1,6 +1,4 @@ package version -var ( - // ProviderVersion is set during the release process to the release version of the binary - ProviderVersion = "dev" -) +// ProviderVersion is set during the release process to the release version of the binary +var ProviderVersion = "dev"