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 linter #1379

Merged
merged 1 commit into from
Mar 27, 2021
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: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:
runs-on: ubuntu-latest
env:
GO_VERSION: 1.16
GOLANGCI_LINT_VERSION: v1.38.0
GOLANGCI_LINT_VERSION: v1.39.0
HUGO_VERSION: 0.54.0
SEIHON_VERSION: v0.5.1
SEIHON_VERSION: v0.8.3
CGO_ENABLED: 0
LEGO_E2E_TESTS: CI
MEMCACHED_HOSTS: localhost:11211
Expand Down
30 changes: 15 additions & 15 deletions .golangci.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,29 +46,28 @@
disable = [
"interfacer", # deprecated
"maligned", # deprecated
"scopelint", # deprecated
"cyclop", # duplicate of gocyclo
"lll",
"gas",
"dupl",
"prealloc",
"scopelint",
"bodyclose",
"wsl",
"stylecheck",
"gosec",
"dupl", # not relevant
"prealloc", # too many false-positive
"bodyclose", # too many false-positive
"gomnd",
"testpackage", # not relevant
"tparallel", # not relevant
"paralleltest", # not relevant
"nestif", # too many false-positive
"wrapcheck",
"goerr113", # not relevant
"noctx",
"nlreturn", # not relevant
"wrapcheck",
"tparallel", # not relevant
"paralleltest", # not relevant
"exhaustivestruct", # too many false-positive
"wsl", # not relevant
"exhaustive", # not relevant
"exhaustivestruct", # not relevant
"makezero", # not relevant
"forbidigo", # not relevant
"ifshort", # not relevant
"cyclop", # duplicate of gocyclo
"wastedassign", # false-positive https://github.com/sanposhiho/wastedassign/issues/21
"forbidigo", # not relevant
"noctx",
"forcetypeassert",
]

Expand All @@ -79,6 +78,7 @@
exclude = [
"Error return value of .((os\\.)?std(out|err)\\..*|.*Close|.*Flush|os\\.Remove(All)?|.*printf?|os\\.(Un)?Setenv). is not checked",
"exported (type|method|function) (.+) should have comment or be unexported",
"ST1000: at least one file in a package should have a package comment"
]
[[issues.exclude-rules]]
path = "(.+)_test.go"
Expand Down
2 changes: 1 addition & 1 deletion providers/dns/constellix/internal/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ type Record struct {
ParentID int `json:"parentId,omitempty"`
Parent string `json:"parent,omitempty"`
Source string `json:"source,omitempty"`
ModifiedTs int64 `json:"modifiedTs,omitempty"`
ModifiedTS int64 `json:"modifiedTs,omitempty"`
Value []RecordValue `json:"value,omitempty"`
RoundRobin []RecordValue `json:"roundRobin,omitempty"`
}
Expand Down
2 changes: 1 addition & 1 deletion providers/dns/constellix/internal/txtrecords_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func TestTxtRecordService_Get(t *testing.T) {
ParentID: 273302,
Parent: "domain",
Source: "Domain",
ModifiedTs: 1580908547863,
ModifiedTS: 1580908547863,
Value: []RecordValue{{
Value: `"test"`,
}},
Expand Down
10 changes: 8 additions & 2 deletions providers/dns/otc/mock_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,14 @@ func (m *DNSServerMock) HandleListRecordsetsSuccessfully() {

body, err := ioutil.ReadAll(r.Body)
assert.Nil(m.t, err)
exceptedString := "{\"name\":\"_acme-challenge.example.com.\",\"description\":\"Added TXT record for ACME dns-01 challenge using lego client\",\"type\":\"TXT\",\"ttl\":300,\"records\":[\"\\\"w6uP8Tcg6K2QR905Rms8iXTlksL6OD1KOWBxTK7wxPI\\\"\"]}"
assert.Equal(m.t, string(body), exceptedString)
exceptedString := `{
"name": "_acme-challenge.example.com.",
"description": "Added TXT record for ACME dns-01 challenge using lego client",
"type": "TXT",
"ttl": 300,
"records": ["\"w6uP8Tcg6K2QR905Rms8iXTlksL6OD1KOWBxTK7wxPI\""]
}`
assert.JSONEq(m.t, string(body), exceptedString)
fmt.Fprintf(w, `{
"recordsets":[{
"id":"321321"
Expand Down