Saturday, August 27, 2011

eclipse-cs

eclipse-cs
By itself, Eclipse checks code for syntactical errors.  This ensures that the code is free of errors that would prevent the program from running; in other words, the Java Virtual Machine can read the compiled application.  However, while the computer may be able to understand this code, there is no guarantee that any human will be able to comprehend the code.  For this reason, there exist several different standards and guidelines that instruct programmers in how to write code.
Naturally, if programmers do not use these standards, then the standards have no value.  To ensure compliance with these stylistic rules, an open source tool called Checkstyle examines Java code to ensure that the code complies with a particular coding style.  Eclipse-cs is a plug-in for Eclipse that incorporates Checkstyle into the development environment.  This allows the programmer to receive immediate feedback on whether his or her code fits with the expected coding standards.
Eclipse-cs is available for download at http://sourceforge.net/projects/eclipse-cs/, and the project site is http://eclipse-cs.sourceforge.net/.

Prime Directive 1: The system successfully accomplishes a useful task. 
As claimed, eclipse-cs checks Java code for stylistic errors and flags them as warnings.  Eclipse-cs updates this list of warnings every time that the user saves a file.  This does mean that the list is not automatically updated, in contrast to the syntax errors that Eclipse immediately recognizes.  However, since files must be saved before they can be compiled or tested, the user will have to have the list updated before he or she can use the code in question. 
Eclipse-cs also allows users to create their own coding standards.  This function is useful primarily for project managers or administrators who wish to establish a particular standard.  Indeed, without the ability to define what rules eclipse-cs should run under, the plug-in would be nearly useless, as users would be confined to only what the default standards require. 
An example of eclipse-cs in action is in the screenshot at the end of this entry.  The lines highlighted in the code include some sort of style error. 

Prime Directive 2: An external user can successfully install and use the system.
Since eclipse-cs is an Eclipse plug-in, it is installed in the same manner as any other new software for Eclipse would be.  However, this was not made clear on the download page at SourceForge.  Instead, it appeared that it would be necessary to directly download the files for eclipse-cs and then uncompress them in some directory; while this is actually one method of installing eclipse-cs, it is not the recommended method that the project site suggests.  Once installed though, eclipse-cs is extremely easy to use for the purpose of ensuring that code meets standards, as the user does not have to do anything other than write code and respond to the warnings that eclipse-cs provides.   

Prime Directive 3: An external developer can successfully understand and enhance the system.
Eclipse-cs is open-source, with the code available for examination at SourceForge.  Actually understanding this code can be slightly more difficult, if only for the sheer volume of information.  The lack of any readily available documentation aside from the comments in the code also increases the difficulty of understanding the code.  The forums at SourceForge would presumably offer some assistance in understanding the code, though they seem oriented more towards the utilization of the code rather than its development. 


No comments:

Post a Comment