Outils pour utilisateurs

Outils du site


prog:checkstyle

Site web

Cet outils permet de vérifier que les conventions de codage sont corrects.

Deux fichiers de base sont dans le code source : checkstyle/src/main/resources/*.xml

Exemple de rendu :

checkstyle -c sun_checks.xml SQL1.java
Starting audit...
[ERROR] /tmp/SQL1.java:0: Il manque un caractère NewLine à la fin du fichier [NewlineAtEndOfFile]
[ERROR] /tmp/SQL1.java:0: Le fichier package-info.java est manquant. [JavadocPackage]
[ERROR] /tmp/SQL1.java:11: Commentaire javadoc manquant. [JavadocType]
[ERROR] /tmp/SQL1.java:11:1: Les classes utilitaires ne doivent pas avoir de constructeur par défaut ou public. [HideUtilityClassConstructor]
[ERROR] /tmp/SQL1.java:12:1: '{' à la colonne 1 devrait être sur la ligne précédente. [LeftCurly]
[ERROR] /tmp/SQL1.java:13:3: Commentaire javadoc manquant. [JavadocMethod]
[ERROR] /tmp/SQL1.java:13:27: Il y a un espace de trop avant '('. [MethodParamPad]
[ERROR] /tmp/SQL1.java:13:28: Le paramètre args devrait être final. [FinalParameters]
[ERROR] /tmp/SQL1.java:14:3: '{' à la colonne 3 devrait être sur la ligne précédente. [LeftCurly]
[ERROR] /tmp/SQL1.java:15:52: Il y a un espace de trop avant '('. [MethodParamPad]
[ERROR] /tmp/SQL1.java:16:5: '{' à la colonne 5 devrait être sur la ligne précédente. [LeftCurly]
[ERROR] /tmp/SQL1.java:17:30: Il y a un espace de trop avant '('. [MethodParamPad]
[ERROR] /tmp/SQL1.java:19:18: Il y a un espace de trop avant '('. [MethodParamPad]
[ERROR] /tmp/SQL1.java:20:23: Il y a un espace de trop avant '('. [MethodParamPad]
[ERROR] /tmp/SQL1.java:21:23: Il y a un espace de trop avant '('. [MethodParamPad]
[ERROR] /tmp/SQL1.java:23: La ligne excède 80 caractères. [LineLength]
[ERROR] /tmp/SQL1.java:23:46: Il y a un espace de trop avant '('. [MethodParamPad]
[ERROR] /tmp/SQL1.java:23:84: Il y a un espace de trop avant '('. [MethodParamPad]
[ERROR] /tmp/SQL1.java:24:7: '{' à la colonne 7 devrait être sur la ligne précédente. [LeftCurly]
[ERROR] /tmp/SQL1.java:25:40: Il y a un espace de trop avant '('. [MethodParamPad]
[ERROR] /tmp/SQL1.java:26:49: Il y a un espace de trop avant '('. [MethodParamPad]
[ERROR] /tmp/SQL1.java:27:13: Le nom 'NbCol' n'est pas conforme à l'expression '^[a-z][a-zA-Z0-9]*$'. [LocalVariableName]
[ERROR] /tmp/SQL1.java:27:41: Il y a un espace de trop avant '('. [MethodParamPad]
[ERROR] /tmp/SQL1.java:29:9: '{' à la colonne 9 devrait être sur la ligne précédente. [LeftCurly]
[ERROR] /tmp/SQL1.java:30:28: Il y a un espace de trop avant '('. [MethodParamPad]
[ERROR] /tmp/SQL1.java:30:48: Il y a un espace de trop avant '('. [MethodParamPad]
[ERROR] /tmp/SQL1.java:32:28: Il y a un espace de trop avant '('. [MethodParamPad]
[ERROR] /tmp/SQL1.java:33:24: Il y a un espace de trop avant '('. [MethodParamPad]
[ERROR] /tmp/SQL1.java:34:9: '{' à la colonne 9 devrait être sur la ligne précédente. [LeftCurly]
[ERROR] /tmp/SQL1.java:36:11: '{' à la colonne 11 devrait être sur la ligne précédente. [LeftCurly]
[ERROR] /tmp/SQL1.java:37:30: Il y a un espace de trop avant '('. [MethodParamPad]
[ERROR] /tmp/SQL1.java:37:44: Il y a un espace de trop avant '('. [MethodParamPad]
[ERROR] /tmp/SQL1.java:39:30: Il y a un espace de trop avant '('. [MethodParamPad]
[ERROR] /tmp/SQL1.java:44:5: '{' à la colonne 5 devrait être sur la ligne précédente. [LeftCurly]
[ERROR] /tmp/SQL1.java:45:25: Il y a un espace de trop avant '('. [MethodParamPad]
Audit done.
Checkstyle ends with 35 errors.
prog/checkstyle.txt · Dernière modification : 2017/07/02 01:42 de root