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
13 changes: 11 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
---
version: "2"

linters:
default: standard
enable:
- godoclint
- unparam
- goheader
disable:
- errcheck
settings:
Expand All @@ -14,19 +17,25 @@ linters:
options:
max-len:
length: 100
goheader:
template: |-
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at https://mozilla.org/MPL/2.0/.

formatters:
enable:
- gofmt
- golines
- goimports
- golines
settings:
golines:
max-len: 100
shorten-comments: true
goimports:
local-prefixes:
- github.com/oxidecomputer/terraform-provider-oxide
exclusions:
generated: disable

run:
timeout: 5m
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ fmt: golangci-fmt terrafmt-fmt docs
golangci-fmt:
@ echo "-> Formatting Go code"
@ $(GO_TOOL) golangci-lint fmt
@ $(GO_TOOL) golangci-lint run --enable-only=goheader --fix

.PHONY: terrafmt
terrafmt:
Expand Down
4 changes: 4 additions & 0 deletions internal/provider/address_lot/resource_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

package addresslot_test

import (
Expand Down
4 changes: 4 additions & 0 deletions internal/provider/credentials/function.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

package credentials

import (
Expand Down
4 changes: 4 additions & 0 deletions internal/provider/credentials/function_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

package credentials_test

import (
Expand Down
4 changes: 4 additions & 0 deletions internal/provider/instance/resource_v1.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

package instance

import (
Expand Down
4 changes: 4 additions & 0 deletions internal/provider/provider_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

package provider_test

import (
Expand Down
4 changes: 4 additions & 0 deletions internal/provider/shared/planmodifiers.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

package shared

import (
Expand Down
4 changes: 2 additions & 2 deletions internal/provider/vpc_firewall_rules/resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ func TestAccCloudResourceFirewallRules_full(t *testing.T) {
},
{
Config: configUpdate2,
Check: checkResourceUpdate2(resourceName, vpcName),
Check: checkResourceUpdate2(resourceName),
},
{
Config: configUpdate3,
Expand Down Expand Up @@ -650,7 +650,7 @@ func checkResourceUpdate(resourceName string) resource.TestCheckFunc {
}...)
}

func checkResourceUpdate2(resourceName, vpcName string) resource.TestCheckFunc {
func checkResourceUpdate2(resourceName string) resource.TestCheckFunc {
return resource.ComposeAggregateTestCheckFunc([]resource.TestCheckFunc{
resource.TestCheckResourceAttrSet(resourceName, "id"),
resource.TestCheckResourceAttrSet(resourceName, "vpc_id"),
Expand Down
Loading