Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update golanglint-ci #13445

Merged
merged 3 commits into from
Jun 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.52.2
version: v1.53.2
args: --timeout 15m0s --verbose --out-${NO_FUTURE}format tab
63 changes: 24 additions & 39 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
linters:
disable-all: true
enable:
# - telegraflinter
- asasalint
- asciicheck
- bidichk
Expand Down Expand Up @@ -39,44 +38,30 @@ linters:

linters-settings:
depguard:
# Kind of list is passed in.
# Allowed values: allowlist|denylist
# Default: denylist
list-type: denylist
# Check the list against standard lib.
# Default: false
include-go-root: true
# A list of packages for the list type specified.
# Can accept both string prefixes and string glob patterns.
# Default: []
packages:
- log
# A list of packages for the list type specified.
# Specify an error message to output when a denied package is used.
# Default: []
packages-with-error-message:
- log: 'Use injected telegraf.Logger instead'
# Specify rules by which the linter ignores certain files for consideration.
# Can accept both string prefixes and string glob patterns.
# The ! character in front of the rule is a special character
# which signals that the linter should negate the rule.
# This allows for more precise control, but it is only available for glob patterns.
# Default: []
ignore-file-rules:
- "**/agent/**"
- "**/cmd/**"
- "**/config/**"
- "**/filter/**"
- "**/internal/**"
- "**/logger/**"
- "**/metric/**"
- "**/models/**"
- "**/plugins/serializers/**"
- "**/scripts/**"
- "**/selfstat/**"
- "**/testutil/**"
- "**/tools/**"
- "**/*_test.go"
rules:
# Name of a rule.
main:
# Packages that are not allowed where the value is a suggestion.
deny:
- pkg: log
desc: 'Use injected telegraf.Logger instead'
# List of file globs that will match this list of settings to compare against.
# Default: $all
files:
- "!**/agent/**"
- "!**/cmd/**"
- "!**/config/**"
- "!**/filter/**"
- "!**/internal/**"
- "!**/logger/**"
- "!**/metric/**"
- "!**/models/**"
- "!**/plugins/serializers/**"
- "!**/scripts/**"
- "!**/selfstat/**"
- "!**/testutil/**"
- "!**/tools/**"
- "!**/*_test.go"
errcheck:
# List of functions to exclude from checking, where each entry is a single function to exclude.
# See https://github.com/kisielk/errcheck#excluding-functions for details.
Expand Down
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ representative at an online or offline event.

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
[email protected].
`[email protected]`.

All complaints will be reviewed and investigated promptly and fairly.

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ vet:
.PHONY: lint-install
lint-install:
@echo "Installing golangci-lint"
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.52.2
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.53.2

@echo "Installing markdownlint"
npm install -g markdownlint-cli
Expand Down
9 changes: 7 additions & 2 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,10 @@

## Reporting a Vulnerability

InfluxData takes security and our users' trust very seriously. If you believe you have found a security issue in any of our open source projects,
please responsibly disclose it by contacting [email protected]. More details about security vulnerability reporting, including our GPG key, can be found [here](https://www.influxdata.com/how-to-report-security-vulnerabilities/).
InfluxData takes security and our users' trust very seriously. If you believe
you have found a security issue in any of our open source projects, please
responsibly disclose it by contacting `[email protected]`. More details
about security vulnerability reporting, including our GPG key, can be found
on the [InfluxData How to Report Vulnerabilities page][InfluxData Security].

[InfluxData Security]: https://www.influxdata.com/how-to-report-security-vulnerabilities/