Comments (9)
This error message shows up when your ruleset file is not proper xml, doesn't validate against the PMD ruleset schema or contains invalid rule names (usually typos).
If you validate the ruleset you provided against the ruleset schema you will get the following error:
Error - Line 9, 11: org.xml.sax.SAXParseException; lineNumber: 9; columnNumber: 11; cvc-complex-type.2.4.b: The content of element 'ruleset' is not complete.
One of '{"http://pmd.sourceforge.net/ruleset/2.0.0":exclude-pattern, "http://pmd.sourceforge.net/ruleset/2.0.0":include-pattern, "http://pmd.sourceforge.net/ruleset/2.0.0":rule}' is expected.
This means that you need to add at least one rule
tag. I recommend that you open and edit the ruleset file with Eclipse's XML editor so you can see validation errors like this.
I know the error message is not very helpful and there is already issue #39 which addresses this problem.
from eclipse-pmd.
should any of these work?
http://pmd.sourceforge.net/pmd-4.3.0/howtomakearuleset.html
from eclipse-pmd.
maybe these
http://pmd.sourceforge.net/pmd-5.1.1/howtomakearuleset.html
from eclipse-pmd.
I validated the ruleset but it still doesn't get imported by the plugin
do you have an example ruleset that works for you?
from eclipse-pmd.
The rulesets from PMD 4.x do not work while those from PMD 5.x should work.
PMD changed the naming of the rules a bit from version 4.x to 5.x. What used to be e.g. rulesets/imports.xml/DuplicateImports
is now rulesets/java/imports.xml/DuplicateImports
(note the java
). They also renamed or even removed a few rules.
from eclipse-pmd.
tried both 5x and 4x - no luck
do you have an example ruleset that works for you?
from eclipse-pmd.
The rulesets I use for eclipse-pmd itself work for me. See pmd-*.xml in https://github.com/acanda/eclipse-pmd/blob/master/ch.acanda.eclipse.pmd/ e.g. https://github.com/acanda/eclipse-pmd/blob/master/ch.acanda.eclipse.pmd/pmd-base.xml.
from eclipse-pmd.
Thanks! it got imported!
This error messages most likely means java8 syntax support is not setup somewhere right?
from eclipse-pmd.
This is PMD telling you that it cannot parse the File TimePickerTest.java and therefore will not find any PMD issues. This usually happens when the file contains code that does not compile.
You don't have to turn on Java 8 support in PMD somewhere as it always uses a Java 8 parser to analyse the code.
Does the code in TimePickerTest.java compile? If not then this log entry will disappear when you fix it. If it does compile then you might have found a bug in PMD's parser.
from eclipse-pmd.
Related Issues (20)
- An error occurred while automatically activating bundle ch.acanda.eclipse.pmd.core HOT 3
- Eclipse Neon (4.6) install through marked but nothing shows up HOT 2
- Diff to pmd/pmd-eclipse-plugin HOT 3
- Improve ruleset feedback HOT 2
- Remote ruleset: rules caching/refresh frequency? HOT 2
- Automatically update workspace relative configurations when the project name changes
- Eclipse PDT. Cannot change PMD nature of project <projectName> HOT 2
- New releases HOT 3
- Release 1.9 HOT 9
- XML parsing problem in Eclipse Oxygen HOT 1
- NoClassDefFoundError with version 1.12 in Eclipse Photon
- pmd can not find my enum class (configure auxclasspath) HOT 2
- eclipse-pmd 1.14 depends on pmd 6.6.0 and asm 6.1.1, but pmd 6.6.0 depends on asm 6.2 HOT 1
- Cannot use apex rules HOT 1
- Problem installing on STS 4 HOT 2
- Bug: After importing an exising project, no more PMD checks were performed HOT 2
- Bug: ruleset of other projects are also listed HOT 2
- Developer should be able to exclude violation HOT 4
- Use Rulesets with unkonwn rules (from newer PMD versions) HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eclipse-pmd.