Repository navigation
test(clients): clear the client SonarCloud code smells - #1819
Merged
Merged
Conversation
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 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 three SonarCloud code smells on develop in the clients:
java:S5778ApiIntegrationTest.java:746and:749— eachassertThrowslambda built itsExecutionOptionswithwithEvents("Go")and then called the method under test.withEventsis a pure constructor, so it is hoisted into a named local before the assertion, leaving the lambda with only the invocation the test expects to throw. The assertions are unchanged.Dispositions
python:S107client/python/opensysml/__init__.pyconvert(14 parameters) — the module-levelconverttakesConnection.convert's public keyword arguments plus the service'shostandport; reducing the count would break the published Python API. Recorded as the named multicriteria entryconvertKeywords(ruleKey=python:S107,resourceKey=client/python/opensysml/__init__.py) insonar-project.properties, with the one-line reason in its comment block, beside the existingkeywordAuthoring/keywordChecking/wireRecordentries.No behaviour change, no changelog fragment.
How it was verified
make build-grpc; Java client Maven tests:ApiIntegrationTest92 run, 0 failures, 0 skipped; module 356 run, 0 failures, 1 skipped (pre-existing); conformance module 37 passgo build ./...(no Go change)analyze_code_snippet(java, TEST) does not reproduceS5778on develop either, so the two lambdas were checked by inspection: each now contains a single call. The Python disposition takes effect in develop's branch analysis (the snippet analyzer does not readsonar-project.properties).Checklist
make testandmake lintpass locally (Java client tests, Go build)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