Skip to content
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

Abbreviation as word in name check#195 compilable ut input Compilable UT inputs #230

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions sevntu-checks/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,26 @@
<target>1.5</target>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.9</version>
<executions>
<execution>
<id>add-test-source</id>
<phase>generate-test-sources</phase>
<goals>
<goal>add-test-source</goal>
</goals>
<configuration>
<sources>
<source>sevntu-checks/src/test/resources/com/github/sevntu/checkstyle/checks/naming/InputAbbreviationAsWordInTypeNameCheckOverridableMethod.java</source>
<source>sevntu-checks/src/test/resources/com/github/sevntu/checkstyle/checks/naming/InputAbbreviationAsWordInTypeNameCheck.java</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package com.github.sevntu.checkstyle.checks.naming;

public class AbbreviationClass {
protected void oveRRRRRrriddenMethod(){
int a = 0;
// blah-blah
}
protected void oveRRRRRrriddenMethod1(){
int a = 0;
// blah-blah
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.puppycrawl.tools.checkstyle.naming;
package com.github.sevntu.checkstyle.checks.naming;

abstract public class IIIInputAbstractClassName {
abstract class IIIInputAbstractClassName {
}

abstract class NonAAAAbstractClassName {
Expand All @@ -14,26 +14,26 @@ abstract class NonAbstractInnerClass {
}
}

abstract class ClassFactory {
abstract class ClassFactory1 {
abstract class WellNamedFactory {
}
}

class NonAbstractClass {
class NonAbstractClass1 {
}

class AbstractClass {
class AbstractClass1 {
}

class Class1Factory {
class Class1Factory1 {
}

abstract class AbstractClassName2 {
abstract class AbstractClass2Name2 {
class AbstractINNERRClass {
}
}

abstract class Class2Factory {
abstract class Class2Factory1 {
class WellNamedFACTORY {
public void marazmaticMETHODName() {
int marazmaticVARIABLEName = 2;
Expand All @@ -42,7 +42,7 @@ public void marazmaticMETHODName() {
}
}

public interface Directions {
interface Directions {
int RIGHT=1;
int LEFT=2;
int UP=3;
Expand All @@ -54,7 +54,7 @@ interface BadNameForInterfeis
void interfaceMethod();
}

abstract class NonAAAAbstractClassName1 {
abstract class NonAAAAbstractClassName2 {
public int serialNUMBER = 6;
public final int s1erialNUMBER = 6;
private static int s2erialNUMBER = 6;
Expand Down Expand Up @@ -85,7 +85,7 @@ interface Interface4 {

}

public class FIleNameFormatException extends Exception {
class FIleNameFormatException extends Exception {

private static final long serialVersionUID = 1L;

Expand All @@ -103,3 +103,7 @@ int getScaleX() {
}
}

public class InputAbbreviationAsWordInTypeNameCheck {

}

Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
package com.puppycrawl.tools.checkstyle.naming;
package com.github.sevntu.checkstyle.checks.naming;

import org.junit.Before;

abstract class NonAAAAbstractClassName1 {
abstract class NonAAAAbstractClassName1 extends AbbreviationClass {
public int serialNUMBER = 6;
public final int s1erialNUMBER = 6;
private static int s2erialNUMBER = 6;
private static final int s3erialNUMBER = 6;

@Override
@SuppressWarnings
@SuppressWarnings(value = { "" })
@Before
private void oveRRRRRrriddenMethod(){
protected void oveRRRRRrriddenMethod(){
int a = 0;
// blah-blah
}
Expand All @@ -26,12 +26,12 @@ private void oveRRRRRrriddenMethod(){

}

class Class2 extends Class1 {
class Class2 extends AbbreviationClass {

@Override
@SuppressWarnings
@SuppressWarnings(value = { "" })
@Before
private void oveRRRRRrriddenMethod(){
protected void oveRRRRRrriddenMethod1(){
int a = 0;
// blah-blah
}
Expand Down