Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
version: "2"

run:
Comment thread
kadupoornima marked this conversation as resolved.
timeout: 5m
tests: true

linters:
disable-all: true
enable:
- errcheck # checks for unchecked errors
- govet # standard go vet checks
- ineffassign # detects ineffectual assignments
- staticcheck # advanced static analysis
- unused # checks for unused constants, variables, functions, and types

- revive # highly configurable, extensible linter (successor to golint)
- goconst # finds repeated strings that could be constants
- gocritic # checks for bugs, performance and style issues
- gocyclo # checks cyclomatic complexity of functions

linters-settings:
gocyclo:
min-complexity: 13 # Aligned with the project's pre-commit go-cyclo threshold

Check failure on line 24 in .golangci.yml

View workflow job for this annotation

GitHub Actions / pre-commit-highest-dependencies

24:5 [indentation] wrong indentation: expected 2 but found 4

Check failure on line 24 in .golangci.yml

View workflow job for this annotation

GitHub Actions / pre-commit

24:5 [indentation] wrong indentation: expected 2 but found 4
revive:
rules:
- name: exported
disabled: true # Can be enabled later to enforce public API documentation
- name: blank-imports
- name: context-as-argument
- name: context-keys-type
- name: dot-imports
- name: error-return
- name: error-strings
- name: error-naming
- name: if-return
- name: increment-decrement
- name: var-naming

Check failure on line 38 in .golangci.yml

View workflow job for this annotation

GitHub Actions / pre-commit-highest-dependencies

38:1 [trailing-spaces] trailing spaces

Check failure on line 38 in .golangci.yml

View workflow job for this annotation

GitHub Actions / pre-commit

38:1 [trailing-spaces] trailing spaces
- name: var-declaration
- name: package-comments
disabled: true

Check failure on line 41 in .golangci.yml

View workflow job for this annotation

GitHub Actions / pre-commit-highest-dependencies

41:7 [indentation] wrong indentation: expected 4 but found 6

Check failure on line 41 in .golangci.yml

View workflow job for this annotation

GitHub Actions / pre-commit

41:7 [indentation] wrong indentation: expected 4 but found 6

gocritic:
enabled-tags:
- diagnostic
- style
- performance
disabled-checks:
- ifElseChain
- singleCaseSwitch

issues:
exclude-rules:
# Relax linting rules slightly for test files to reduce noise
- path: _test\.go
linters:
- errcheck
- goconst
- gocritic

Check failure on line 59 in .golangci.yml

View workflow job for this annotation

GitHub Actions / pre-commit-highest-dependencies

59:7 [indentation] wrong indentation: expected 4 but found 6

Check failure on line 59 in .golangci.yml

View workflow job for this annotation

GitHub Actions / pre-commit

59:7 [indentation] wrong indentation: expected 4 but found 6
Loading