Skip to content

Conversation

@shenxianpeng
Copy link
Collaborator

@shenxianpeng shenxianpeng commented Dec 8, 2022

@shenxianpeng
Copy link
Collaborator Author

I set up a test repo for testing this PR, and I met an error.

Get list of specified source files INFO:CPP Linter:Fetching files list from url: https://api.github.com/repos/shenxianpeng/test-libvips/pulls/1 Traceback (most recent call last): File "/home/runner/.local/bin/cpp-linter", line 8, in <module> sys.exit(main()) File "/home/runner/.local/lib/python3.10/site-packages/cpp_linter/run.py", line 776, in main get_list_of_changed_files() File "/home/runner/.local/lib/python3.10/site-packages/cpp_linter/run.py", line 140, in get_list_of_changed_files Globals.FILES = parse_diff(Globals.response_buffer.text) File "/home/runner/.local/lib/python3.10/site-packages/cpp_linter/git.py", line 86, in parse_diff assert filename_match is not None AssertionError Error: Process completed with exit code 1.

For more details please refer to https://github.com/shenxianpeng/test-libvips/actions/runs/3663128053/jobs/6192704805
(note: this test repo would be deleted if this PR passes the test and is released)

@2bndy5
Copy link
Collaborator

2bndy5 commented Dec 10, 2022

Good that you're testing in a PR. That was one concern before merging.

I was able to reproduce the issue using the fetched diff. Turns out my regex logic doesn't account for renamed files in the diff. It only skips deleted files. To test this more thoroughly we'd need a commit the renames a some files and makes changes to a few of the renamed files.

I was able to determine the new name for renamed files with a fix locally. The test diff is quite large, but the parse_diff() returned 645 files for diff about 735 files. This was also getting triggered for binary files that are in the diff.

@2bndy5
Copy link
Collaborator

2bndy5 commented Dec 10, 2022

I just pushed the fix. you should be able to re-run the CI.

@shenxianpeng
Copy link
Collaborator Author

The test action passed this time

@2bndy5
Copy link
Collaborator

2bndy5 commented Dec 11, 2022

@2bndy5 2bndy5 closed this Dec 11, 2022
@2bndy5 2bndy5 deleted the use-git-directly branch December 11, 2022 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants