mirror of
				https://github.com/coredns/coredns.git
				synced 2025-10-27 00:04:15 -04:00 
			
		
		
		
	* perf: avoid string concatenation in loops Apply perfpsrint linter Signed-off-by: Philippe Antoine <contact@catenacyber.fr> * ci: enable perfsprint Signed-off-by: Philippe Antoine <contact@catenacyber.fr> --------- Signed-off-by: Philippe Antoine <contact@catenacyber.fr>
		
			
				
	
	
		
			120 lines
		
	
	
		
			2.1 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			120 lines
		
	
	
		
			2.1 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
| version: "2"
 | |
| 
 | |
| issues:
 | |
|   max-issues-per-linter: 0
 | |
|   max-same-issues: 0
 | |
| 
 | |
| linters:
 | |
|   default: none
 | |
|   enable:
 | |
|     - canonicalheader
 | |
|     - copyloopvar
 | |
|     - durationcheck
 | |
|     - govet
 | |
|     - ineffassign
 | |
|     - intrange
 | |
|     - nakedret
 | |
|     - nolintlint
 | |
|     - perfsprint
 | |
|     - prealloc
 | |
|     - protogetter
 | |
|     - staticcheck
 | |
|     - thelper
 | |
|     - unconvert
 | |
|     - unused
 | |
|     - usetesting
 | |
|     - wastedassign
 | |
|     - whitespace
 | |
|   exclusions:
 | |
|     generated: lax
 | |
|     presets:
 | |
|       - comments
 | |
|       - common-false-positives
 | |
|       - legacy
 | |
|       - std-error-handling
 | |
|     rules:
 | |
|       # Exclude some linters from running on tests files.
 | |
|       - path: _test\.go
 | |
|         linters:
 | |
|           - perfsprint
 | |
|   settings:
 | |
|     govet:
 | |
|       enable:
 | |
|         - nilness
 | |
|     perfsprint:
 | |
|       error-format: false
 | |
|     revive:
 | |
|       rules:
 | |
|         - name: blank-imports
 | |
| 
 | |
|         - name: context-as-argument
 | |
|           arguments:
 | |
|             - allowTypesBefore: "*testing.T"
 | |
| 
 | |
|         - name: context-keys-type
 | |
| 
 | |
|         - name: dot-imports
 | |
| 
 | |
|         - name: early-return
 | |
|           arguments:
 | |
|             - "preserveScope"
 | |
| 
 | |
|         - name: empty-block
 | |
|           disabled: true
 | |
| 
 | |
|         - name: error-naming
 | |
| 
 | |
|         - name: error-return
 | |
| 
 | |
|         - name: error-strings
 | |
| 
 | |
|         - name: errorf
 | |
| 
 | |
|         - name: increment-decrement
 | |
| 
 | |
|         - name: indent-error-flow
 | |
|           arguments:
 | |
|             - "preserveScope"
 | |
| 
 | |
|         - name: range
 | |
| 
 | |
|         - name: receiver-naming
 | |
| 
 | |
|         - name: redefines-builtin-id
 | |
|           disabled: true
 | |
| 
 | |
|         - name: superfluous-else
 | |
|           arguments:
 | |
|             - "preserveScope"
 | |
| 
 | |
|         - name: time-naming
 | |
|           disabled: true
 | |
| 
 | |
|         - name: unexported-return
 | |
|           disabled: true
 | |
| 
 | |
|         - name: unnecessary-stmt
 | |
| 
 | |
|         - name: unreachable-code
 | |
| 
 | |
|         - name: unused-parameter
 | |
|           arguments:
 | |
|             - allowRegex: "^_"
 | |
| 
 | |
|         - name: use-any
 | |
| 
 | |
|         - name: var-declaration
 | |
| 
 | |
|         - name: var-naming
 | |
|           disabled: true
 | |
|           arguments:
 | |
|             - ["ID"]
 | |
|             - ["VM"]
 | |
|             - - upperCaseConst: true
 | |
| 
 | |
| formatters:
 | |
|   enable:
 | |
|     - gofmt
 | |
|   exclusions:
 | |
|     generated: lax
 |