jdneo / vscode-checkstyle

Checkstyle extension for VS Code
https://marketplace.visualstudio.com/items?itemName=shengchen.vscode-checkstyle
GNU Lesser General Public License v3.0
68 stars 16 forks source link

Fix MultipleVariableDeclarationsQuickFix comment handling #303

Closed karlvr closed 3 years ago

karlvr commented 3 years ago

For variable declaration statements

jdneo commented 3 years ago

Is that because the new introduced replace() function?

I tried the existing RequireThisQuickFix, it will not remove the comments.

public class TodoItemTest {

    private int i;

    public void test() {
        int i = 0;
        /** */
        i = i;
    }
}
karlvr commented 3 years ago

@jdneo thank you, I wanted to try that too. I'm not sure! I based the multi-replace on replace. I've tried using set to replace the original node rather than remove. Same problem.

jdneo commented 3 years ago

Opps, I don't know why this PR is closed when I merge the bump version PR. And I cannot reopen it.

@karlvr Can you reopen it on your side?

jdneo commented 3 years ago

Oh, It's because the PR is targeting to cs/1.4.0. Sorry I didn't notice that. Maybe raise a new one targeting the main branch?