Cs-contrib.unkrig.de: Difference between revisions

From unkrig.de
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
Verifies that C++-style comments ('<code>// ...</code>') are correctly aligned.
= Introduction =
<p>
This project adds custom checks, filters and quickfixes for [http://checkstyle.sourceforge.net/ CheckStyle] and [http://eclipse-cs.sourceforge.net/ Eclipse-CS].
C++-style comments must appear on the same column iff
 
<ul>
= Download =
  <li>They appear in immediately consecutive lines, and
 
  <li>All of these lines are of the same 'kind' (see below)
Install the ECLIPSE plug-in from this update site:
</ul>
    http://cs-contrib.unkrig.de/update
Each line of code relates to one of the following 'kinds':
 
<ul>
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
  <li>A line which contains only a C++-style comment
    http://cs-contrib.unkrig.de/update/plugins/
  <li>A line which contains only a switch label ('<code>case x:</code>' or '<code>default:</code>') and a C++-style comment
and put it on CheckStyle's classpath.
  <li>Any other line
 
</ul>
A [http://cs-contrib.unkrig.de/CHANGELOG.txt change log] is also available.
 
= Checks and Quickfixes =
 
;[[Cs-contrib.unkrig.de / Checks / de.unkrig.Alignment|<code><de.unkrig.Alignment></code>]]
:Verifies that Java elements are vertically aligned.
 
;[[Cs-contrib.unkrig.de / Checks / de.unkrig.CppCommentAlignment|<code><de.unkrig.CppCommentAlignment></code>]]
:Verifies that C++ comments ('// ...') are correctly aligned.
 
;[[Cs-contrib.unkrig.de / Checks / de.unkrig.InnerAssignment|<code><de.unkrig.InnerAssignment></code>]]
:Verifies that assignments in expressions are parenthesized.
 
;[[Cs-contrib.unkrig.de / Checks / de.unkrig.NameSpelling|<code><de.unkrig.NameSpelling></code>]]
:Verifies that the names of Java elements match, respectively no not match given patterns.
 
;[[Cs-contrib.unkrig.de / Checks / de.unkrig.ParenPad|<code><de.unkrig.ParenPad></code>]]
:Enhanced version of "ParenPad": NOSPACE now allows '<code>( // ...</code>'. <span style="color: red">Superseded by '[[Cs-contrib.unkrig.de / Checks / de.unkrig.Whitespace|de.unkrig.Whitespace]]'.</span>
 
;[[Cs-contrib.unkrig.de / Checks / de.unkrig.Whitespace|<code><de.unkrig.Whitespace></code>]]
:Verifies that tokens are, respectively are not preceded with (and/or followed by) whitespace.
 
;[[Cs-contrib.unkrig.de / Checks / de.unkrig.WhitespaceAround|<code><de.unkrig.WhitespaceAround></code>]]
:Verifies that a token is surrounded by whitespace. <span style="color: red">Superseded by '[[Cs-contrib.unkrig.de / Checks / de.unkrig.Whitespace|de.unkrig.Whitespace]]'.</span>
 
;[[Cs-contrib.unkrig.de / Checks / de.unkrig.WrapAndIndent|<code><de.unkrig.WrapAndIndent></code>]]
:Verifies that statements are uniformly wrapped and indented.
 
;[[Cs-contrib.unkrig.de / Checks / de.unkrig.ZeroParameterSuperconstructorInvocation|<code><de.unkrig.ZeroParameterSuperconstructorInvocation></code>]]
:Verifies that no constructor calls the zero-parameter superconstructor.
 
= Filters =
 
;[[Cs-contrib.unkrig.de / Filters / de.unkrig.SuppressionLine|<code><de.unkrig.SuppressionLine></code>]]
:Events (i.e. CheckStyle warnings) are switched off by a 'magic line' ('offCommentFormat') or back on by another 'magic line' ('onCommentFormat').
 
= 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

Revision as of 18:07, 26 December 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 '( // ...'. 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. 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

<de.unkrig.SuppressionLine>
Events (i.e. CheckStyle warnings) are switched off by a 'magic line' ('offCommentFormat') or back on by another 'magic line' ('onCommentFormat').

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