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

RemoveExtraSemicolons removes newline if semicolon is in front of statement #99

Closed
pstreef opened this issue May 9, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@pstreef
Copy link
Contributor

pstreef commented May 9, 2023

sample:

class Test {
    void test() {
        int a = 1;
        ;int b = 2;
    }
}

expected

class Test {
    void test() {
        int a = 1;
        int b = 2;
    }
}

actual

class Test {
    void test() {
        int a = 1; int b = 2;
    }
}
@rpau rpau added the bug Something isn't working label May 9, 2023
pstreef added a commit to pstreef/rewrite-static-analysis that referenced this issue May 9, 2023
Add test with @ExpectedToFail
@rpau
Copy link
Contributor

rpau commented May 9, 2023

Hi! thanks for reporting this bug. It is definitely a non expected behavior.

pstreef added a commit to pstreef/rewrite-static-analysis that referenced this issue May 15, 2023
Remove empties on block level but keep prefix for next statements.
@timtebeek timtebeek moved this to Backlog in OpenRewrite May 15, 2023
@timtebeek timtebeek moved this from Backlog to In Progress in OpenRewrite May 15, 2023
@rpau rpau added this to the Good first experience with static code analysis recipes milestone May 30, 2023
@joanvr joanvr closed this as completed in d267c8f May 31, 2023
@github-project-automation github-project-automation bot moved this from In Progress to Done in OpenRewrite May 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

No branches or pull requests

2 participants