Skip to content

Commit 835c3ea

Browse files
committed
Issue #451: add RegexpMultiline#noConsecutiveLines to checkstyle config
1 parent d7fd451 commit 835c3ea

3 files changed

Lines changed: 7 additions & 6 deletions

File tree

config/checkstyle-checks.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,12 @@
116116
<property name="fileExtensions" value="xml"/>
117117
<property name="message" value="Content of source tag should not be Indented"/>
118118
</module>
119+
<module name="RegexpMultiline">
120+
<property name="id" value="noConsecutiveLines"/>
121+
<property name="format" value="\r?\n[\t ]*\r?\n[\t ]*\r?\n"/>
122+
<property name="fileExtensions" value="java,xml,properties"/>
123+
<property name="message" value="Unnecessary consecutive lines"/>
124+
</module>
119125
<module name="RegexpMultiline">
120126
<property name="id" value="noEmptyFile"/>
121127
<property name="format" value="^\s*$" />

net.sf.eclipsecs.ui/src/net/sf/eclipsecs/ui/config/CheckConfigurationWorkingSetEditor.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
import java.io.File;
2424
import java.util.ArrayList;
2525

26-
import org.eclipse.core.resources.IProject;
2726
import org.eclipse.jface.dialogs.IDialogSettings;
2827
import org.eclipse.jface.dialogs.MessageDialog;
2928
import org.eclipse.jface.viewers.ArrayContentProvider;
@@ -686,7 +685,7 @@ public void selectionChanged(SelectionChangedEvent event) {
686685
} else {
687686
mConfigurationDescription.setText(""); //$NON-NLS-1$
688687
if (mIsShowUsage) {
689-
mUsageView.setInput(new ArrayList<IProject>());
688+
mUsageView.setInput(new ArrayList<>());
690689
}
691690
}
692691
mEditButton.setEnabled(configSelected);
@@ -705,6 +704,4 @@ public void selectionChanged(SelectionChangedEvent event) {
705704
}
706705
}
707706
}
708-
709-
710707
}

net.sf.eclipsecs.ui/src/net/sf/eclipsecs/ui/quickfixes/CheckstyleMarkerResolutionGenerator.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,4 @@ private boolean isCheckstyleMarker(IMarker marker) {
5959
return false;
6060
}
6161
}
62-
63-
6462
}

0 commit comments

Comments
 (0)