Eclipse has checkstyle plugin which points out the coding practices which are not good. Is there some tool or someway in which some of those issues can be automatically fixed?
For example, let's say cleanup unused imports. If the tool can automatically visit the whole project and remove the unused imports?
...
I am using Sonar to present state of our code. We have a checkstyle xml document with our rule. In it, we have the "Method param pad" rule:
<module name="MethodParamPad">
<property name="tokens" value="METHOD_DEF"/>
<property name="option" value="space"/>
<property name="allowLineBreaks" value="true"/>
</module>
However, ...
In a code sample containing many getters and setters, the following CHECKSTYLE notations exist:
/* CHECKSTYLE:OFF */
public void setDisplayName(final String displayName) {
this.displayName = displayName;
}
/* CHECKSTYLE:ON */
/* CHECKSTYLE:OFF */
public String getDisplayName() {
return displayName;
}
/* CHECKSTYLE:ON */
I fin...
It is possible to take the source code directly from a svn repository and analyze it with sonar? Or configure sonar just to run a Checkstyle or pmd plugin for certain sources?
I need to do this on non-maven projects.
...
I'm using the CheckStyle plugin for Eclipse.
It's great at finding things I didn't intend 99% of the time, but the 1% of the time I actually did intent to knowingly violate a rule, I would like to let CheckStyle know it need not concern itself with flagging a warning.
Example: the Missing a Javadoc comment rule. Most of the time I wan...
Hi,
I have enabled checkstyle for my project. it is showing yellow mark on method parameters and requesting to set it as final. Why? what is the purpose? if not specified what will be the problem?
...
I have worked with java for a while now, and I found checkstyle to be very useful. I am starting to work with c++ and I was wondering if there is a style checker with similar functionality. I am mainly looking for the ability to write customized checks.
...
Are there any shell (specifically bash or ksh) checkers that test shell scripts for style, best practices, naming conventions, etc? (Something like Lint for C, or Perl::Critic for Perl.)
I know with ksh you can do syntax checking by running ksh -n script.ksh but I was hoping for something more than just sytax checking - something that ...
Is there a way to define a configuration XML for Checkstyle in Eclipse that would be project specific, as in "you put a XML file in the project tree and Checkstyle recognizes it"?
As far as I've researched, I've seen how to change the configuration for Eclipse as a whole, and how to include a Supressions Filter, which (as far as I under...
I've been using maven2 for a while now, and I'm trying out gradle build tool at the moment.
One of the things I would like to do is to run checkstyle, but my current project is using checkstyle 4.4 with rules that don't seem to be compatible with the latest version of checkstyle which gradle code-quality plugin is using. Sure, I can and...
This is my foo.java file:
/**
* LICENSE blah-blah-blah
* @Version $Id$
*/
public class Foo {
}
This is how the file looks after svn update:
/**
* LICENSE blah-blah-blah
* @Version $Id: Foo.java 396 2010-10-14 06:31:27Z [email protected] $
*/
public class Foo {
}
The length of line no.3 is over 80 characters and I...
I have custom checkstyle checks file (called checks.xml), and I'm trying to use that same file in both maven and eclipse. It all works well, except for the SuppressionFilter.
In this checks.xml file, I have
<module name="SuppressionFilter">
<property name="file" value="src/main/resources/checkstyle/checkstyle-suppressions.xml"/> ...
Hi
I have two packages namely
com/mydomain/abc/delegate/xyz/jaxws/managed
and com/mydomain/abc/xyz/jaxws/managed
I require checkstyle to be disabled only for the second package as these holds proxy classes that are autogenerated.
I use a suppression.xml as shown below
<?xml version="1.0"?>
<!DOCTYPE suppressions PUBLIC
"...
I have a checkstyle validation rule configured in my project, that prohibits to define class methods with more than 3 input parameters. The rule works fine for my classes, but sometimes I have to extend third-party classes, which do not obey this particular rule.
Is there a possibility to instruct "checkstyle" that a certain method shou...
Checkstyle says:
Class should define a constructor.
PMD says:
Avoid unnecessary constructors - the compiler will generate these for you.
Who is right? Or let's put it this way - what are the pros and cons of having an empty default ctor in a class?
...