-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Go unstable=1.19, stable=1.18, oldstable=1.17
CHANGES - each image type (`stable`, `unstable`, `oldstable`) has their own copy of the golangci-lint config file with the `stable` variants being given a copy of the via the Makefile build recipe - each image type (`stable`, `unstable`, `oldstable`) is given a copy of the markdownlint config file via Makefile build recipe - Makefile clean recipe updated to remove temporary copies of linter config files - Makefile build recipe updated to limit copying of linter config files to just the images which use them - `oldstable` image - explicitly specifies the Go version limit for golangci-lint as Go 1.17 - updated Go from `1.16.15` to `1.17.11` - `unstable` image - explicitly specifies the Go version limit for golangci-lint as Go 1.18 (for now) - updated Go from `1.18.3` to `1.19beta1` - `stable` image - variants providing the golangci-lint linter explicitly specify the Go version limit for golangci-lint as Go 1.18 - updated Go from `1.17.11` to `1.18.3` - update README to drop compatibility notes regarding the `oldstable` image and older `staticcheck` version used for Go 1.16 compatibility - update go.mod file to reflect current stable version of Go (1.18) with a note to update the version going forward refs GH-557 refs GH-656
- Loading branch information
Showing
14 changed files
with
210 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
# Copyright 2020 Adam Chalkley | ||
# | ||
# https://github.com/atc0005/go-ci | ||
# | ||
# Licensed under the MIT License. See LICENSE file in the project root for | ||
# full license information. | ||
|
||
############################################################################### | ||
# NOTE: This is the golangci-lint configuration file *specific* to the | ||
# "unstable" variant of the container images provided by this project. This | ||
# configuration (potentially) enables additional linters not used by the other | ||
# container image variants. | ||
############################################################################### | ||
|
||
issues: | ||
# equivalent CLI flag: --exclude-use-default | ||
# | ||
# see: | ||
# atc0005/todo#22 | ||
# atc0005/todo#29 | ||
# golangci-lint/golangci-lint#1249 | ||
# golangci-lint/golangci-lint#413 | ||
exclude-use-default: false | ||
|
||
run: | ||
# Define the Go version limit. | ||
# Mainly related to generics support in go1.18. | ||
# Default: use Go version from the go.mod file, fallback on the env var `GOVERSION`, fallback on 1.17 | ||
# https://github.com/golangci/golangci-lint/blob/master/.golangci.reference.yml | ||
go: "1.18" | ||
|
||
# Reminder: Sort this after every change | ||
linters: | ||
enable: | ||
- depguard | ||
- dogsled | ||
- dupl | ||
- exportloopref | ||
- errcheck | ||
- gochecknoglobals | ||
- gocognit | ||
- goconst | ||
- gocritic | ||
- gocyclo | ||
- goerr113 | ||
- gofmt | ||
- goimports | ||
- gosec | ||
- govet | ||
|
||
# Deprecated linter, but still functional as of golangci-lint v1.39.0. | ||
# See https://github.com/atc0005/go-ci/issues/302 for more information. | ||
- maligned | ||
|
||
- misspell | ||
- prealloc | ||
- revive | ||
- staticcheck | ||
|
||
# Incompatible with Go 1.18 (GH-568) | ||
# https://github.com/golangci/golangci-lint/issues/2649 | ||
# - stylecheck | ||
- unconvert | ||
|
||
disable: | ||
# Incompatible with Go 1.18 (GH-568) | ||
# https://github.com/golangci/golangci-lint/issues/2649 | ||
- bodyclose | ||
- contextcheck | ||
- gosimple | ||
- nilerr | ||
- noctx | ||
- rowserrcheck | ||
- sqlclosecheck | ||
- structcheck | ||
- stylecheck | ||
- tparallel | ||
- unparam | ||
- unused | ||
- wastedassign | ||
|
||
# | ||
# Disable govet:fieldalignment, re-enable deprecated maligned linter until the | ||
# Go team offers more control over the types of checks provided by the | ||
# fieldalignment linter or golangci-lint does so. | ||
# | ||
# See https://github.com/atc0005/go-ci/issues/302 for more information. | ||
# | ||
# disable: | ||
# - maligned | ||
|
||
linters-settings: | ||
gocognit: | ||
# minimal code complexity to report, 30 by default (but we recommend 10-20) | ||
min-complexity: 10 | ||
|
||
gocyclo: | ||
# minimal code complexity to report, 30 by default (but we recommend 10-20) | ||
min-complexity: 15 | ||
|
||
govet: | ||
enable-all: true | ||
disable: | ||
# | ||
# Disable fieldalignment settings until the Go team offers more control over | ||
# the types of checks provided by the fieldalignment linter or golangci-lint | ||
# does so. | ||
# | ||
# See https://github.com/atc0005/go-ci/issues/302 for more information. | ||
# | ||
- fieldalignment | ||
|
||
# Incompatible with Go 1.18 (GH-568) | ||
# https://github.com/golangci/golangci-lint/issues/2649 | ||
- nilness | ||
- unusedwrite | ||
|
||
gocritic: | ||
disable: | ||
# Incompatible with Go 1.18 (GH-568) | ||
# https://github.com/golangci/golangci-lint/issues/2649 | ||
- hugeParam | ||
- rangeValCopy | ||
- typeDefFirst | ||
- paramTypeCombine |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.