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

Format code using clang-format #50

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Format code using clang-format #50

wants to merge 3 commits into from

Conversation

dvzrv
Copy link
Collaborator

@dvzrv dvzrv commented Jan 4, 2022

This adds an editorconfig (see https://editorconfig-specification.readthedocs.io/) file and a clang-format configuration (see https://clang.llvm.org/docs/ClangFormatStyleOptions.html).

All files are formatted using the clang-format configuration file.

Fixes #42

@dvzrv dvzrv added the enhancement New feature or request label Jan 4, 2022
@dvzrv dvzrv requested a review from falkTX January 4, 2022 17:11
@dvzrv dvzrv self-assigned this Jan 4, 2022
@falkTX
Copy link
Member

falkTX commented Jan 4, 2022

So what are the results from such file, does anything need to be modified?

@dvzrv
Copy link
Collaborator Author

dvzrv commented Jan 4, 2022

So what are the results from such file, does anything need to be modified?

The modifications are not yet added.

You can have a look at them using e.g. clang-format -i <path/to/file>

@dvzrv dvzrv force-pushed the issues/42 branch 6 times, most recently from 2d22b66 to 7bf926c Compare January 4, 2022 18:06
dvzrv added 3 commits January 9, 2022 22:33
.editorconfig:
Add basic editorconfig file that enforces tabs of indent size 4 on all
C and C++ files and Unix-style line feeds and a final newline on all
files.
.clang-format:
Add a clang-format configuration file based on the WebKit style, that
enforces a 120 char column length and tabs for indentation (of length
four).
.github/workflows/format.yml:
Add github workflow for checking code formatting, which runs
clang-format in a container and fails if there need to be changes to the
formatting.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Consistency for tabs vs spaces
2 participants