-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MAROUANE MOULOUE - AHMED ED-DAHBY #12
base: develop
Are you sure you want to change the base?
Conversation
violation.setLine(constant.getLineNum()); | ||
addViolation(violation); | ||
} | ||
if (!fieldName.contains("_")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not necessary to have _
in a variable name
|
||
@Override | ||
public boolean isActive() { | ||
// TODO Auto-generated method stub |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
always remove irrelevant comments
for (FieldDeclaration field : attributWrapper.getFields()) { | ||
//get the name of the first variable of the field and check if it starts with a lower case | ||
|
||
String fieldName = field.getVariable(0).getNameAsString(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
field.getVariable(0)
should be generated to all the variables, because some attributes may be declared as follow :
private String foo, bar, tgz;
final List<String> types = compilationUnit.getTypes(); | ||
|
||
for (String typeName : types) { | ||
if (!Character.isUpperCase(typeName.charAt(0))) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
!Character.isUpperCase ==> Character.isLowerCase
violation.setFileName(compilationUnit.getFileName()); | ||
addViolation(violation); | ||
} | ||
if(typeName.contains("_")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not necessary that a variable contains _
No description provided.