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

Add script to delete not utf8 java files and run it #173

Closed
wants to merge 3 commits into from

Conversation

timur-harin
Copy link

@yegor256
In issue 169 you mentioned that you should delete not UTF8 source Java files

I think that we need also to have this script with showing which files were deleted which I put in the help folder

@yegor256
Copy link
Owner

@timur-harin good start, but all filters we keep in the filters/ directory. Try to make a copy of an existing one, for example 040-delete-unparseable.sh. Then, make a test for your script, again using tests/filters/test-040-delete-unparseable.sh as example.

@yegor256
Copy link
Owner

@timur-harin also, when your branch is ready, run make test

@timur-harin
Copy link
Author

@yegor256 are you talking about changing a file 040-delete-unparseable.sh or creating a new one?
If about new one, which number I can take in the start of the file name of script?

@yegor256
Copy link
Owner

@timur-harin make a new one and call it 041-delete-non-unicode.sh

@timur-harin
Copy link
Author

@yegor256 I added a test and moved the script

mkdir -p "$(dirname "${list}")"
find "${home}" -type f -not -name '*.java' -print > "${list}"
while IFS= read -r f; do
rm -f "${f}"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@timur-harin looks like you delete ALL files, not only files with a broken encoding inside :)

@yegor256
Copy link
Owner

yegor256 commented Mar 5, 2024

@timur-harin why did you delete files from the fixtures/ directory? I believe, we need them.

@timur-harin
Copy link
Author

@yegor256, in issue there is "delete non-UTF8 source Java files"
I understood that like

files that make up a project. They contain the code written by the developers and are used to build the final executable or deployable software

So I had to delete not UTF8 Java files in project

@timur-harin
Copy link
Author

@yegor256 If I am not right, correct me

@yegor256
Copy link
Owner

yegor256 commented Mar 5, 2024

@timur-harin the objective of this filter is to delete files that have wrong encoding inside, which is not UTF-8 and not ASCII

@yegor256
Copy link
Owner

@timur-harin it was implemented in #285

@yegor256 yegor256 closed this Apr 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants