fix: resolve the SonarCloud findings from the latest develop scan - #484
Open
devin-ai-integration[bot] wants to merge 7 commits into
Open
devin-ai-integration[bot] wants to merge 7 commits into
devin-ai-integration[bot] wants to merge 7 commits into
Conversation
- syson: compare exported document names by value so duplicates get -1 suffixes\n- java client: rename Condition.equal to Condition.equalTo\n- workflows: npm ci --ignore-scripts for the SysON jobs Co-Authored-By: jason.han <hanhuijun@gmail.com>
Builder for RunResult, verdict-label helper, hoisted asserts, duplicated-literal constants, interface/empty-func/import fixes, CSS rule merge, frontend prop narrowing and handler hoists Co-Authored-By: jason.han <hanhuijun@gmail.com>
Structural extraction only: flagged functions decomposed into named helpers; export split into documentName/exportResource. Co-Authored-By: jason.han <hanhuijun@gmail.com>
Co-Authored-By: jason.han <hanhuijun@gmail.com>
Edit.java uses a private requireTarget over a public constant; input collection returns on first error; outcome keys disambiguate repeats; Maven target dirs ignored Co-Authored-By: jason.han <hanhuijun@gmail.com>
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
Co-Authored-By: jason.han <hanhuijun@gmail.com>
HuiJun
marked this pull request as ready for review
September 21, 2026 05:45
Co-Authored-By: jason.han <hanhuijun@gmail.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.
What and why
The latest SonarCloud analysis of
developfails its quality gate on new-code reliability and security, and reports 149 open findings. This resolves them, gate-breakers first and cognitive complexity last.Gate breakers
ProjectTextExporter.containsDocumentcomparedOptional<String>with aString, so it was always false and two SysON resources with the same file name were exported under one name. Nowname().filter(name::equals).isPresent(); a test pins thefoo.sysml/foo-1.sysmloutcome.Condition.equal(...)is renamedCondition.equalTo(...)(it shadowedObject.equalsin every reader's eye). Callers, docs and a changelog fragment updated.npm ci --ignore-scripts(as the VS Code job already did), andinstall:sysonpasses--ignore-scriptstoo; the build needs no lifecycle scripts.Other findings
RunResultgets aBuilderin place of its 14- and 13-argument constructors.docpdfand the toolchain script are replaced with named constants and small helpers; diagnostic text is unchanged.RunVerdictSummaryTestmoves to the directory of its package;FakeElement.getNamedelegates togetDeclaredName; unused imports, an unnecessarythrows, blank-import comments, andprint/anyshadowing are cleaned up..gitignorecoverseditors/syson/**/target/.Intentionally left (recorded so the next scan is not a surprise):
java:S1452insyson-api-stubsmirrors the real Sirius signature and noIRepresentationEventProcessorstub exists;java:S6539onModelis informational;java:S1165onEditException.referrerscannot befinalbecausereadObjectassigns it.How it was verified
go build ./...,go vet ./...,gofmt -l .,make lint, andgo test ./...with all fourOPENSYSML_REQUIRE_*corpus variables set.gocognit -over 15overcmd/sysmlandinternal/translate/migrate: none of the flagged functions remain.client/java:mvn install;editors/syson/backend:mvn test(27 tests, including the new duplicate-name test).editors/syson/frontend:npm ci --ignore-scripts && npm run typecheck && npm run format:check && npm test && npm run build.python3 scripts/changelog.py check;bash -non the toolchain script.scripts/fuml-driverwas syntax-checked withjavaconly; its Maven dependencies could not be downloaded here.Checklist
make testandmake lintpass locallychanges/unreleased/<slug>.<section>.md, not as an edit toCHANGELOG.mdmake docs-countsrun if a gate count moved (compliance rows need nothing: the census is counted at docs build)F4,K5) in the body, docs, or changelog