Skip to content

ci: coding style checker#27

Merged
Miou-zora merged 12 commits into
mainfrom
13-coding-style-checker
Oct 15, 2024
Merged

ci: coding style checker#27
Miou-zora merged 12 commits into
mainfrom
13-coding-style-checker

Conversation

@MasterLaplace
Copy link
Copy Markdown
Contributor

@MasterLaplace MasterLaplace commented Oct 13, 2024

Add the Clang-Format configuration file and apply it via a git action.

Partially linked to:

@MasterLaplace MasterLaplace added the ci Everything related to continous integration label Oct 13, 2024
@MasterLaplace MasterLaplace added this to the First follow-up milestone Oct 13, 2024
@MasterLaplace MasterLaplace self-assigned this Oct 13, 2024
@MasterLaplace MasterLaplace linked an issue Oct 13, 2024 that may be closed by this pull request
@ripel2 ripel2 changed the title 13 coding style checker ci: coding style checker Oct 13, 2024
@MasterLaplace MasterLaplace marked this pull request as draft October 13, 2024 14:23
@MasterLaplace MasterLaplace marked this pull request as ready for review October 13, 2024 14:58
Copy link
Copy Markdown
Contributor

@Miou-zora Miou-zora left a comment

Choose a reason for hiding this comment

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

We must have the possibility to run this locally, is there a way to do it ?

@MasterLaplace MasterLaplace marked this pull request as draft October 14, 2024 21:51
@MasterLaplace
Copy link
Copy Markdown
Contributor Author

We must have the possibility to run this locally, is there a way to do it ?

Unfortunately, there's no easy way to apply the clang format recursively from the command line.
I use the 'find' command in a Linux environment.
However, the file can be used by the IDE.

find . -iname '*.hpp' -o -iname '*.cpp' | xargs clang-format -i

@MasterLaplace MasterLaplace force-pushed the 13-coding-style-checker branch from f03a17a to c23e058 Compare October 14, 2024 22:32
@Miou-zora
Copy link
Copy Markdown
Contributor

We must have the possibility to run this locally, is there a way to do it ?

Unfortunately, there's no easy way to apply the clang format recursively from the command line. I use the 'find' command in a Linux environment. However, the file can be used by the IDE.

find . -iname '*.hpp' -o -iname '*.cpp' | xargs clang-format -i

Can you find a way to use it on windows please ?

@MasterLaplace
Copy link
Copy Markdown
Contributor Author

MasterLaplace commented Oct 15, 2024

We must have the possibility to run this locally, is there a way to do it ?

Unfortunately, there's no easy way to apply the clang format recursively from the command line. I use the 'find' command in a Linux environment. However, the file can be used by the IDE.

find . -iname '*.hpp' -o -iname '*.cpp' | xargs clang-format -i

Can you find a way to use it on windows please ?

For powershell:

Get-ChildItem -Recurse -Include *.cpp, *.hpp | ForEach-Object {
    clang-format -i $_.FullName
}

Or use git bash on Windows.

@MasterLaplace MasterLaplace requested a review from ripel2 October 15, 2024 10:25
@MasterLaplace MasterLaplace marked this pull request as ready for review October 15, 2024 10:25
@MasterLaplace MasterLaplace requested review from Miou-zora and removed request for ripel2 October 15, 2024 10:29
@Miou-zora
Copy link
Copy Markdown
Contributor

Please, fix conflicts, put theses 2 commands (for linux and for windows) with dependencies into the documentation (README is enough) and you can merge this PR

@MasterLaplace
Copy link
Copy Markdown
Contributor Author

Please, fix conflicts, put theses 2 commands (for linux and for windows) with dependencies into the documentation (README is enough) and you can merge this PR

Both commands are already in the README, and as for the conflicts, since it was your code, I wanted to let you take care of them.

@Miou-zora Miou-zora merged commit ed66f52 into main Oct 15, 2024
@Miou-zora Miou-zora deleted the 13-coding-style-checker branch October 15, 2024 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Everything related to continous integration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Coding Style Checker

2 participants