Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into asb/allow-multipl…
Browse files Browse the repository at this point in the history
…e-nolint-linters-to-be-removed
  • Loading branch information
ashanbrown committed Feb 27, 2021
2 parents 864d497 + 5698d46 commit 3c960f1
Show file tree
Hide file tree
Showing 46 changed files with 672 additions and 243 deletions.
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Expand Up @@ -7,13 +7,24 @@ assignees: ''

---

<!--
Thank you for creating the issue!
-->

- [ ] Yes, I'm using a binary release within 2 latest major releases. Only such installations are supported.
- [ ] Yes, I've searched similar issues on GitHub and didn't find any.
- [ ] Yes, I've included all information below (version, config, etc).
- [ ] Yes, I've tried with the standalone linter if available. (https://golangci-lint.run/usage/linters/)

<!--
Please include the following information:
-->

<details><summary>Description of the problem</summary>

Your description

</details>

<details><summary>Version of golangci-lint</summary>

Expand Down Expand Up @@ -51,3 +62,11 @@ $ golangci-lint run -v
```

</details>

<details><summary>Code example or link to a public repository</summary>

```go
// add your code here
```

</details>
2 changes: 1 addition & 1 deletion .github/workflows/pr-extra.yml
Expand Up @@ -16,4 +16,4 @@ jobs:
- name: Run go list
run: go list -json -m all > go.list
- name: Nancy
uses: sonatype-nexus-community/nancy-github-action@1.0.1
uses: sonatype-nexus-community/nancy-github-action@v1.0.2
8 changes: 7 additions & 1 deletion .golangci.example.yml
Expand Up @@ -231,7 +231,7 @@ linters-settings:
regexp:
# define here regexp type values, for example
# AUTHOR: .*@mycompany\.com
template: # |
template: # |-
# put here copyright header template for source code files, for example:
# Note: {{ YEAR }} is a builtin value that returns the year relative to the current machine time.
#
Expand Down Expand Up @@ -297,6 +297,7 @@ linters-settings:
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf

# enable or disable analyzers by name
# run `go tool vet help` to see all analyzers
enable:
- atomicalign
enable-all: false
Expand Down Expand Up @@ -443,6 +444,11 @@ linters-settings:
- ginkgo\\.F.* # these are used just for local development
# Exclude godoc examples from forbidigo checks. Default is true.
exclude_godoc_examples: false
importas:
# using `servingv1` alias for `knative.dev/serving/pkg/apis/serving/v1` package
servingv1: knative.dev/serving/pkg/apis/serving/v1
# using `autoscalingv1alpha1` alias for `knative.dev/serving/pkg/apis/autoscaling/v1alpha1` package
autoscalingv1alpha1: knative.dev/serving/pkg/apis/autoscaling/v1alpha1

# The custom section can be used to define linter plugins to be loaded at runtime. See README doc
# for more info.
Expand Down
14 changes: 13 additions & 1 deletion .golangci.yml
Expand Up @@ -88,7 +88,6 @@ linters:
- gosimple
- govet
- ineffassign
- interfacer
- lll
- misspell
- nakedret
Expand All @@ -113,6 +112,7 @@ linters:
# - godot
# - godox
# - goerr113
# - interfacer
# - maligned
# - nestif
# - prealloc
Expand All @@ -139,6 +139,18 @@ issues:
- path: pkg/golinters/scopelint.go
text: 'directive `//nolint:interfacer` is unused for linter interfacer'

# TODO temporary rule, must be removed
# related to https://github.com/golangci/golangci-lint/pull/1756
# must be replaced by '//nolint:staticcheck // require changes in github.com/OpenPeeDeeP/depguard'
- path: pkg/golinters/depguard.go
text: 'SA1019: package golang.org/x/tools/go/loader is deprecated'

# TODO temporary rule, must be removed
# related to https://github.com/golangci/golangci-lint/pull/1756
# must be replaced by '///nolint:staticcheck // it's an adapter for golang.org/x/tools/go/packages'
- path: pkg/golinters/goanalysis/adapters.go
text: 'SA1019: package golang.org/x/tools/go/loader is deprecated'

