-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sonar cloud fixes for 9.5 #1077
Merged
Merged
Changes from 2 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
640a917
Fix sonar cloud complaint about using static access for parent class
shantyk 5ef3911
Attempt at refactoring to reduce method complexity complaint by sonar
shantyk 066eedf
Update method name as per Dev's suggestion
shantyk bcc98a1
Attempt at reducing method complexity from 22 to 17
shantyk 711a730
Reduce method complexity from 17 to less than 15 to resolve sonar clo…
shantyk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -134,7 +134,7 @@ private DependencyGraph buildGraphForProject( | |
if (shouldInclude(entryName, entry.getVersion())) { | ||
LazyId id = generateComponentDependencyId(entryName, entry.getVersion()); | ||
graphBuilder.setDependencyInfo(id, entryName, entry.getVersion(), generateComponentExternalId(entryName, entry.getVersion())); | ||
ExternalIdDependencyGraphBuilder.LazyDependencyInfo parentInfo = graphBuilder.checkAndHandleMissingExternalId(lazyBuilderHandler, id); | ||
LazyExternalIdDependencyGraphBuilder.LazyDependencyInfo parentInfo = graphBuilder.checkAndHandleMissingExternalId(lazyBuilderHandler, id); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Related sonar cloud failure: https://sonarcloud.io/project/issues?open=AY3s6h72MlpV5xQqWqXG&id=com.synopsys.integration%3Asynopsys-detect |
||
Dependency parent = new Dependency(parentInfo.getName(), parentInfo.getVersion(), parentInfo.getExternalId(), null); | ||
mutableDependencyGraph.addDirectDependency(parent); | ||
collectYarnDependencies(lazyBuilderHandler, graphBuilder, mutableDependencyGraph, yarnLockResult, entry, resolvedEntryIdVersionMap, parent); | ||
|
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Simply moved the last chunk of code that was added in the commit form yesterday @devmehtasynopsys, this does resolve the complaint. If you're okay with this and don't believe this will cause any issues I don't see, please suggest a more appropriate method name (I lack context for these changes).
Sonar issue: https://sonarcloud.io/project/issues?impactSeverities=HIGH&resolved=false&severities=CRITICAL&id=com.synopsys.integration%3Asynopsys-detect&open=AY5erg-0_RLhWwYvLB2A
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah this would be okay to do and it won't cause any issues. The appropriate method name for this would addShadedDependenciesToGraph, as we are adding them to the graph.