Skip to content

Commit 1236071

Browse files
committed
fix: add minimal golangci-lint config to avoid compatibility issues
- Create .golangci.yml with minimal linter set - Disable problematic linters causing goarch errors - Enable only stable, essential linters - Remove args from CI to use config file - Should fix persistent linting failures
1 parent c3de949 commit 1236071

3 files changed

Lines changed: 47 additions & 3 deletions

File tree

.github/workflows/ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ jobs:
3737
uses: golangci/golangci-lint-action@v3
3838
with:
3939
version: ${{ env.GOLANGCI_LINT_VERSION }}
40-
args: --timeout 5m
4140

4241
- name: Check code formatting
4342
run: |

.golangci.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# .golangci.yml
2+
# Minimal configuration to avoid compatibility issues
3+
4+
run:
5+
timeout: 5m
6+
tests: true
7+
build-tags:
8+
- acc
9+
10+
linters:
11+
disable-all: true
12+
enable:
13+
# Enable only stable, essential linters
14+
- errcheck
15+
- gosimple
16+
- govet
17+
- ineffassign
18+
- staticcheck
19+
- typecheck
20+
- unused
21+
- gofmt
22+
- goimports
23+
- misspell
24+
25+
linters-settings:
26+
gofmt:
27+
simplify: true
28+
goimports:
29+
local-prefixes: github.com/Trozz/terraform-provider-pocketid
30+
31+
issues:
32+
exclude-use-default: false
33+
max-same-issues: 0
34+
max-issues-per-linter: 0
35+
36+
# Exclude some linters from running on tests files.
37+
exclude-rules:
38+
- path: _test\.go
39+
linters:
40+
- errcheck
41+
42+
output:
43+
format: colored-line-number
44+
print-issued-lines: true
45+
print-linter-name: true

test/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
terraform {
22
required_providers {
33
pocketid = {
4-
source = "registry.terraform.io/trozz/pocketid"
5-
version = "0.0.1"
4+
source = "Trozz/pocketid"
5+
version = "0.1.0"
66
}
77
}
88
}

0 commit comments

Comments
 (0)