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

sonar:AddCurlyBrackets duplicates code inside a switch statement. #3

Open
leukim opened this issue Mar 31, 2016 · 4 comments
Open

sonar:AddCurlyBrackets duplicates code inside a switch statement. #3

leukim opened this issue Mar 31, 2016 · 4 comments

Comments

@leukim
Copy link

leukim commented Mar 31, 2016

Applying the transformation to a piece of code with a switch condition does not wrap up the whole code inside a case and duplicates the non-wrapped code inside the braces, effectively producing compilation errors (see attached screenshot)
duplicated-code

@ekpatil
Copy link

ekpatil commented Jul 7, 2016

Hi,
i am applying only AddCurlyBrackets transformation to file, but it hit the switch case part also and it removes all the code in side case. see below
switchcaseissue

@rpau
Copy link
Contributor

rpau commented Jul 7, 2016

Yes, in fact I am working on it right now :). It is true!

I will send a new update during this week.

@ekpatil
Copy link

ekpatil commented Jul 7, 2016

hey thanks!

@pkmusthafa
Copy link

@rpau ,

I too facing the some issues with switch statement when using transformation : sonar:AddCurlyBrackets.
See the attached screen shot. Some time it is adding the braces and some time the statements are repeating.

switch_case

switch_statement_repeating

Could you please help ?

Regards,
Musthafa P K

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

No branches or pull requests

4 participants