-
-
Notifications
You must be signed in to change notification settings - Fork 242
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
Adds the clang-format linter #3089
Conversation
Not sure why the CI tests are failing. Looks like the r linter tests are the ones failing. |
Is there a way I can test this branch against another repo? ie run megalinter locally. I want to ensure the megalinter run picks up the |
If you build the docker image locally, you can then use |
It was failing yesterday too #3086 |
Overall it looks really great! I myself have other questions for @nvuillam :
|
Okay thanks for the tip. Good thing I tried it. There is actually an issue. I set I updated my descriptor to use ``cli_config_arg_name: "--style=file:"` however this does not fix it. When I run manually I see megalinter tries to run
Is there a way I can describe in the descriptor to not add a space? |
Worst case scenario with the |
4845d91
to
19f5937
Compare
When the argument is not
With current ML architecture we have no choice, we just have to make sure that the |
19f5937
to
9bc991f
Compare
Just rebased onto main again. Sorry for the force push. I'm used to the rebase workflow for syncing with main. Let me know if you prefer merge commits and I can use them in the future. |
@daltonv we merge with "squash & merge" option so merge or rebase, the result is the same in the merge commit :) |
9bc991f
to
8dc7234
Compare
8dc7234
to
f770757
Compare
@nvuillam sounds good. Just wanted to ask in case it made it easier to review. |
@daltonv I didn't want to merge just before a new release, but if you merge conflicts, I'll merge the PR and it will be available in beta, then in next release :) |
@nvuillam no worries. I'll fix the conflicts now. |
Modifies the c and cpp descriptor files so clang-format is added to them. In addition this modifies the c and cpp test files so clang-format now passes. Also adds "Werror" to cspell exceptions as this is a clang term.
Direct follow-up of the previous commit. Just adds the generated files that are a result of adding clang-format. This closes oxsecurity#763
clang-format has a very special syntax for passing a config file as an arg. You must use --style=:myconfig.file. To make this work with megalinter I updated the clang descriptor files to correctly list the config file arg as "--style=:" and modified the Linter.py file to not add a space to any config file args ending in ":" as clang-format cannot have a space for its cli syntax here.
f770757
to
2973c01
Compare
Thanks a lot!! |
Thanks a lot @daltonv ! This is a significant improvement of MegaLinter's assets! |
Is the option to format files in place with the |
@vkucera I didn't add the |
Adding |
Thanks a lot! |
Fixes #763
Proposed Changes
Updates the regular descriptor files for a new linter, but limits this linter to only be installed on the new c_cpp flavor, as the clang-extra-tools package is rather large.
The c and cpp tests were updated to satisfy the clang-formats requirements too.
Readiness Checklist
Author/Contributor
Reviewing Maintainer
breaking
if this is a large fundamental changeautomation
,bug
,documentation
,enhancement
,infrastructure
, orperformance