-
Notifications
You must be signed in to change notification settings - Fork 7
Issue #7: add example for MethodLength #112
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
Conversation
please add expected.txt I confirm that there should be no violation, as update is not related MethodLength. |
@romani @rdiachenko check please |
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.
please do minor changes and merge:
@@ -122,4 +122,21 @@ public void testMemberName() throws Exception { | |||
testByConfig( | |||
"MemberName/patchedline/defaultContextConfig.xml"); | |||
} | |||
|
|||
@Test | |||
@Ignore("MethodLength should have a violation when method length" |
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.
please put "until ", it is much easier to see where are we have problems.
public class Test { | ||
private String name; | ||
|
||
public void test() { // violation context, should be suppressed after patching |
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.
Test.java is always after patch.
should be suppressed after patching
we will see this in expected.txt, lets not duplicate information.
In Input files we keep comment on lines where violation is present without PatchFilter.
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.
please make it simple // violation
to show clearly that is not related to any strategy in filter.
to avoid any other confusion we might have do // violation without filter
to make it absolutely clear. If you agree lets update all Inputs (in separate issue).
@@ -0,0 +1,7 @@ | |||
public class Test { |
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.
contexttwo
-> context/relevant/..
or contextNotRelevant/...
.
#7
Demonstration of the case, when violations should be thrown only before patching and should be suppressed after