Cs-contrib.unkrig.de: Difference between revisions
Line 41: | Line 41: | ||
:Verifies that statements are uniformly wrapped and indented. | :Verifies that statements are uniformly wrapped and indented. | ||
;[['de.unkrig.ZeroParameterSuperconstructorInvocation' check|<code><de.unkrig.ZeroParameterSuperconstructorInvocation></code>]] | |||
:Verifies that no constructor calls the zero-parameter superconstructor. | |||
= Filters = | = Filters = |
Revision as of 08:46, 4 March 2014
Introduction
This project adds custom checks, filters and quickfixes for CheckStyle and Eclipse-CS.
Download
Install the ECLIPSE plug-in from this update site:
http://cs-contrib.unkrig.de/update
If you're only interested in the checks (and not the ECLIPSE plug-in), you can download the most recent 'de.unkrig.cs-contrib.core_*.jar' file from
http://cs-contrib.unkrig.de/update/plugins/
and put it on CheckStyle's classpath.
A change log is also available.
Checks and Quickfixes
<de.unkrig.Alignment>
- Verifies that Java elements are vertically aligned.
<de.unkrig.CppCommentAlignment>
- Verifies that C++ comments ('// ...') are correctly aligned.
<de.unkrig.InnerAssignment>
- Verifies that assignments in expressions are parenthesized.
<de.unkrig.NameSpelling>
- Verifies that the names of Java elements match, respectively no not match given patterns.
<de.unkrig.ParenPad>
- Enhanced version of "ParenPad": NOSPACE now allows '
( // ...
'. - This check is superseded by 'de.unkrig.Whitespace'.
<de.unkrig.Whitespace>
- Verifies that tokens are, respectively are not preceded with (and/or followed by) whitespace.
<de.unkrig.WhitespaceAround>
- Verifies that a token is surrounded by whitespace.
- This check is superseded by 'de.unkrig.Whitespace'.
<de.unkrig.WrapAndIndent>
- Verifies that statements are uniformly wrapped and indented.
<de.unkrig.ZeroParameterSuperconstructorInvocation>
- Verifies that no constructor calls the zero-parameter superconstructor.
Filters
Filter 'de.unkrig.SuppressionLine'
Events (i.e. CheckStyle warnings) are switched off by a 'magic line' ('offCommentFormat') or back on by another 'magic line' ('onCommentFormat').
After the 'off' magic line, events do not show if at least one of the following conditions is true:
- The 'checkNameFormat' (if set) is found in the check name (e.g. 'de.unkrig.cscontrib.checks.Alignment')
- The 'messageFormat' (if set) is found in the event message
- The 'moduleIdFormat' (if set) is found in the ID of the module that generated the event
This filter can only work if a 'FileContentsHolder' module exists in the configuration.
Properties:
- offFormat
- Line pattern to trigger filter to begin suppression
- onFormat
- Line pattern to trigger filter to end suppression
- checkNameFormat
- Check name pattern to suppress
- messageFormat
- Message pattern to suppress
- moduleIdFormat
- Module ID pattern to suppress
License
CS-CONTRIB.UNKRIG.DE is published under the "New BSD License".
Source Code
The source code is available through SVN:
https://svn.code.sf.net/p/loggifier/code