mirror of
				https://github.com/gin-gonic/gin.git
				synced 2025-11-04 17:22:12 +08:00 
			
		
		
		
	- Update golangci.yml to use 'any' instead of 'interface{}' in gofmt
- Modify debug.go, plain.go, and render_test.go to use 'any' type
- Improve code readability and follow modern Go conventions
Signed-off-by: Flc <four_leaf_clover@foxmail.com>
		
	
			
		
			
				
	
	
		
			87 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			87 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
version: "2"
 | 
						|
linters:
 | 
						|
  enable:
 | 
						|
    - asciicheck
 | 
						|
    - copyloopvar
 | 
						|
    - dogsled
 | 
						|
    - durationcheck
 | 
						|
    - errorlint
 | 
						|
    - gosec
 | 
						|
    - misspell
 | 
						|
    - nakedret
 | 
						|
    - nilerr
 | 
						|
    - nolintlint
 | 
						|
    - perfsprint
 | 
						|
    - revive
 | 
						|
    - testifylint
 | 
						|
    - usestdlibvars
 | 
						|
    - wastedassign
 | 
						|
  settings:
 | 
						|
    gosec:
 | 
						|
      includes:
 | 
						|
        - G102
 | 
						|
        - G106
 | 
						|
        - G108
 | 
						|
        - G109
 | 
						|
        - G111
 | 
						|
        - G112
 | 
						|
        - G201
 | 
						|
        - G203
 | 
						|
    perfsprint:
 | 
						|
      int-conversion: true
 | 
						|
      err-error: true
 | 
						|
      errorf: true
 | 
						|
      sprintf1: true
 | 
						|
      strconcat: true
 | 
						|
    testifylint:
 | 
						|
      enable-all: true
 | 
						|
  exclusions:
 | 
						|
    generated: lax
 | 
						|
    presets:
 | 
						|
      - comments
 | 
						|
      - common-false-positives
 | 
						|
      - legacy
 | 
						|
      - std-error-handling
 | 
						|
    rules:
 | 
						|
      - linters:
 | 
						|
          - structcheck
 | 
						|
          - unused
 | 
						|
        text: '`data` is unused'
 | 
						|
      - linters:
 | 
						|
          - staticcheck
 | 
						|
        text: 'SA1019:'
 | 
						|
      - linters:
 | 
						|
          - revive
 | 
						|
        text: 'var-naming:'
 | 
						|
      - linters:
 | 
						|
          - revive
 | 
						|
        text: 'exported:'
 | 
						|
      - linters:
 | 
						|
          - gosec
 | 
						|
        path: _test\.go
 | 
						|
      - linters:
 | 
						|
          - revive
 | 
						|
        path: _test\.go
 | 
						|
    paths:
 | 
						|
      - third_party$
 | 
						|
      - builtin$
 | 
						|
      - examples$
 | 
						|
formatters:
 | 
						|
  enable:
 | 
						|
    - gci
 | 
						|
    - gofmt
 | 
						|
    - gofumpt
 | 
						|
    - goimports
 | 
						|
  settings:
 | 
						|
    gofmt:
 | 
						|
      rewrite-rules:
 | 
						|
        - pattern: 'interface{}'
 | 
						|
          replacement: 'any'
 | 
						|
  exclusions:
 | 
						|
    generated: lax
 | 
						|
    paths:
 | 
						|
      - third_party$
 | 
						|
      - builtin$
 | 
						|
      - examples$
 | 
						|
      - gin.go
 |