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

fix: clang-tidy-wrapper's c++ fixes #5599

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

RobbieNeko
Copy link
Contributor

@RobbieNeko RobbieNeko commented Oct 21, 2024

Checklist

Required

Purpose of change

Better code practices are nice, and this will hopefully prevent yelling at us by clang in the future.

Describe the solution

Uses the included script by Scarf that acts as a wrapper for clang-tidy

Describe alternatives you've considered

  • Explode
  • Implode
  • Wait for someone else to do it

The script itself seemed to have some bugs (I had to change which flag it was using to tell it to fix the bugs for one, but it also complained about some missing files). However, any improvement is good

Testing

I hope clang-tidy isn't going to break anything, or else we've got some very bad news for the project as a whole.

Additional context

Thanks for RoyalFox asking me to run the script in the first place

Feel free to update the semantic title category as needed

Updated run command for the script:

$ parallel ./build-scripts/clang-tidy-wrapper.sh {} -fix-errors ::: src/*.{c,h}

wrapping the clang-tidy all nice and tight
@github-actions github-actions bot added the src changes related to source code. label Oct 21, 2024
Copy link
Contributor

autofix-ci bot commented Oct 21, 2024

Autofix has formatted code style violation in this PR.

I edit commits locally (e.g: git, github desktop) and want to keep autofix
  1. Run git pull. this will merge the automated commit into your local copy of the PR branch.
  2. Continue working.
I do not want the automated commit
  1. Format your code locally, then commit it.
  2. Run git push --force to force push your branch. This will overwrite the automated commit on remote with your local one.
  3. Continue working.

If you don't do this, your following commits will be based on the old commit, and cause MERGE CONFLICT.

@RobbieNeko
Copy link
Contributor Author

RobbieNeko commented Oct 21, 2024

Uh oh, looks like it made some bad fixes (or didn't fix everything)

@RoyalFox2140
Copy link
Collaborator

I don't know what went wrong but this script makes our problems worse, specifically:
parallel ./build-scripts/clang-tidy-wrapper.sh {} -fix ::: src/*.{c,h}

Just for context from Discord where we were discussing it. It was supposed to fix the clang errors while Scarf was gone

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
src changes related to source code.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants