-
-
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
Add Support for clang-format #763
Comments
This issue has been automatically marked as stale because it has not had recent activity. If you think this issue should stay open, please remove the |
This still seems worthwhile to me. |
Looks like the bot failed to remove the stale label. |
Did it manually :) |
This issue has been automatically marked as stale because it has not had recent activity. If you think this issue should stay open, please remove the |
This issue has been automatically marked as stale because it has not had recent activity. If you think this issue should stay open, please remove the |
This issue has been automatically marked as stale because it has not had recent activity. If you think this issue should stay open, please remove the |
This issue has been automatically marked as stale because it has not had recent activity. If you think this issue should stay open, please remove the |
I'm interested enough in this issue to try adding this myself, but is there a consensus if megalinter should install clang-format the official way (ie building llvm from source), or is the much simpler but unofficial npm package acceptable? |
@daltonv thanks for your motivation :) It's ok to use a package manager if it is more performant ... and maintained, so we are sure to get the latest version ^^ The neighbors of super-linter use another docker image, it can be checked too |
Great for your interest! It is one of the linters from super-linter that is missing in Megalinter. If you're talking about the npm package by angular, https://www.npmjs.com/package/clang-format, it is already outdated and unmaintained ;( Building llvm + clang + tools from source each time might be a bit too long in GitHub actions runners, we already have workflows that take almost an hour. If I remember correctly, clang-format isn't stable between versions, and thus projects using clang-format usually pin a version. How do we handle that? Do we only provide the latest release, and projects must use another solution if they need a specific version? And lastly, we need to make sure that it works with the muslc in Alpine. |
I see that there is an apk package containing clang-format, maybe it can work ? https://pkgs.alpinelinux.org/package/edge/main/ppc64le/clang16-extra-tools |
it's big, but as clang-format is in super-linter I think it has to be in MegaLinter |
I would definitely be in favor of a "c" flavor. I primarily work on embedded C projects, so I'll take a look at all the linters and see what else makes sense to be in that flavor. |
@daltonv to add a new flavor, you can check this PR -> https://github.com/oxsecurity/megalinter/pull/2778/files#diff-98d0f806abc9af24e6a7c545d3d77e8f9ad57643e27211d7a7b896113e420ed2 Don't be frightened by the number of files, they are almost all generated :) Basically, update flavor_factory.py, update the descriptors to add the new flavor name , and run |
A while back in January, I started drafting a list of linters, when I started using cmake-format: New C/C++/CMake linter ideas Is your feature request related to a problem? Please describe.
Describe the solution you'd like Describe alternatives you've considered Additional context |
@echoix indeed more reliable C/C++ linters in MegaLinter could be good ! :) |
So Maybe we have a new |
We could have a new flavor c_cpp :) |
Adds a new flavor for pure c_cpp developement. This flavor can later add the clang-format and other linters suggested in oxsecurity#763
Adds a new flavor for pure c_cpp developement. This flavor can later add the clang-format and other linters suggested in oxsecurity#763
* Add new c_cpp flavor descriptive items Next commit will build the descriptive items for this flavor. * Add c_cpp flavor Adds a new flavor for pure c_cpp developement. This flavor can later add the clang-format and other linters suggested in #763 --------- Co-authored-by: Nicolas Vuillamy <nicolas.vuillamy@gmail.com>
Adds a new flavor for pure c_cpp developement. This flavor can later add the clang-format and other linters suggested in oxsecurity#763
Direct follow-up of the previous commit. Just adds the generated files that are a result of adding clang-format. This closes oxsecurity#763
Direct follow-up of the previous commit. Just adds the generated files that are a result of adding clang-format. This closes oxsecurity#763
Direct follow-up of the previous commit. Just adds the generated files that are a result of adding clang-format. This closes oxsecurity#763
Direct follow-up of the previous commit. Just adds the generated files that are a result of adding clang-format. This closes oxsecurity#763
Direct follow-up of the previous commit. Just adds the generated files that are a result of adding clang-format. This closes oxsecurity#763
Direct follow-up of the previous commit. Just adds the generated files that are a result of adding clang-format. This closes oxsecurity#763
Direct follow-up of the previous commit. Just adds the generated files that are a result of adding clang-format. This closes oxsecurity#763
Direct follow-up of the previous commit. Just adds the generated files that are a result of adding clang-format. This closes oxsecurity#763
Direct follow-up of the previous commit. Just adds the generated files that are a result of adding clang-format. This closes oxsecurity#763
Covering 6 different languages and 2 different serialization formats, this linter offers a lot of bang for your buck and seems like a good fit for Mega-Linter. It is one of a very small number of linters present in Super-Linter but missing from Mega-Linter.
The only officially supported installation method is building from source in conjunction with all of LLVM, but unofficially it is also available as a Docker image and Node.js package from Unibeautify.
The text was updated successfully, but these errors were encountered: