Release 3.1
New features:
- Patch from David Schneider to have severity levels
for each check (request 597683).
- Added check to avoid inline conditionals like
"b ? x : y" (module AvoidInlineConditionals, request
597790).
- Added check that blocks are not introduced at
arbitrary places but only for if, while, etc. (module
AvoidNestedBlocks, request 632442).
- Added check to enforce that utility classes
(classes that have only static methods) cannot be instantiated
(module HideUtilityClassConstructor, request 634838).
- Added check to enforce an API design that shields
classes against bugs in derived classes (module
DesignForExtension, request 659715).
- Added check to enforce that Interfaces do not
contain only constants (module InterfaceIsType, request 659717, see
[Bloch, Effective Java], Item 17 "Use interfaces only to define
types").
- Added check to detect the double-checked locking
idiom (module DoubleCheckedLocking, request 709333).
- Added check to enforce C style (char c[]) or Java
style (char[] c) for array type declaration (module ArrayTypeStyle,
request 493380).
- Added check to enforce that method parameters are
final (module FinalParameters, request 528196).
- Added module to enforce that files end
with a newline character, contributed by Christopher Lenz
(module NewLineAtEndOfFile, request 662544).
- Many documentation improvements, contributed by
Peter Dobratz.
- Patch from Simon Kitching to allow more
configuration control over the JavadocMethodCheck.
- Checkstyle ant task outputs version info
in verbose and debug mode (request 550483).
- Patch from Oleg Sukhodolsky to add FinalCheck to
check that classes are declared final if they only contain private
constructors (request 696290).
- Patch from Oleg Sukhodolsky to add
MissingSwitchDefaultCheck to check that a switch statement has a
default clause (request 564199).
- Patch from Oleg Sukhodolsky to fix TranslationCheck
Test bug. (bug 720925).
- Patch from Oleg Sukhodolsky to fix documentation.
(bug 727896).
- Added check to find empty statements (module
EmptyStatement, request 724573).
- Added check to find magic numbers (module
MagicNumber, request 564206).
- One more option for JavadocMethodCheck
(allowThrowsTagsForSubclasses, request 540383)
- Added sourceName property to AuditEvent and
LocalizedMessage; and "source" attribute to
"error" element of XMLLogger output (request 686336).
- Added line and column numbers to configuration
parse exceptions (request 714962).
- Added check for redundant exceptions in
throws clause (module RedundantThrows, request 579056)
- Added property for GenericIllegalRegexp to
customize reported message (module GenericIllegalRegexp,
property message, request 738567)
- Moved the location of the file
checkstyle_packages.xml to be in the directory
com/puppycrawl/tools/checkstyle. This is to work around a bug in
NetBeans (request 739881).
- Patch from Dale King to enhance the GUI with
a Reload Java File button and storage of the current directory
of the last opened file (request 740545).
- Patch from Bill Schneider to add
GenericIllegalRegexpCheck property to perform
case-insensitive matches (request 740112).
Resolved bugs:
- False alarms from RightCurly module for code that
does not have braces in if-then-else (bug 689836).
- Grammar incorrectly defaulting unqualified floating
point literals to be float, when they should be double (bug
713716).
- "threadsafe" was treated as a Java
keyword, resulting in parser errors for sources that use it as an
identifier (bug 710319).
- ConfigurationLoader was not public (only relevant
for IDE plugin authors).
- HTML syntax errors in documentation (bug
721458).
- Error when writing a DOS file name from
checkstyle-frames.xsl (bug 713845).
- Files were not being closed by
Utils.getLines().
- Missing documentation for the EmptyForIterator
check (bug 740038).
Development Team:
- Oleg Sukhodolsky has joined the team.
Release 3.0
New features:
- Completely new architecture based around pluggable modules. This means that users can now write their own checks without changing the sourcecode of checkstyle itself (request 578712).
- Users can specify the Java token types for which a check must be performed. For example users can now control that there should be whitespace after 'synchronized' but not after 'if' (request 536385).
- Detect classes that override 'equals()' but not 'hashCode()' (request 554373).
- Detect inner assignments, e.g. 'this.add(label = new JLabel("yes, I'm a C hacker"));' (request 521325).
- Detect matches of generic regular expressions (requests 595254, 621247, 630536).
- Find empty blocks (not only empty catch blocks, request 609523).
- Check spaces at empty for iterators (requests 565666, 583725).
- Detect missing property file keys in internationalized applications (request 634966).
- Check content of @author and @version tag against a regular expression.
- Detect hiding of fields by parameters or local variables with the same name (request 471897).
- Detect obsolete final modifier in interfaces (request 651121).
- Detect whitespace before ';' (request 521323).
- Added DTD for XML output (request 622157).
- Added an XSL stylesheet to convert XML output to plain text, contributed by Jon Scott Stevens.
- Added portuguese localization, contributed by Pedro Morais.
- Added finnish localization, contributed by Ville Skyttä.
- Added french localization, contributed by Pierre Dittgen.
Resolved bugs:
- Fully-qualified @throws claimed unused (bug 658805).
- Expected @return tag when one is there (bug 579190).
- Package name reported incorrectly (bug 622290).
- Empty header filename silently ignored (bug 629139).
- Array instantiation incorrectly flagged (bug 626875).
- Tests fail with non-english locale (bug 594469).
- Cachefile streams were not closed (bug 665016).
- Ant Task: NullPointerException when type was not specified in formatter (bug 670321).
Removed features:
- Removed support for japanese localization until we find a new maintainer.
API changes (only relevant for IDE plugin authors):
- Configuration is not based on Properties any more. Instead a Configuration interface is used, IDE plugins can define their own way of creating Configurations or they can reuse the provided ConfigurationLoader to read checkstyle's standard XML config files.
Development Team:
- Rick Giles has joined the team.
Release 2.4
New features:
- Major refactoring on the way Checkstyle is configured. It is now completely based around properties. Big thanks to Vincent Massol for the suggestion on how to refactor the ANT task (bug 605141).
- Check the package name against a pattern (request 597787). Patch provided by Simon Langford.
- Detect the number of parameters in a declaration exceeding a specified amount (request 582144).
- Inspired by patch 580410 from Shinya Ohnuma, now the error messages are localised.
- Support checking to determine if an unused @throws exception is a subclass of java.lang.Error (request 583719).
- Incorporate patch 555878 from Rick Giles to allow pattern for local final variables to be specified.
- Incorporate patch 566855 from Rob Worth to optionally check that parenthesis are padded with spaces.
- Incorporate patch 590931 from Vijay Aravamudhan to improve documentation of the build.xml file.
- Incorporate patch from Vijay Aravamudhan to enforce requiring @version tag (request 543964).
- Incorporate patch 607481 from Ville Skyttä to enforce wrap on operator at EOL.
Resolved bugs:
- Incorporate a patch from Ronald Hastings (Boeing) to correctly handle C++ style comments being between Javadoc comments and declarations.
API changes (only relevant for IDE plugin authors):
- Many changes to the Configuration object.
Release 2.3
New features:
- Support checking to determine if an unused @throws exception is a subclass of java.lang.RuntimeException (request 540382).
- Detect instantiations of classes that should not be instantiated (e.g. java.lang.Boolean) (request 550205).
- Added ability to specify the base directory for reporting file names (request 571161).
- Check for line wrapping on operators (request 553160).
- Detect empty try blocks.
- Detect empty catch blocks (request 516255).
- Detect empty finally blocks.
- Detect to-do comments (request 504275).
- Detect use of lowercase l ("ell") in long integer literals.
- Include column number in the XML output (request 555262).
- Added ability to specify a properties file on the command line (request 557544).
- Check for whitespace around "{" and "}" (request 557544).
- Fix Javadoc errors under JDK 1.4 (request 568553).
- Detect redundant abstract modifier in interfaces (request 573485).
- Support running Checkstyle using the -jar option.
Resolved bugs:
- Better error reporting for missing properties files (bug 576165).
- Ant task now logs style violations as errors (bug 561616).
API changes (only relevant for IDE plugin authors):
- The get/setOutputStream methods have been removed from the AuditListener interface. The XMLLogger and DefaultLogger implementations now expect OutputStreams to be provided as a constructor argument.
- The DefaultLogger now differentiates between info messages ("started checking file ...", etc.) and error messages (style errors found by checkstyle).
Release 2.2
Resolved bugs:
- The cache was not invalidated upon parameter change (Bug 522282).
- Tabs were not counted correctly in line length checks (Bug 524671).
- Problem when a Checker could not be created (Bug 528358).
- The documentation of the command line property names did not list the property checkstyle.allow.tabs (Bug 529975).
- The default regular expression for constant names allowed consecutive '_' characters to occur (Bug 540358).
- Checkstyle reported unused @throws tag for multiple declarations of the same Exception. According to the Java BugParade this is incorrect, multiple @throws tags for the same exception are OK (Bug 540384).
New features:
- added check for whitespace around '()'
- added support for JDK 1.4 assert statements
- added column number to error messages for better Emacs integration
- added possibility to disable line-length checking by means of regular expressions
- added possibility to disallow import of package hierarchies, e.g. sun.*
- added failureProperty to ANT task
- added check for 'public' modifier in interface method declarations, following the recommendation in chapter 9.4 of the Java Language Specification
- added -r "dir" option to the commandline frontend, checkstyle will find all Java files contained in the specified directory
- incorporated patch from Warner Onstine to configure the ANT task by means of a property file
- added 'contrib' directory, contains XSL stylesheets for formating checkstyle's XML output (contributions by Ingmar Stein, Stephane Bailliez, Scott McCrory and Gray Herter)
Release 2.1
New features:
- added check for package.html
- added flag allowPackage which acts similar as allowProtected
- added support for ignoring multiple lines in the file header
- added support for specifying the file header by means of regular expressions
- added whitespace checks around '.', e.g. System . out . println()
- added check for names of methods and local variables
- check the order of modifiers (public, static, etc.) against the recommendation in the Java Language specification
- added checks for curly braces placement
- incorporated patch from Andrew Lang for more robust Javadoc parsing
Release 2.0
Changes:
- Now released under the GNU Lesser General Public License (LGPL).
- Fix bug #508010, documentation and code are inconsistent.
- Changes to make it build "out of the box".
|