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

Whole code-base reformatting #3590

Merged
merged 8 commits into from
Jan 26, 2023
Merged

Whole code-base reformatting #3590

merged 8 commits into from
Jan 26, 2023

Conversation

rouault
Copy link
Member

@rouault rouault commented Jan 23, 2023

  • Add a .pre-commit-config.yaml pre-commit configuration file
  • Doc: add a dev_practices.rst page
  • Whole code base reformatting
  • Add .git-blame-ignore-revs

@rouault
Copy link
Member Author

rouault commented Jan 23, 2023

Doc how to setup pre-commit hook at https://github.com/rouault/PROJ/blob/reformat_whole/docs/source/development/dev_practices.rst
This mimmicks recent similar move in GDAL and libtiff

docs/source/development/index.rst Outdated Show resolved Hide resolved
Copy link
Member

@busstoptaktik busstoptaktik left a comment

Choose a reason for hiding this comment

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

If I understand the meaning of this item correctly, I think the commit some years back, where you renamed all .c files to .cpp should probably also be ignored? (there may be others as well, which I have lost track of?)

@rouault
Copy link
Member Author

rouault commented Jan 23, 2023

I think the commit some years back, where you renamed all .c files to .cpp should probably also be ignored? (there may be others as well, which I have lost track of?)

I don't believe this is necessary as git is already smart enough to figure out file renames.

@busstoptaktik
Copy link
Member

busstoptaktik commented Jan 23, 2023

I don't believe this is necessary as git is already smart enough to figure out file renames.

I think you're right: "git blame" appears to work fine - it's just the "contributors"-banner dispayed by Github over each file that only includes people contributing after the renaming. Perhaps more of a Github UI/UX bug-let...

@jjimenezshaw
Copy link
Contributor

I had some difficulties installing clang-format-15 in my Ubuntu 22.04 (things are too old or too new)
So this is a tip if anybody has the same problem. I installed manually the deb files

  • libllvm15_15.0.6-3_ubuntu0.22.04.2_amd64.deb
  • libclang-cpp15_15.0.6-3_ubuntu0.22.04.2_amd64.deb
  • clang-format-15_15.0.6-3_ubuntu0.22.04.2_amd64.deb

from http://security.ubuntu.com/ubuntu/pool/universe/l/llvm-toolchain-15/

@rouault
Copy link
Member Author

rouault commented Jan 24, 2023

I had some difficulties installing clang-format-15 in my Ubuntu 22.04 (things are too old or too new)

unless you want to manually run reformat_cpp.sh, you don't need to do that. Just follow instructions at https://github.com/rouault/PROJ/blob/reformat_whole/docs/source/development/dev_practices.rst#commit-hooks

@rouault rouault merged commit f7e8883 into OSGeo:master Jan 26, 2023
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

4 participants