Skip to content
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
4 changes: 3 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ linters:
arguments:
- max-lit-count: "5"
allow-strs: '"","\n"'
allow-ints: "0,1,2,3,256,1024"
allow-ints: "0,1,2,3,256,1024,0o600,0o700,0o755"
allow-floats: "0.0,0.,1.0,1.,2.0,2."
- name: cognitive-complexity
arguments: [50]
Expand All @@ -189,6 +189,8 @@ linters:
disabled: true
- name: max-public-structs
arguments: [10]
- name: flag-parameter # fixes are difficult
disabled: true

rowserrcheck:
# database/sql is always checked.
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ endif
LINTERS :=
FIXERS :=

SHELLCHECK_VERSION ?= v0.8.0
SHELLCHECK_VERSION ?= v0.10.0
SHELLCHECK_BIN := $(LINT_ROOT)/out/linters/shellcheck-$(SHELLCHECK_VERSION)-$(LINT_ARCH)
$(SHELLCHECK_BIN):
mkdir -p $(LINT_ROOT)/out/linters
Expand Down Expand Up @@ -70,7 +70,7 @@ FIXERS += golangci-lint-fix
golangci-lint-fix: $(GOLANGCI_LINT_BIN)
find . -name go.mod -execdir "$(GOLANGCI_LINT_BIN)" run -c "$(GOLANGCI_LINT_CONFIG)" --fix \;

YAMLLINT_VERSION ?= 1.27.1
YAMLLINT_VERSION ?= 1.37.1
YAMLLINT_ROOT := $(LINT_ROOT)/out/linters/yamllint-$(YAMLLINT_VERSION)
YAMLLINT_BIN := $(YAMLLINT_ROOT)/dist/bin/yamllint
$(YAMLLINT_BIN):
Expand Down
4 changes: 2 additions & 2 deletions Makefile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ shellcheck-fix: $(SHELLCHECK_BIN)
{{ end -}}

{{ if .Dockerfile -}}
HADOLINT_VERSION ?= v2.12.0
HADOLINT_VERSION ?= v2.12.1-beta
HADOLINT_BIN := $(LINT_ROOT)/out/linters/hadolint-$(HADOLINT_VERSION)-$(LINT_ARCH)
$(HADOLINT_BIN):
mkdir -p $(LINT_ROOT)/out/linters
Expand All @@ -61,7 +61,7 @@ hadolint-lint: $(HADOLINT_BIN)

{{ if .Go -}}
GOLANGCI_LINT_CONFIG := $(LINT_ROOT)/.golangci.yml
GOLANGCI_LINT_VERSION ?= v2.3.0
GOLANGCI_LINT_VERSION ?= v2.3.1
GOLANGCI_LINT_BIN := $(LINT_ROOT)/out/linters/golangci-lint-$(GOLANGCI_LINT_VERSION)-$(LINT_ARCH)
$(GOLANGCI_LINT_BIN):
mkdir -p $(LINT_ROOT)/out/linters
Expand Down
1 change: 1 addition & 0 deletions lint-install.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ func applicableLinters(root string) (map[Language]bool, error) {
found[Shell] = true
case strings.HasSuffix(path, ".yml"), strings.HasSuffix(path, ".yaml"):
found[YAML] = true
default:
}

return nil
Expand Down