Repository navigation
refactor(vscode): clear the landing-page SonarCloud code smells - #1820
Open
devin-ai-integration[bot] wants to merge 2 commits into
Open
devin-ai-integration[bot] wants to merge 2 commits into
devin-ai-integration[bot] wants to merge 2 commits into
Conversation
Co-Authored-By: jason.han <hanhuijun@gmail.com>
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)".
|
This branch has not been deployed
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
Clears the seven SonarCloud code smells on develop in
editors/vscode/src/landing/main.ts:typescript:S7755(1263) — the last trace record is read withsteps.at(-1).typescript:S3358(1264) andtypescript:S4624(1266) — the action status's ending is anif/else if, and the outputs suffix and the token noun are named locals instead of a nested ternary inside nested template literals.typescript:S3358(1397) — the three-way ternary that ran a scene program is arunProgramswitch onprogram.kind.typescript:S3358(1407, 1408) andtypescript:S4624(1408) — the status subject (over …) is arunSubjectswitch onprogram.kind, with the action's event suffix as its own local.Both switches cover every
SceneProgramkind (journeyandrollupshare the former fallback branch), so TypeScript checks their exhaustiveness through the return type. Every status string is unchanged. Pure refactor, no changelog fragment.How it was verified
editors/vscode:npm ci,npm run build,npm run typecheck,npm test— 456 pass, 0 failanalyze_code_snippet(ts) on develop and this branch reports none of S7755/S3358/S4624 for this file on either side (the analyzer's profile does not reproduce them), so the seven sites were checked by inspection: no.length - 1index, no nested ternary, no nested template literal remains in the changed functions.Checklist
make testandmake lintpass locally (editors/vscode build, typecheck and tests)Link to Devin session: https://nasa-jpl-demo.devinenterprise.com/sessions/d6cd1346a2844bb0aa32b31cc438fc6b
Open in Devin Desktop: https://nasa-jpl-demo.devinenterprise.com/desktop/session/d6cd1346a2844bb0aa32b31cc438fc6b?variant=devin
Requested by: @HuiJun