run:
skip-dirs:
- test/testdata_etc
Expand Down
6 changes: 6 additions & 0 deletions docs/src/docs/usage/configuration.mdx
Expand Up @@ -19,6 +19,12 @@ golangci-lint run -h
{.RunHelpText}
```

When the `--cpu-profile-path` or `--mem-profile-path` arguments are specified, `golangci-lint` writes runtime profiling data
in the format expected by the [pprof](https://github.com/google/pprof) visualization tool.

When the `--trace-path` argument is specified, `golangci-lint` writes runtime tracing data in the format expected by
the `go tool trace` command and visualization tool.

## Config File

GolangCI-Lint looks for config files in the following paths from the current working directory:
Expand Down
2 changes: 1 addition & 1 deletion docs/src/docs/usage/integrations.mdx
Expand Up @@ -17,7 +17,7 @@ title: Integrations
Using it in an editor without `--fast` can freeze your editor.
Golangci-lint automatically discovers `.golangci.yml` config for edited file: you don't need to configure it in VS Code settings.

2. Sublime Text - [plugin](https://github.com/alecthomas/SublimeLinter-contrib-golang-cilint) for SublimeLinter.
2. Sublime Text - [plugin](https://github.com/SublimeLinter/SublimeLinter-golangcilint) for SublimeLinter.
3. GoLand
- Install [plugin](https://plugins.jetbrains.com/plugin/12496-go-linter)
- Add [File Watcher](https://www.jetbrains.com/help/go/settings-tools-file-watchers.html) using existing `golangci-lint` template.
Expand Down
24 changes: 14 additions & 10 deletions go.mod
Expand Up @@ -5,14 +5,14 @@ go 1.13
require (
4d63.com/gochecknoglobals v0.0.0-20201008074935-acfc0b28355a
github.com/BurntSushi/toml v0.3.1
github.com/Djarvur/go-err113 v0.0.0-20200511133814-5174e21577d5
github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24
github.com/OpenPeeDeeP/depguard v1.0.1
github.com/alexkohler/prealloc v0.0.0-20210204145425-77a5b5dd9799
github.com/ashanbrown/forbidigo v1.1.0
github.com/ashanbrown/makezero v0.0.0-20201205152432-7b7cdbb3025a
github.com/bkielbasa/cyclop v1.2.0
github.com/bombsimon/wsl/v3 v3.2.0
github.com/charithe/durationcheck v0.0.4
github.com/charithe/durationcheck v0.0.6
github.com/daixiang0/gci v0.2.8
github.com/denis-tingajkin/go-header v0.4.2
github.com/esimonov/ifshort v1.0.1
Expand All @@ -23,19 +23,22 @@ require (
github.com/gofrs/flock v0.8.0
github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2
github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a
github.com/golangci/errcheck v0.0.0-20181223084120-ef45e06d44b6
github.com/golangci/go-misc v0.0.0-20180628070357-927a3d87b613
github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a
github.com/golangci/ineffassign v0.0.0-20190609212857-42439a7714cc
github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0
github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca
github.com/golangci/misspell v0.0.0-20180809174111-950f5d19e770
github.com/golangci/revgrep v0.0.0-20210208091834-cd28932614b5
github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4
github.com/jgautheron/goconst v0.0.0-20201117150253-ccae5bf973f3
github.com/gordonklaus/ineffassign v0.0.0-20210225214923-2e10b2664254
github.com/gostaticanalysis/forcetypeassert v0.0.0-20200621232751-01d4955beaa5
github.com/gostaticanalysis/nilerr v0.1.1
github.com/jgautheron/goconst v1.4.0
github.com/jingyugao/rowserrcheck v0.0.0-20210130005344-c6a0c12dd98d
github.com/jirfag/go-printf-func-name v0.0.0-20191110105641-45db9963cdd3
github.com/kulti/thelper v0.3.1
github.com/julz/importas v0.0.0-20210226073942-60b4fa260dd0
github.com/kisielk/errcheck v1.6.0
github.com/kulti/thelper v0.4.0
github.com/kunwardeep/paralleltest v1.0.2
github.com/kyoh86/exportloopref v0.1.8
github.com/maratori/testpackage v1.0.1
Expand All @@ -54,10 +57,11 @@ require (
github.com/polyfloyd/go-errorlint v0.0.0-20201127212506-19bd8db6546f
github.com/ryancurrah/gomodguard v1.2.0
github.com/ryanrolds/sqlclosecheck v0.3.0
github.com/sanposhiho/wastedassign v0.1.3
github.com/securego/gosec/v2 v2.6.1
github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c
github.com/shirou/gopsutil v0.0.0-20190901111213-e4ec7b275ada // v2.19.8
github.com/sirupsen/logrus v1.7.0
github.com/shirou/gopsutil/v3 v3.21.1
github.com/sirupsen/logrus v1.8.0
github.com/sonatard/noctx v0.0.1
github.com/sourcegraph/go-diff v0.6.1
github.com/spf13/cobra v1.1.3
Expand All @@ -67,7 +71,7 @@ require (
github.com/stretchr/testify v1.7.0
github.com/tdakkota/asciicheck v0.0.0-20200416190851-d7f85be797a2
github.com/tetafro/godot v1.4.4
github.com/timakin/bodyclose v0.0.0-20190930140734-f7f2e9bca95e
github.com/timakin/bodyclose v0.0.0-20200424151742-cb6215831a94
github.com/tomarrell/wrapcheck v0.0.0-20200807122107-df9e8bcb914d
github.com/tommy-muehle/go-mnd/v2 v2.3.1
github.com/ultraware/funlen v0.0.3
Expand All @@ -77,7 +81,7 @@ require (
golang.org/x/text v0.3.4 // indirect
golang.org/x/tools v0.1.0
gopkg.in/yaml.v2 v2.4.0
honnef.co/go/tools v0.0.1-2020.1.6
honnef.co/go/tools v0.1.2
mvdan.cc/gofumpt v0.1.0
mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed
mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b // indirect
Expand Down

0 comments on commit 3c960f1

Please sign in to comment.