How to use Checkstyle
Checkstyle can be used by uploading an XML configuration file, which details which
checks are to be performed. Detailed documentation can be found on the
Checkstyle website.
At the moment, the Praktomat only supports Checkstyle version 4.4.
The checks are
- that switch statements have a "default" choice
- that types are not declared to be thrown
- that the names of constants, members, methods and parameters follow the normal
conventions about using upper-/lowercase letters and numbers
- that sizes for the file, line, etc are limited
- that blocks are formatted so that left curly brackets are at the end of lines not
on a line by themselves etc.
Example of a configuration file:
A check that is provided without properties either has no properties (such as
'AvoidNestedBlocks')
or has default values (for example the default value of 'LineLength'
is 80). Default values can be overwritten by using a <property name="..."
value="..."/> tag.
Using 'RegExp', checks can be written for any textual pattern.
This can be single-line, multi-line and can be inclusive or exclusive of comments.
It can be specified how many matches are allowed.
Software und Dokumente der ProFormA-Gruppe der Ostfalia
https://elearning-ostfalia.github.io/proforma/
Dieses Vorhaben wurde aus Mitteln des Bundesministeriums für Bildung und
Forschung unter den Förderkennzeichen 01PL11066H und 01PL16066H gefördert.
Die Verantwortung für den Inhalt dieser Webseite liegt bei den Autorinnen.