Skip to content

Commit

Permalink
Update linter
Browse files Browse the repository at this point in the history
  • Loading branch information
survivorbat committed Jan 8, 2025
1 parent fed69d4 commit 4ed42a5
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 85 deletions.
101 changes: 16 additions & 85 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,88 +25,19 @@ linters-settings:
- fieldalignment

linters:
enable:
- asasalint
- asciicheck
- bidichk
- bodyclose
- canonicalheader
- containedctx
- contextcheck
- copyloopvar
- cyclop
- decorder
- dogsled
- dupword
- durationcheck
- errcheck
- errchkjson
- errname
- errorlint
- exhaustive
- forbidigo
- ginkgolinter
- gocheckcompilerdirectives
- gochecknoinits
- gocognit
- goconst
- gocritic
- gocyclo
- err113
- gofmt
- gofumpt
- goheader
- goimports
- gomoddirectives
- gomodguard
- goprintffuncname
- gosec
- gosimple
- gosmopolitan
- govet
- grouper
- importas
- ineffassign
- interfacebloat
- intrange
- ireturn
- loggercheck
- maintidx
- makezero
- mirror
- misspell
- mnd
- musttag
- nakedret
- nestif
- nilerr
- nilnil
- nlreturn
- nolintlint
- nonamedreturns
- nosprintfhostport
- paralleltest
- perfsprint
- prealloc
- predeclared
- promlinter
- reassign
- revive
- rowserrcheck
- spancheck
- sqlclosecheck
- staticcheck
- tagalign
- tagliatelle
- tenv
- testifylint
- thelper
- tparallel
- typecheck
- unconvert
- unparam
- unused
- usestdlibvars
- wastedassign
- whitespace
- zerologlint
enable-all: true
disable:
# Disabled because they're too strict
- gochecknoglobals # We sometimes use global variables for ease of use
- depguard # Unnecessary check
- exhaustruct # We don't always have to fill all fields
- lll # We don't enforce line lengths
- wsl # Too strict about statement placement
- wrapcheck # We don't enforce wrapping
- varnamelen # We don't enforce var name length
- testpackage # We don't use test packages
- funlen # We don't enforce the length of a function
- exportloopref # Deprecated and no longer required in 1.22
- godot # Too strict
- godox # We allow TODOs

2 changes: 2 additions & 0 deletions schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ import (
const nullValue = "null"

// scheYAML turns the schema into an example yaml tree, using fields such as default, description and examples.
//
//nolint:cyclop // Slightly higher than allowed, but readable enough
func scheYAML(rootSchema *jsonschema.Schema, cfg *Config) (*yaml.Node, error) {
result := new(yaml.Node)

Expand Down

0 comments on commit 4ed42a5

Please sign in to comment.