[
https://issues.apache.org/jira/browse/AVRO-82?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Thiruvalluvan M. G. updated AVRO-82:
------------------------------------
Attachment: AVRO-81.patch
I attempted to include checkstyle into ant builds. It can catch some more
problems that are not caught by -Xlint or eclipse. But it left several problems
uncaught. Speficifically, it does not catch unused local variables and missing
parameters to genetic types. In some cases it does not catch all the unused
imports.
I've attached the patch that sets up checkstyle. I have included the following
checks to start with. We can add more tests as we move along.
The following checks found some violations
- Tab characters in java files instead of spaces
- Absence of a blank line at the end of the file
- Wildcard imports
- Redundant imports
- Unused imports
- Redundant modifiers (such as "public" for methods in interface)
- Redundant throws (throw clause with an exception and its subclass for the
same method or throw clause for a subclass of RuntimeException)
- Array type style (use "boolean[] b" instead of "boolean b[]", for example)
The following check didn't find any
- Naming conventions for constants
- Empty statements
- Illegal instantiations (where factory should be used)
- Simplify overly complex boolean expressions
- Interface is type (Bloch Effective Java item 17)
- Upper case L is used in long integer constants
The main reason for me create this JIRA is to avoid the large number of
warnings I see in Eclipse. I'm forced to remember the number of warnings that
the "clean" copy from svn generates so that I can ensure I don't introduce any
more. Since we don't seem to have any simple alternative tool to catch all the
warnings that eclipse generates, I guess have to just continue what I do.
> A large number of Java warnings due to unused vairables etc.
> ------------------------------------------------------------
>
> Key: AVRO-82
> URL: https://issues.apache.org/jira/browse/AVRO-82
> Project: Avro
> Issue Type: Improvement
> Components: java
> Reporter: Thiruvalluvan M. G.
> Assignee: Thiruvalluvan M. G.
> Priority: Minor
> Attachments: AVRO-82.patch, AVRO-82.patch
>
>
> I', creating this JIRA to submit a patch that fix the following:
> - Unused imports
> - Unused private fields, local variables
> - Use of generic types without parameters
> - Missing setialVersionUID for serializable classes
> There are more than 50 compiler warnings due to these.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.