You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The gocyclo pre-commit hook (.pre-commit-config.yaml, gocyclo -over 10) runs --all-files in the pre-commit CI workflow, so it evaluates the whole repo on every PR. Four pre-existing AWS service-client functions sit at cyclomatic complexity 11, above the hook's threshold of 10, which keeps the pre-commit CI job red on every PR regardless of what the PR changes.
Why this isn't covered by existing lint-debt issues
golangci-lint also runs gocyclo, but its threshold is min-complexity: 15 (.golangci.yml), so the Lint Code job and the golangci burn-down (#1342) do not flag these functions. They are only caught by the stricter pre-commit hook (-over 10). No existing issue tracks this threshold gap.
Align the pre-commit gocyclo -over threshold with golangci's min-complexity (15) so the two gates agree, if 15 is the intended project standard.
Option 1 is preferred (lower complexity is the real goal); option 2 is a config-only stopgap.
Context
Surfaced by the pre-commit CI job on PR #1376 (the new per-package gosec hook). #1376 does not touch any Go code — this is pre-existing repo-wide debt caught by the --all-files run.
Activity
cristim commentedon Jul 16, 2026
Fixed in PR #1389: #1389
Merge pull request #1389 from LeanerCloud/fix/gocyclo-aws-client-funcs