Repository navigation
Clear the SonarCloud findings the 1.1.0 release PR reported - #546
Merged
Merged
Conversation
… broke Sonar S9073: an assert joining several conditions with 'and' reports only that the whole expression was false. One assert per condition keeps the failing check visible in the pytest output.
The generated tables repeated every owner's dotted path once per exported name, up to 58 times for agent_runtime. The generator now emits one module-level constant per owner that more than one binding shares and refers to it, so a moved module is one line in the diff.
Hoisting the setup calls out of the block means it can only pass when the call under test raises.
Hoisting the setup calls out of the block means it can only pass for the call under test.
Hoisting the setup calls out of the block means it can only pass for the call under test.
Hoisting the setup calls out of the block means it can only pass for the call under test.
…tion The command schema registered each spec with its own append call and repeated the same placeholder strings across many fields; group each run of registrations into one extend call and give the shared placeholders a name, as the schema already does for its other hints. The Japanese catalogue and two sync examples get the same treatment for their repeated literals. The built spec list is byte-for-byte unchanged.
Drop exception classes that an except tuple already covers through a base class (AgentTaskError is a ValueError, AuthorizationError an OSError, UnicodeError a ValueError), keeping a note of what the base covers. Name repeated messages and SQL statements, merge nested with statements, replace nested conditional expressions with helpers, and split request_json, merge_buckets, the MCP task handler and the file receiver binding into smaller functions without changing behaviour. Regexes moved to \d / \w are compiled with re.ASCII so they still accept only ASCII digits and identifier characters.
Each contract check (attribute definition, alias resolution, optional loader shape, child collisions, baseline comparison) now lives in its own function, so every step reads on its own and no function exceeds the cognitive complexity budget. The generated bindings are byte-identical and --check still passes.
… modules Name repeated messages, SQL and literals once; drop exception classes an except tuple already covers through a base class; unfold nested conditional expressions and merge directly nested with statements; extract the skill proposal step from the task loop and the config route bodies from their registration so both stay within the complexity budget. Character-class shorthands keep their ASCII-only meaning through re.ASCII, subset tests use issubset() instead of a negated <=, and every intentionally empty authorization scope block now says that entering it is the check. No behaviour changes.
…e-measure the map The owner constant for utils.secret_ref matched bandit's B105 name test. The generator now marks such a constant with a justified nosec, since it binds a module path. architecture_explore.md line counts follow the Sonar cleanup's changes.
Up to standards ✅🟢 Issues
|
The loginctl reader's pair comprehension traded S7494 for S7500; a plain partition loop satisfies both. asset_references returned a one-element, an empty or a sorted tuple; every path now ends in the same sorted return.
|
Merged
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.



SonarCloud listed 2,087 open maintainability findings in the new code of #538. The quality gate passed, but the list was noise for every later review.
Tests (1,616)
assert a and bis now one assert per condition, so a failure names the condition that broke. Done by an AST rewrite of the flagged lines only.pytest.raisesblock now holds only the call under test. Setup calls are hoisted, and branching bodies moved into a local function. Where the hoisted call was itself the one that raised, it stayed inside.Package, scripts, examples (471)
scripts/generate_facade_exports.pynow emits one constant per owner module that the generated bindings repeat (249 findings). The remaining 43 are named constants. A generated owner named like a credential carries a justifiednosec B105.\d/\wregexes kept ASCII-only withre.ASCII, nested conditionals andwithstatements, cognitive-complexity splits, empty blocks given a reason.appendruns becameextend. The built spec list is byte-identical, and most of that file's diff is re-indentation.dataclasses.replaceinferred asDataclassInstance), 4 S7504 (list()snapshots of a dict the loop mutates), 1 S5655, and 1 kotlin S6624.Verification
radon cc -nc,generate_facade_exports.py --check, andtyping_contract_verify.pyin both modes all pass.architecture_explore.mdline counts were re-measured.