Split and Organize Checkstyle inputs by Test for LineLength #4013

Closed
romani opened this Issue Mar 15, 2017 · 12 comments

Comments

Projects
None yet
4 participants
@romani
Member

romani commented Mar 15, 2017

subtask of #3891 .

do a copy of all test input files to separate folder for FileLength .
Not any other Check should use new inputs.

@romani

This comment has been minimized.

Show comment
Hide comment
@MikhailovOlegM

This comment has been minimized.

Show comment
Hide comment
@MikhailovOlegM

MikhailovOlegM Mar 16, 2017

Contributor

I am on it

Contributor

MikhailovOlegM commented Mar 16, 2017

I am on it

@timurt

This comment has been minimized.

Show comment
Hide comment
@timurt

timurt Mar 19, 2017

Collaborator

@MikhailovOlegM
Ok, every test class (FileLengthChekTest.java, LineLengthCheckTest.java and etc) uses some fake sample classes to test functionality.
Package for sample classes is src.test.resources.com.puppycrawl.toosl.checkstyle.checks, here you can find a lot of classes which main purpose is to be testing rat.
For example, LineLengthCheckTest class uses InputLongImportStatements.java class.
But you can see that several test classes can use same sample class, it is not good because changing one sample class can affect some results of the several test classes.
Another problem that is it a little bit hard to navigate among sample classes.
so your task is

  1. create subfolder 'linelength' for sample classes
  2. copy (or move) all necessary sample classes to new subfolder
  3. change path inside LineLengthCheckTest.java
Collaborator

timurt commented Mar 19, 2017

@MikhailovOlegM
Ok, every test class (FileLengthChekTest.java, LineLengthCheckTest.java and etc) uses some fake sample classes to test functionality.
Package for sample classes is src.test.resources.com.puppycrawl.toosl.checkstyle.checks, here you can find a lot of classes which main purpose is to be testing rat.
For example, LineLengthCheckTest class uses InputLongImportStatements.java class.
But you can see that several test classes can use same sample class, it is not good because changing one sample class can affect some results of the several test classes.
Another problem that is it a little bit hard to navigate among sample classes.
so your task is

  1. create subfolder 'linelength' for sample classes
  2. copy (or move) all necessary sample classes to new subfolder
  3. change path inside LineLengthCheckTest.java
@MikhailovOlegM

This comment has been minimized.

Show comment
Hide comment
@MikhailovOlegM

MikhailovOlegM Mar 19, 2017

Contributor

Wow, thank you very much!
I'm confused on the understanding of the interconnection of resources and tests

Contributor

MikhailovOlegM commented Mar 19, 2017

Wow, thank you very much!
I'm confused on the understanding of the interconnection of resources and tests

@MikhailovOlegM

This comment has been minimized.

Show comment
Hide comment
@MikhailovOlegM

MikhailovOlegM Mar 19, 2017

Contributor

Now I have done almost everything, but there is only one mistake:
I changed the package, the name of the file and the path to it, but now it can not see the file

Contributor

MikhailovOlegM commented Mar 19, 2017

Now I have done almost everything, but there is only one mistake:
I changed the package, the name of the file and the path to it, but now it can not see the file

@timurt

This comment has been minimized.

Show comment
Hide comment
@timurt

timurt Mar 19, 2017

Collaborator

make sure your paths inside LineLengthCheckTest (getPath, getNonCompilablePath) are the same as actual paths.
Your new package for sample files should be like
src.test.resources.com.puppycrawl.toosl.checkstyle.checks.sizes.linelength

Collaborator

timurt commented Mar 19, 2017

make sure your paths inside LineLengthCheckTest (getPath, getNonCompilablePath) are the same as actual paths.
Your new package for sample files should be like
src.test.resources.com.puppycrawl.toosl.checkstyle.checks.sizes.linelength

@MikhailovOlegM

This comment has been minimized.

Show comment
Hide comment
@MikhailovOlegM

MikhailovOlegM Mar 19, 2017

Contributor

Yes, package is
package com.puppycrawl.tools.checkstyle.checks.sizes.linelength;

Contributor

MikhailovOlegM commented Mar 19, 2017

Yes, package is
package com.puppycrawl.tools.checkstyle.checks.sizes.linelength;

@romani

This comment has been minimized.

Show comment
Hide comment
@romani

romani Apr 5, 2017

Member

issue is recreated to #4160 to hide all discussion that are scary for new contributors

Member

romani commented Apr 5, 2017

issue is recreated to #4160 to hide all discussion that are scary for new contributors

@romani romani closed this Apr 5, 2017

romani added a commit that referenced this issue Apr 5, 2017

@romani

This comment has been minimized.

Show comment
Hide comment
@romani

romani Apr 5, 2017

Member

actually, I merged author changes to master, they were ready.

Member

romani commented Apr 5, 2017

actually, I merged author changes to master, they were ready.

@rnveach

This comment has been minimized.

Show comment
Hide comment
@rnveach

rnveach Apr 5, 2017

Member

Added missing tags.

Member

rnveach commented Apr 5, 2017

Added missing tags.

@MikhailovOlegM

This comment has been minimized.

Show comment
Hide comment
@MikhailovOlegM

MikhailovOlegM Apr 6, 2017

Contributor

i messsed

Contributor

MikhailovOlegM commented Apr 6, 2017

i messsed

@rnveach

This comment has been minimized.

Show comment
Hide comment
@rnveach

rnveach Apr 6, 2017

Member

@MikhailovOlegM My comment had nothing to do with your work.

Member

rnveach commented Apr 6, 2017

@MikhailovOlegM My comment had nothing to do with your work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment