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

Adds clang-format to pre-commit to 3.40 #59677

Merged
merged 4 commits into from
Dec 2, 2024
Merged

Conversation

3nids
Copy link
Member

@3nids 3nids commented Dec 1, 2024

manual backport of #59664

run pre-commit on all files which was not done yet on this branch

@3nids 3nids added the Backport Is a backport of another pull request label Dec 1, 2024
@github-actions github-actions bot added this to the 3.40.2 milestone Dec 1, 2024
Copy link

github-actions bot commented Dec 1, 2024

🪟 Windows builds

Download Windows builds of this PR for testing.
Debug symbols for this build are available here.
(Built from commit 09b6780)

🪟 Windows Qt6 builds

Download Windows Qt6 builds of this PR for testing.
(Built from commit 09b6780)

@nyalldawson
Copy link
Collaborator

@3nids I'm not really sure what I'm supposed to be using to auto-format anymore. I understood that pre-commit should be formatting all files not exposed to sip, and astyle for the rest (for now). But I only see pre-commit format some files, and the rest are just unchanged (eg editing a .cpp file in src/raster)

@3nids
Copy link
Member Author

3nids commented Dec 2, 2024

@nyalldawson have you done pre-commmit install (probably with -f if you had prepare_commit as a commit hook before)

https://github.com/qgis/QGIS-Documentation/blob/master/docs/developers_guide/git.rst#procedure

@uclaros
Copy link
Contributor

uclaros commented Dec 2, 2024

@3nids Maybe it's worth posting what needs to be changed to the devs mailing list

@3nids
Copy link
Member Author

3nids commented Dec 2, 2024

@3nids 3nids merged commit c47cea5 into release-3_40 Dec 2, 2024
34 of 36 checks passed
@3nids 3nids deleted the clang-format-340 branch December 2, 2024 09:34
@nyalldawson
Copy link
Collaborator

@3nids

have you done pre-commmit install (probably with -f if you had prepare_commit as a commit hook before)

Yep. Something's definitely wonky -- try editing a cpp file in src/core, and neither scripts/prepare-commit.sh nor pre-commit run will apply any formatting change to it.

@3nids
Copy link
Member Author

3nids commented Dec 3, 2024

@nyalldawson I was quite sure I tested this... fixed here https://github.com/qgis/QGIS/pull/59713/files?w=1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backport Is a backport of another pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants