|
|||||||||||||||||||
Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
ClassNamingConventions.java | 100% | 100% | 100% | 100% |
|
1 | /** | |
2 | * BSD-style license; for more info see http://pmd.sourceforge.net/license.html | |
3 | */ | |
4 | package net.sourceforge.pmd.rules; | |
5 | ||
6 | import net.sourceforge.pmd.AbstractRule; | |
7 | import net.sourceforge.pmd.ast.ASTClassOrInterfaceDeclaration; | |
8 | ||
9 | public class ClassNamingConventions extends AbstractRule { | |
10 | ||
11 | 2 | public Object visit(ASTClassOrInterfaceDeclaration node, Object data) { |
12 | 2 | if (Character.isLowerCase(node.getImage().charAt(0))) { |
13 | 1 | addViolation(data, node); |
14 | } | |
15 | 2 | return data; |
16 | } | |
17 | } |
|