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 S3776: Exclude complexity of JSX short-circuits #377

Merged

Conversation

francoismora
Copy link
Contributor

@francoismora francoismora force-pushed the issue-3289-cognitive-complexity-jsx-short-circuits branch from c234a0c to 29bd2b1 Compare November 30, 2022 11:42
@francoismora
Copy link
Contributor Author

As discussed, the rule checks that the short-circuit logical expression doesn't have a ternary operator at its right-hand side before deciding to exclude it from the cognitive complexity computation.
Also, the PR fixes an issue in the secondary locations of logical operators.

Copy link
Contributor

@ilia-kebets-sonarsource ilia-kebets-sonarsource left a comment

Choose a reason for hiding this comment

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

2 comments, otherwise LGTM!

@sonarcloud
Copy link

sonarcloud bot commented Dec 5, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

97.3% 97.3% Coverage
0.0% 0.0% Duplication

@saberduck saberduck merged commit f757f28 into master Dec 5, 2022
@saberduck saberduck deleted the issue-3289-cognitive-complexity-jsx-short-circuits branch December 5, 2022 10:48
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.

Improve S3776: Exclude complexity of JSX attribute short-circuits
3 participants