Bug 35812 - Allowing the compiler to generate warnings or errors on deviations from Java Development Standards [new]
Summary: Allowing the compiler to generate warnings or errors on deviations from Java ...
Status: RESOLVED WONTFIX
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.1   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2003-03-28 11:02 EST by Eric CLA
Modified: 2009-08-30 02:16 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eric CLA 2003-03-28 11:02:42 EST
We have found great benefit in using your Eclipse IDE.  Beyond the technical 
structure we try to adhere to development standards set forth by the Java 
community.  It would be very beneficial if Eclipse could check if the code is 
adhering to the standards.  Using your preferences, if there was a tab 
under "Preferences > Java > Compiler" called standards; this could list 
standards and allow the user to set the level to Error, Warning, or ignore.



Some standards that we are adhering to are:



Class names in mixed case with the first letter of each internal word 
capitalized

Don't assign several variables to the same value in a single statement.

Don't make any instance or class variable public 

If, for, while statements etc. always use braces {}

Initialize all variables where they're declared.

Method names do not start with underscore _ or dollar sign $ characters

Methods in mixed case with the first letter lowercase, with the first letter of 
each internal word capitalized. 

One declaration per line.

Package names in mixed case with the first letter lowercase, with the first 
letter of each internal word capitalized. 

Package names do not start with underscore _ or dollar sign $ characters

The names of variables declared class constants and of ANSI constants should be 
all uppercase with words separated by underscores ("_"). 

Variable names in mixed case with the first letter lowercase, with the first 
letter of each internal word capitalized. 

Variable names should not start with underscore _ or dollar sign $ characters



Some of the sources that we have used to compile these and other Java 
Development standards are:



http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html

http://ccm.redhat.com/doc/core-platform/5.0/engineering-standards/java-
standards.html 

http://developer.netscape.com/docs/technote/java/codestyle.html

http://gee.cs.oswego.edu/dl/html/javaCodingStd.html

http://geosoft.no/javastyle.html

http://www.infospheres.caltech.edu/resources/code_standards/java_standard.html

http://www.ontko.com/java/java_coding_standards.html

http://www.redhat.com/docs/manuals/ccm/CCM-5.0-Manual/developer-guide/ch-java-
standards.html



Thank you for your time.
Comment 1 Dirk Baeumer CLA 2003-03-28 11:14:28 EST
This should be covered by a lint like tools, not by the compiler. This is a 
good third party opportunity since the public AST allows building such tools.

No action planned for 2.1
Comment 2 Denis Roy CLA 2009-08-30 02:16:52 EDT
As of now 'LATER' and 'REMIND' resolutions are no longer supported.
Please reopen this bug if it is still valid for you.