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

Resolve "Add clang-format" - [merged] #117

Closed
fraunhofer-iis-bot opened this issue Jul 11, 2023 · 11 comments
Closed

Resolve "Add clang-format" - [merged] #117

fraunhofer-iis-bot opened this issue Jul 11, 2023 · 11 comments
Assignees

Comments

@fraunhofer-iis-bot
Copy link
Collaborator

In GitLab by @jannismain on Jul 11, 2023, 10:08

Merges 50-add-make-format-target -> dev

Adding a .clang-format configuration file that resembles the intended coding style found in the code base.

The intended coding style is discovered by adjusting the clang format configuration until the diff is small and only fixes inconsistencies.

Closes #50

@fraunhofer-iis-bot
Copy link
Collaborator Author

In GitLab by @jannismain on Jul 11, 2023, 10:25

There is inconsistent pointer alignment (char* foo vs. char *foo) in the code base.

There seem to be some reasons1 to favor right alignment and forcing right alignment produces a smaller diff than forcing left alignment.

So I choose right alignment as the intended formatting for now.

Footnotes

  1. https://stackoverflow.com/a/558480/5379377

@fraunhofer-iis-bot
Copy link
Collaborator Author

In GitLab by @jannismain on Jul 11, 2023, 10:28

changed target branch from master to dev

@fraunhofer-iis-bot
Copy link
Collaborator Author

In GitLab by @jannismain on Jul 11, 2023, 14:46

added 1 commit

  • 0e88fa05 - add clang-format as pre-commit hook

Compare with previous version

@fraunhofer-iis-bot
Copy link
Collaborator Author

In GitLab by @jannismain on Jul 11, 2023, 15:42

marked this merge request as ready

@fraunhofer-iis-bot
Copy link
Collaborator Author

In GitLab by @jannismain on Jul 11, 2023, 15:42

requested review from @vornkat-iis

@fraunhofer-iis-bot
Copy link
Collaborator Author

In GitLab by @jannismain on Jul 11, 2023, 15:49

added 12 commits

  • 0e88fa05...e242bb66 - 11 commits from branch dev
  • e784a06 - add clang-format as pre-commit hook

Compare with previous version

@fraunhofer-iis-bot
Copy link
Collaborator Author

In GitLab by @vornkat-iis on Jul 11, 2023, 17:21

Pre-commit does not want to run in my WSL Debian 11:

> pre-commit run
An error has occurred: InvalidManifestError: 
==> File /home/szk/.cache/pre-commit/repo_qj_2p5a/.pre-commit-hooks.yaml
==> At Hook(id='clang-format')
==> At key: types_or
==> At index 9
=====> Type tag 'textproto' is not recognized.  Try upgrading identify and pre-commit?

If I remove "textproto", it works.

> pre-commit -V
pre-commit 3.3.3

@fraunhofer-iis-bot
Copy link
Collaborator Author

In GitLab by @vornkat-iis on Jul 11, 2023, 17:45

approved this merge request

@fraunhofer-iis-bot
Copy link
Collaborator Author

In GitLab by @vornkat-iis on Jul 11, 2023, 17:45

mentioned in commit d311e27

@fraunhofer-iis-bot
Copy link
Collaborator Author

In GitLab by @vornkat-iis on Jul 11, 2023, 17:46

Solution: Do as you are told and pip install --upgrade identify and ... pre-commit

@fraunhofer-iis-bot
Copy link
Collaborator Author

In GitLab by @vornkat-iis on Jul 11, 2023, 17:46

resolved all threads

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants