Skip to content

Commit 78ad058

Browse files
committed
Issue #221: update to Checkstyle 8.31
1 parent 49e42d5 commit 78ad058

File tree

10 files changed

+23
-420
lines changed

10 files changed

+23
-420
lines changed

net.sf.eclipsecs.checkstyle/.classpath

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<classpath>
3-
<classpathentry exported="true" kind="lib" path="checkstyle-8.30-all.jar" sourcepath="checkstyle-checkstyle-8.30.zip"/>
3+
<classpathentry exported="true" kind="lib" path="checkstyle-8.31-all.jar" sourcepath="checkstyle-checkstyle-8.31.zip"/>
44
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
55
<attributes>
66
<attribute name="maven.pomderived" value="true"/>

net.sf.eclipsecs.checkstyle/META-INF/MANIFEST.MF

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,5 @@ Export-Package: .,
4646
com.puppycrawl.tools.checkstyle.utils,
4747
org.apache.commons.beanutils;version="8.30.0"
4848
Bundle-ClassPath: .,
49-
checkstyle-8.30-all.jar
49+
checkstyle-8.31-all.jar
5050
Automatic-Module-Name: net.sf.eclipsecs.checkstyle
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
bin.includes = META-INF/,\
22
.,\
33
license/,\
4-
checkstyle-8.30-all.jar
4+
checkstyle-8.31-all.jar
55
jars.compile.order = .
66
source.. = metadata/

net.sf.eclipsecs.checkstyle/metadata/com/puppycrawl/tools/checkstyle/checks/coding/checkstyle-metadata.properties

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,10 @@ UnnecessaryParentheses.desc = Checks for the use of unnecessary parentheses.
188188
UnnecessaryParentheses.name = Unnecessary Parentheses
189189
UnnecessaryParentheses.tokens = tokens to check
190190
191+
UnnecessarySemicolonAfterOuterTypeDeclaration.desc = Checks if unnecessary semicolon is used after type declaration.
192+
UnnecessarySemicolonAfterOuterTypeDeclaration.name = Unnecessary semicolon after outer type declaration
193+
UnnecessarySemicolonAfterOuterTypeDeclaration.tokens = tokens to check
194+
191195
UnnecessarySemicolonAfterTypeMemberDeclaration.desc = Checks if unnecessary semicolon is used after type member declaration.
192196
UnnecessarySemicolonAfterTypeMemberDeclaration.name = Unnecessary semicolon after type member declaration
193197
UnnecessarySemicolonAfterTypeMemberDeclaration.tokens = tokens to check

net.sf.eclipsecs.checkstyle/metadata/com/puppycrawl/tools/checkstyle/checks/coding/checkstyle-metadata.xml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -562,6 +562,21 @@
562562
<message-key key="unnecessary.paren.lambda" />
563563
</rule-metadata>
564564

565+
<rule-metadata name="%UnnecessarySemicolonAfterOuterTypeDeclaration.name" internal-name="UnnecessarySemicolonAfterOuterTypeDeclaration" parent="TreeWalker">
566+
<alternative-name internal-name="com.puppycrawl.tools.checkstyle.checks.coding.UnnecessarySemicolonAfterOuterTypeDeclarationCheck" />
567+
<description>%UnnecessarySemicolonAfterOuterTypeDeclaration.desc</description>
568+
<property-metadata name="tokens" datatype="MultiCheck" default-value="CLASS_DEF,INTERFACE_DEF,ENUM_DEF,ANNOTATION_DEF">
569+
<description>%UnnecessarySemicolonAfterOuterTypeDeclaration.tokens</description>
570+
<enumeration>
571+
<property-value-option value="CLASS_DEF"/>
572+
<property-value-option value="INTERFACE_DEF"/>
573+
<property-value-option value="ENUM_DEF"/>
574+
<property-value-option value="ANNOTATION_DEF"/>
575+
</enumeration>
576+
</property-metadata>
577+
<message-key key="unnecessary.semicolon" />
578+
</rule-metadata>
579+
565580
<rule-metadata name="%UnnecessarySemicolonAfterTypeMemberDeclaration.name" internal-name="UnnecessarySemicolonAfterTypeMemberDeclaration" parent="TreeWalker">
566581
<alternative-name internal-name="com.puppycrawl.tools.checkstyle.checks.coding.UnnecessarySemicolonAfterTypeMemberDeclarationCheck" />
567582
<description>%UnnecessarySemicolonAfterTypeMemberDeclaration.desc</description>

net.sf.eclipsecs.core/src/net/sf/eclipsecs/core/builder/Auditor.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@
5555
import org.eclipse.core.runtime.NullProgressMonitor;
5656
import org.eclipse.core.runtime.OperationCanceledException;
5757
import org.eclipse.core.runtime.Path;
58-
import org.eclipse.jdt.core.JavaCore;
5958
import org.eclipse.jface.text.BadLocationException;
6059
import org.eclipse.jface.text.IDocument;
6160
import org.eclipse.jface.text.IRegion;
@@ -143,12 +142,6 @@ public void runAudit(IProject project, IProgressMonitor monitor)
143142
listener = new CheckstyleAuditListener(project);
144143
checker.addListener(listener);
145144

146-
// reconfigure the shared classloader for the current
147-
// project
148-
if (project.hasNature(JavaCore.NATURE_ID)) {
149-
CheckerFactory.getSharedClassLoader().intializeWithProject(project);
150-
}
151-
152145
// run the files through the checker
153146
checker.process(filesToAudit);
154147

@@ -158,8 +151,6 @@ public void runAudit(IProject project, IProgressMonitor monitor)
158151
} else {
159152
handleCheckstyleFailure(project, e);
160153
}
161-
} catch (CoreException e) {
162-
CheckstylePluginException.rethrow(e);
163154
} catch (RuntimeException e) {
164155
if (listener != null) {
165156
listener.cleanup();

net.sf.eclipsecs.core/src/net/sf/eclipsecs/core/builder/CheckerFactory.java

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -63,19 +63,14 @@ public final class CheckerFactory {
6363
/** Map containing the modification times of configs. */
6464
private static Map<String, Long> sModifiedMap;
6565

66-
/** the shared classloader for the checkers. */
67-
private static ProjectClassLoader sSharedClassLoader;
68-
69-
/**
66+
/*
7067
* Initialize the cache.
7168
*/
7269
static {
7370

7471
sCheckerMap = CacheBuilder.newBuilder().softValues().build();
7572

7673
sModifiedMap = new ConcurrentHashMap<>();
77-
78-
sSharedClassLoader = new ProjectClassLoader();
7974
}
8075

8176
/**
@@ -138,15 +133,6 @@ public static Checker createChecker(ICheckConfiguration config, IProject project
138133
return checker;
139134
}
140135

141-
/**
142-
* Returns the shared classloader which is used by all checkers created by this factory.
143-
*
144-
* @return the shared classloader
145-
*/
146-
public static ProjectClassLoader getSharedClassLoader() {
147-
return sSharedClassLoader;
148-
}
149-
150136
/**
151137
* Cleans up the checker cache.
152138
*/
@@ -250,7 +236,6 @@ private static Checker createCheckerInternal(InputSource input, PropertyResolver
250236
Locale platformLocale = CheckstylePlugin.getPlatformLocale();
251237
checker.setLocaleLanguage(platformLocale.getLanguage());
252238
checker.setLocaleCountry(platformLocale.getCountry());
253-
checker.setClassLoader(sSharedClassLoader);
254239

255240
checker.configure(configuration);
256241

0 commit comments

Comments
 (0)