ci: add golangci-lint + fix lints (#120)
				
					
				
			* ci: add `golangci-lint` + fix lints * switched order
This commit is contained in:
		
							parent
							
								
									b915d9f8e1
								
							
						
					
					
						commit
						fa8056ce94
					
				
							
								
								
									
										4
									
								
								.github/workflows/test.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								.github/workflows/test.yml
									
									
									
									
										vendored
									
									
								
							| @ -29,6 +29,10 @@ jobs: | ||||
|           cache: true | ||||
|       - run: go mod download | ||||
|       - run: go build -v . | ||||
|       - name: Run linters | ||||
|         uses: golangci/golangci-lint-action@08e2f20817b15149a52b5b3ebe7de50aff2ba8c5 # v3.4.0 | ||||
|         with: | ||||
|           version: latest | ||||
| 
 | ||||
|   generate: | ||||
|     runs-on: ubuntu-latest | ||||
|  | ||||
							
								
								
									
										27
									
								
								.golangci.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								.golangci.yml
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,27 @@ | ||||
| # Visit https://golangci-lint.run/ for usage documentation | ||||
| # and information on other useful linters | ||||
| issues: | ||||
|   max-per-linter: 0 | ||||
|   max-same-issues: 0 | ||||
| 
 | ||||
| linters: | ||||
|   disable-all: true | ||||
|   enable: | ||||
|     - durationcheck | ||||
|     - errcheck | ||||
|     - exportloopref | ||||
|     - forcetypeassert | ||||
|     - godot | ||||
|     - gofmt | ||||
|     - gosimple | ||||
|     - ineffassign | ||||
|     - makezero | ||||
|     - misspell | ||||
|     - nilerr | ||||
|     - predeclared | ||||
|     - staticcheck | ||||
|     - tenv | ||||
|     - unconvert | ||||
|     - unparam | ||||
|     - unused | ||||
|     - vet | ||||
| @ -11,7 +11,7 @@ import ( | ||||
| 	"github.com/hashicorp/terraform-plugin-log/tflog" | ||||
| ) | ||||
| 
 | ||||
| // Ensure provider defined types fully satisfy framework interfaces
 | ||||
| // Ensure provider defined types fully satisfy framework interfaces.
 | ||||
| var _ datasource.DataSource = &ExampleDataSource{} | ||||
| 
 | ||||
| func NewExampleDataSource() datasource.DataSource { | ||||
|  | ||||
| @ -14,7 +14,7 @@ import ( | ||||
| 	"github.com/hashicorp/terraform-plugin-log/tflog" | ||||
| ) | ||||
| 
 | ||||
| // Ensure provider defined types fully satisfy framework interfaces
 | ||||
| // Ensure provider defined types fully satisfy framework interfaces.
 | ||||
| var _ resource.Resource = &ExampleResource{} | ||||
| var _ resource.ResourceWithImportState = &ExampleResource{} | ||||
| 
 | ||||
|  | ||||
							
								
								
									
										6
									
								
								main.go
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								main.go
									
									
									
									
									
								
							| @ -21,11 +21,11 @@ import ( | ||||
| 
 | ||||
| var ( | ||||
| 	// these will be set by the goreleaser configuration
 | ||||
| 	// to appropriate values for the compiled binary
 | ||||
| 	// to appropriate values for the compiled binary.
 | ||||
| 	version string = "dev" | ||||
| 
 | ||||
| 	// goreleaser can also pass the specific commit if you want
 | ||||
| 	// commit  string = ""
 | ||||
| 	// goreleaser can pass other information to the main package, such as the specific commit
 | ||||
| 	// https://goreleaser.com/cookbooks/using-main.version/
 | ||||
| ) | ||||
| 
 | ||||
| func main() { | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Austin Valle
						Austin Valle