Skip to content
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

Improve S4328 (no-implicit-dependencies): check package.json files in all levels up #3102

Merged
merged 5 commits into from
Apr 11, 2022

Conversation

vilchik-elena
Copy link
Contributor

Fixes #2682

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Comment on lines +176 to +181
const upperDir = path.dirname(dirname);
if (upperDir === dirname) {
break;
} else {
dirname = upperDir;
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Food for thought...

Just saying, and not sure if it would make the code much more readable, but we could get rid of the if-break-else thing by turning the infinite while loop into a do-while loop.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see the point but not sure it's clearer with do-while

@vilchik-elena vilchik-elena enabled auto-merge (squash) April 11, 2022 08:38
@sonarsource-next
Copy link

@vilchik-elena vilchik-elena merged commit fc93eba into master Apr 11, 2022
@vilchik-elena vilchik-elena deleted the issue-2682 branch April 11, 2022 12:38
@gpessa
Copy link

gpessa commented May 24, 2022

Do you know when this will be released?

@yassin-kammoun-sonarsource
Copy link
Contributor

Hello @gpessa, this improvement is already available on SonarCloud, and it will be part of SonarQube 9.5, whose release is planned for early June.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

S4328 (no-implicit-dependencies): check package.json files in all levels up
3 participants