Conversation
Solidity keeps the existing Solhint code-complexity limit of 8. Go uses gocyclo and Rust uses rust-code-analysis-cli, both capped at 30 via scripts/complexity-limits.json with explicit exceptions for the two Go test helpers that already exceed it. A source-only `complexity` dev shell and workflow run the checks without building any project code, and the language lint recipes call them as well. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014acn7oFvabzFDqyfnnhHRV Signed-off-by: srdtrk <srdtrk@hotmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds cyclomatic complexity enforcement across all three languages in the repo, run in CI and from the language lint recipes.
code-complexitylimit of 8, now exposed asjust solidity::lint-solhint.gocyclowith a maximum of 30. The twoe2e/interchaintestv8/solana/test_helpers.gohelpers already above that are capped at their current scores inscripts/complexity-limits.json, with reasons.rust-code-analysis-cliwith a maximum of 30, covering SP1, CosmWasm, and Solana workspaces. Nested functions and closures are measured on their own rather than summed into the parent.scripts/check-complexity.pydiscovers source files viagit ls-files(tracked plus new untracked, honouring ignores) and skips generated headers,vendor/generated/target/outdirectories, and symlinks. Exceptions are kept honest: a score that drops below its cap, or a function that disappears, fails the check until the exception is lowered or removed.A new source-only
nix develop .#complexityshell runs the checks without compiling any project code or downloading Go/Cargo dependencies.just lint-goandjust lint-rustalso call the complexity checks, and the analyzers are added to the default shell.Verification
Run inside
nix develop .#complexity:just test-complexityjust lint-complexity-gojust lint-complexity-rustjust solidity::lint-solhintscripts/check-license-headers.sh🤖 Generated with Claude Code
https://claude.ai/code/session_014acn7oFvabzFDqyfnnhHRV