run: timeout: 10m tests: true modules-download-mode: readonly linters: enable: # Enabled by default - errcheck # Unchecked errors - gosimple # Simplify code - govet # Suspicious constructs - ineffassign # Ineffectual assignments - staticcheck # Go static analysis - typecheck # Type checking - unused # Unused code # Additional linters for V2 - bodyclose # Close HTTP response bodies - cyclop # Cyclomatic complexity - dupl # Duplicate code - errname # Error naming conventions - exhaustive # Exhaustive switch statements - exportloopref # Loop variable references - gochecknoinits # No init functions - gocognit # Cognitive complexity - goconst # Repeated strings as constants - gocritic # Comprehensive checks - gocyclo # Cyclomatic complexity - godot # Comment punctuation - gofmt # Format code - goimports # Import organization - gomnd # Magic numbers - goprintffuncname # Printf-like function naming - gosec # Security issues - lll # Long lines - makezero # Slice initialization - misspell # Misspellings - nakedret # Naked returns - nestif # Deeply nested if statements - nilerr # Nil error returns - noctx # HTTP requests without context - nolintlint # Nolint directives - prealloc # Slice preallocation - predeclared # Predeclared identifier shadowing - revive # Golint replacement - rowserrcheck # SQL rows.Err checking - sqlclosecheck # SQL Close() checking - stylecheck # Style checking - thelper # Test helper detection - unconvert # Unnecessary type conversions - unparam # Unused function parameters - wastedassign # Wasted assignments - whitespace # Whitespace issues linters-settings: cyclop: max-complexity: 15 skip-tests: true gocognit: min-complexity: 20 gocyclo: min-complexity: 15 goconst: min-len: 3 min-occurrences: 3 ignore-tests: true gocritic: enabled-tags: - diagnostic - experimental - opinionated - performance - style goimports: local-prefixes: github.com/your-org/mev-bot gomnd: settings: mnd: checks: - argument - case - condition - operation - return - assign ignored-numbers: - '0' - '1' - '2' - '10' - '100' - '1000' ignored-functions: - 'big.NewInt' - 'big.NewFloat' - 'time.After' - 'time.Sleep' - 'time.Duration' gosec: severity: medium confidence: medium excludes: - G104 # Audit errors not checked (handled by errcheck) - G304 # File path provided as taint input (false positives) lll: line-length: 120 tab-width: 4 misspell: locale: US ignore-words: - arbitrum - uniswap - camelot nakedret: max-func-lines: 30 nestif: min-complexity: 4 revive: rules: - name: blank-imports - name: context-as-argument - name: context-keys-type - name: dot-imports - name: error-return - name: error-strings - name: error-naming - name: exported - name: if-return - name: increment-decrement - name: var-naming - name: var-declaration - name: package-comments - name: range - name: receiver-naming - name: time-naming - name: unexported-return - name: indent-error-flow - name: errorf - name: empty-block - name: superfluous-else - name: unused-parameter - name: unreachable-code - name: redefines-builtin-id stylecheck: checks: ["all", "-ST1000", "-ST1003"] dot-import-whitelist: - fmt initialisms: - ACL - API - ASCII - CPU - CSS - DNS - EOF - GUID - HTML - HTTP - HTTPS - ID - IP - JSON - QPS - RAM - RPC - SLA - SMTP - SQL - SSH - TCP - TLS - TTL - UDP - UI - GID - UID - UUID - URI - URL - UTF8 - VM - XML - XMPP - XSRF - XSS - ABI - DEX - MEV - RLP unparam: check-exported: false issues: exclude-use-default: false exclude-rules: # Exclude some linters from running on tests files - path: _test\.go linters: - gocyclo - errcheck - dupl - gosec - goconst - gomnd - lll # Exclude known issues - path: pkg/legacy/ linters: - staticcheck - gocritic # Exclude duplicate code in protocol parsers (expected similarity) - path: pkg/parsers/ linters: - dupl # Allow long lines in generated code - path: pkg/generated/ linters: - lll max-issues-per-linter: 0 max-same-issues: 0 output: format: colored-line-number print-issued-lines: true print-linter-name: true uniq-by-line: true sort-results: true