-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Add linting/codestyle control #12
Comments
(from #39) At this time I prefer default rustfmt settings as code style (https://rust-lang.github.io/rustfmt/?version=master&search=) even in C/C++ code (where applicable, of course) I suggest adapt rustfmt defaults to clang format |
@officialdarksheao can I assign you to this task? |
We have a lot of thirdparty SDK code in |
@nikita-b can I assign you to this task? |
@glitchcore Yes, sure |
@nikita-b Do you still want to do this task? |
Here's an example of an action that executes What do you think about this approach? |
@glitchcore Yes, sorry for the delay. I'll start today. |
Wouldn't it be better if a pre-commit hook ran clang-format check, detected if the output differed from the input file and notified the developer with a warning and a hint to run clang-format manually? This way developers are encouraged to periodically (or automatically) run clang-format themselves and even more importantly, will prevent pollution of git history with formatting commits. |
Since the pre-commit hooks run locally on the developer's machine, and the clang-format parameters change from version to version, we'll need to make sure that all developers have the same clang-format version. |
Formatting errors can be detected with the following command:
|
Pre-commit hook is a great idea, but I think it'll be more complicated for contributors with the Windows machine and new contributors. I suggest starting with CI and git history won't be a problem if we squash commits before a merge. |
SubGhz: MegaCode display changes
Create UniRFRemix.md
Nobody want to work with dirty code and I suggest:
Also need to add information about code style checking to contribution guide.
I hear about clang format
The text was updated successfully, but these errors were encountered: