version: "2"
linters:
  settings:
    gocritic:
      disable-all: true
      enabled-checks:
        - appendAssign
        - appendCombine
        - argOrder
        - assignOp
        - badCall
        - badCond
        - badLock
        - badRegexp
        - badSorting
        - badSyncOnceFunc
        - boolExprSimplify
        - builtinShadow
        - builtinShadowDecl
        - captLocal
        - caseOrder
        - codegenComment
        - commentFormatting
        - commentedOutCode
        - commentedOutImport
        - defaultCaseOrder
        - deferInLoop
        - deferUnlambda
        - deprecatedComment
        - docStub
        - dupArg
        - dupBranchBody
        - dupCase
        - dupImport
        - dupSubExpr
        - dynamicFmtString
        - elseif
        - emptyDecl
        - emptyFallthrough
        - emptyStringTest
        - equalFold
        - evalOrder
        - exitAfterDefer
        - exposedSyncMutex
        - externalErrorReassign
        - filepathJoin
        - flagDeref
        - flagName
        - hexLiteral
        - httpNoBody
        - hugeParam
        - ifElseChain
        - importShadow
        - indexAlloc
        - initClause
        - mapKey
        - methodExprCall
        - nestingReduce
        - newDeref
        - nilValReturn
        - octalLiteral
        - offBy1
        - paramTypeCombine
        - preferDecodeRune
        - preferFilepathJoin
        - preferFprint
        - preferStringWriter
        - preferWriteByte
        - ptrToRefParam
        - rangeAppendAll
        - rangeExprCopy
        - rangeValCopy
        - redundantSprint
        - regexpMust
        - regexpPattern
        - regexpSimplify
        - returnAfterHttpError
        - ruleguard
        - singleCaseSwitch
        - sliceClear
        - sloppyLen
        - sloppyReassign
        - sloppyTypeAssert
        - sortSlice
        - sprintfQuotedString
        - sqlQuery
        - stringConcatSimplify
        - stringXbytes
        - stringsCompare
        - switchTrue
        - syncMapLoadAndDelete
        - timeExprSimplify
        - todoCommentWithoutDetail
        - tooManyResultsChecker
        - truncateCmp
        - typeAssertChain
        - typeDefFirst
        - typeSwitchVar
        - typeUnparen
        - uncheckedInlineErr
        - underef
        - unlabelStmt
        - unlambda
        - unnamedResult
        - unnecessaryBlock
        - unnecessaryDefer
        - unslice
        - valSwap
        - weakCond
        - whyNoLint
        - wrapperFunc
        - yodaStyleExpr
      enable-all: true
      disabled-checks:
        - appendAssign
        - appendCombine
        - argOrder
        - assignOp
        - badCall
        - badCond
        - badLock
        - badRegexp
        - badSorting
        - badSyncOnceFunc
        - boolExprSimplify
        - builtinShadow
        - builtinShadowDecl
        - captLocal
        - caseOrder
        - codegenComment
        - commentFormatting
        - commentedOutCode
        - commentedOutImport
        - defaultCaseOrder
        - deferInLoop
        - deferUnlambda
        - deprecatedComment
        - docStub
        - dupArg
        - dupBranchBody
        - dupCase
        - dupImport
        - dupSubExpr
        - dynamicFmtString
        - elseif
        - emptyDecl
        - emptyFallthrough
        - emptyStringTest
        - equalFold
        - evalOrder
        - exitAfterDefer
        - exposedSyncMutex
        - externalErrorReassign
        - filepathJoin
        - flagDeref
        - flagName
        - hexLiteral
        - httpNoBody
        - hugeParam
        - ifElseChain
        - importShadow
        - indexAlloc
        - initClause
        - mapKey
        - methodExprCall
        - nestingReduce
        - newDeref
        - nilValReturn
        - octalLiteral
        - offBy1
        - paramTypeCombine
        - preferDecodeRune
        - preferFilepathJoin
        - preferFprint
        - preferStringWriter
        - preferWriteByte
        - ptrToRefParam
        - rangeAppendAll
        - rangeExprCopy
        - rangeValCopy
        - redundantSprint
        - regexpMust
        - regexpPattern
        - regexpSimplify
        - returnAfterHttpError
        - ruleguard
        - singleCaseSwitch
        - sliceClear
        - sloppyLen
        - sloppyReassign
        - sloppyTypeAssert
        - sortSlice
        - sprintfQuotedString
        - sqlQuery
        - stringConcatSimplify
        - stringXbytes
        - stringsCompare
        - switchTrue
        - syncMapLoadAndDelete
        - timeExprSimplify
        - todoCommentWithoutDetail
        - tooManyResultsChecker
        - truncateCmp
        - typeAssertChain
        - typeDefFirst
        - typeSwitchVar
        - typeUnparen
        - uncheckedInlineErr
        - underef
        - unlabelStmt
        - unlambda
        - unnamedResult
        - unnecessaryBlock
        - unnecessaryDefer
        - unslice
        - valSwap
        - weakCond
        - whyNoLint
        - wrapperFunc
        - yodaStyleExpr
      enabled-tags:
        - diagnostic
        - style
        - performance
        - experimental
        - opinionated
      disabled-tags:
        - diagnostic
        - style
        - performance
        - experimental
        - opinionated
      settings:
        captLocal:
          paramsOnly: false
        commentedOutCode:
          minLength: 50
        elseif:
          skipBalanced: false
        hugeParam:
          sizeThreshold: 70
        ifElseChain:
          minThreshold: 4
        nestingReduce:
          bodyWidth: 4
        rangeExprCopy:
          sizeThreshold: 516
          skipTestFuncs: false
        rangeValCopy:
          sizeThreshold: 32
          skipTestFuncs: false
        ruleguard:
          debug: emptyDecl
          disable: myGroupName,#myTagName
          enable: myGroupName,#myTagName
          failOn: dsl,import
          rules: ${base-path}/ruleguard/rules-*.go,${base-path}/myrule1.go
        tooManyResultsChecker:
          maxResults: 10
        truncateCmp:
          skipArchDependent: false
        underef:
          skipRecvDeref: false
        unnamedResult:
          checkExported: true
