Skip to content

lines-changed-only gets confused when lines only deleted from a file #18

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

Closed
turol opened this issue Nov 3, 2022 · 4 comments · Fixed by cpp-linter/cpp-linter-action#123
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@turol
Copy link

turol commented Nov 3, 2022

From chocolate-doom/chocolate-doom#1538
It complains about all issues in file src/hexen/p_enemy.c
The PR only deleted lines from this file and did not add any. This led to "lines": [] being passed to clang-format which was interpreted as "lint whole file".

@2bndy5
Copy link
Contributor

2bndy5 commented Nov 3, 2022

I think there was a reason I made it lint the whole file if no changed lines were specified, but you make a good case. I think the unit tests will need to also reflect such a change.

@shenxianpeng shenxianpeng added bug Something isn't working good first issue Good for newcomers labels Nov 4, 2022
@2bndy5 2bndy5 transferred this issue from cpp-linter/cpp-linter-action Nov 7, 2022
@2bndy5
Copy link
Contributor

2bndy5 commented Nov 12, 2022

@shenxianpeng To be clear, the desired behavior here is to skip the file entirely if there are no new lines added. The solution you initially proposed in #21 doesn't satisfy that behavior.

2bndy5 added a commit that referenced this issue Nov 12, 2022
@shenxianpeng
Copy link
Contributor

Reopen this issue until it passed test from cpp-linter-action

@shenxianpeng
Copy link
Contributor

Hi @turol this issue has been resolved by @2bndy5 which has been included in cpp-linter/cpp-linter-action@v2
Please let us know in case of any problems. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants