mirror of
https://github.com/alibaba/p3c.git
synced 2025-10-14 15:10:54 +00:00
v2.0.0
1. pmd -> 6.15.0 2. idea min version 2016.1 3. jdk min version 1.8
This commit is contained in:
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: com.alibaba.smartfox.eclipse.plugin
|
||||
Bundle-SymbolicName: com.alibaba.smartfox.eclipse.plugin;singleton:=true
|
||||
Bundle-Version: 1.0.6.qualifier
|
||||
Bundle-Version: 2.0.0.qualifier
|
||||
Bundle-Activator: com.alibaba.smartfox.eclipse.SmartfoxActivator
|
||||
Bundle-Vendor: Alibaba
|
||||
Require-Bundle: org.eclipse.ui,
|
||||
@@ -22,7 +22,7 @@ Require-Bundle: org.eclipse.ui,
|
||||
org.eclipse.equinox.p2.metadata.repository,
|
||||
org.eclipse.equinox.p2.ui,
|
||||
org.eclipse.equinox.p2.metadata
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Bundle-ClassPath: target/lib/antlr-runtime.jar,
|
||||
target/lib/antlr4-runtime.jar,
|
||||
@@ -51,6 +51,7 @@ Bundle-Localization: plugin
|
||||
Export-Package: com.alibaba.smartfox.eclipse,
|
||||
com.alibaba.smartfox.eclipse.handler,
|
||||
com.alibaba.smartfox.eclipse.job,
|
||||
com.alibaba.smartfox.eclipse.marker,
|
||||
com.alibaba.smartfox.eclipse.pmd,
|
||||
com.alibaba.smartfox.eclipse.pmd.rule,
|
||||
com.alibaba.smartfox.eclipse.ui,
|
||||
|
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>com.alibaba.smartfox.eclipse</groupId>
|
||||
<artifactId>smartfox-eclipse</artifactId>
|
||||
<version>1.0.6-SNAPSHOT</version>
|
||||
<version>2.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>com.alibaba.smartfox.eclipse.plugin</artifactId>
|
||||
<packaging>eclipse-plugin</packaging>
|
||||
@@ -22,11 +22,11 @@
|
||||
<dependency>
|
||||
<groupId>com.alibaba.p3c</groupId>
|
||||
<artifactId>p3c-pmd</artifactId>
|
||||
<version>1.3.5</version>
|
||||
<version>2.0.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<artifactId>kotlin-stdlib</artifactId>
|
||||
<artifactId>kotlin-stdlib-jdk8</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.guava</groupId>
|
||||
@@ -63,7 +63,7 @@
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<version>2.7</version>
|
||||
<version>3.1.1</version>
|
||||
<configuration>
|
||||
<stripVersion>true</stripVersion>
|
||||
<prependGroupId>false</prependGroupId>
|
||||
|
@@ -104,7 +104,7 @@ object CodeAnalysis {
|
||||
|
||||
private fun processFile(file: IFile): List<RuleViolation> {
|
||||
val configuration = PMDConfiguration()
|
||||
configuration.sourceEncoding = file.charset ?: Charsets.UTF_8.name()
|
||||
configuration.setSourceEncoding(file.charset ?: Charsets.UTF_8.name())
|
||||
configuration.inputPaths = file.fullPath.toPortableString()
|
||||
val ctx = RuleContext()
|
||||
ctx.setAttribute("eclipseFile", file)
|
||||
@@ -120,7 +120,7 @@ object CodeAnalysis {
|
||||
}
|
||||
} catch (pmde: PMDException) {
|
||||
log.debug("Error while processing file: " + niceFileName, pmde.cause)
|
||||
report.addError(Report.ProcessingError(pmde.message, niceFileName))
|
||||
report.addError(Report.ProcessingError(pmde, niceFileName))
|
||||
} catch (ioe: IOException) {
|
||||
log.error("Unable to read source file: " + niceFileName, ioe)
|
||||
} catch (re: RuntimeException) {
|
||||
|
@@ -78,9 +78,9 @@ abstract class AbstractEclipseRule : AbstractJavaRule() {
|
||||
return data
|
||||
}
|
||||
|
||||
override fun setDescription(description: String) {
|
||||
override fun setDescription(description: String?) {
|
||||
try {
|
||||
super.setDescription(P3cBundle.getMessage(description))
|
||||
super.setDescription(P3cBundle.getMessage(description ?: ""))
|
||||
} catch (e: MissingResourceException) {
|
||||
super.setMessage(description)
|
||||
}
|
||||
|
Reference in New Issue
Block a user