Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Bring out a test base for scaling tests #1277

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

IlyaPechersky
Copy link

If I understood the request from #1264 correctly, we need to reject files with binary code.

To do this, I added a new check in checks.xml , and also added a test with a new one.a java file with binary code.

@pnatashap
Copy link
Contributor

@IlyaPechersky File with tests become too long, please create one file in addition
you can use this command locally to check if all is good

mvn -B install -Pqulice

@yegor256
Copy link
Owner

@IlyaPechersky actually, #1264 was about something else: we want Qulice to ignore binary files (like PNG, JPEG, or PDF) and don't complain about them. However, your pull request is also interesting, I think we should make it good and then merge.

@IlyaPechersky
Copy link
Author

@yegor256 I realized, it turns out I was really solving another problem)
Now I have separated the common methods and the matcher class into a package so as not to duplicate them in the test classes.
Thus, there are now two types of tests: one checks the content of files, the other meta information.

@yegor256
Copy link
Owner

@pnatashap please, help us review this

@IlyaPechersky
Copy link
Author

@pnatashap do you have any other issues?

@IlyaPechersky
Copy link
Author

@yegor256, Are there any more issues?

@yegor256
Copy link
Owner

yegor256 commented May 23, 2024

@pnatashap can you please take a look one more time?

@IlyaPechersky IlyaPechersky changed the title Ignore files with binary contents automatically Bring out a test base for scaling tests May 27, 2024
@IlyaPechersky
Copy link
Author

In this request, two problems were solved at once: making a test base and adding tests for content in files, so for now I have left the solution to only one problem - making a test base

@IlyaPechersky
Copy link
Author

@yegor256 I left only one problem

Is there something else to add?

@IlyaPechersky
Copy link
Author

@yegor256 Thanks for the article! Replaced inheritance with a utility class

@IlyaPechersky IlyaPechersky requested a review from yegor256 May 28, 2024 07:57
@yegor256
Copy link
Owner

@IlyaPechersky utility classes are also a bad idea in OOP: https://www.yegor256.com/2014/05/05/oop-alternative-to-utility-classes.html

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants