-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Generates problem markers for a C++ project using clang-tidy #5533
Conversation
You are missing a |
a1c780c
to
a310d96
Compare
@lmcbout you are missing the updates to the |
I moved interfaces around in #5024. Some of the imports in this PR need update. |
I think the commit message needs updating, it isn't informative enough about the new functionality and is quite hard to follow:
Something more appropriate may be:
and then you can finish up with the specifics you previously mentioned. |
@lmcbout can you re-push, it looks like the eca check didn't work? |
@vince-fugnitto I just revalidate the ECA and all checks are green |
@lmcbout am I doing something wrong, I followed the task you provided in the description and it's not running at the moment. |
@vince-fugnitto are you using clang version 9 ? |
Yes, |
@vince-fugnitto to run the task, you need to install "clang-tidy" Note: the task is using the program clang-tidy" and Theia is using "clang" version 9 with the preference setting |
Clang-tidy is already there no? |
No , you see two things in the problem marker: |
If it is required to have |
Added a comment in the Readme.md file to install clang-tidy tool |
It's fine for linux but not other operating systems unfortunately. |
The PR works well, I had to update the task that was provided in the documentation to only lint the Maybe it'd be good another person tests as well, maybe @elaihau could you take a look too? |
16f1583
to
d91a6a0
Compare
@vince-fugnitto I added some comments in the README file |
Enable running the `clang-tidy` C/C++ linting present from clang-tidy as a task. With the new updates, linting can be performed across an entire workspace using user specified checks and linting rules. The problem markers collected when executing the task will be recorded and displayed in the `problems-widget`. The result in the "Problems" view is persistent until you re-generates the task. Signed-off-by: Jacques Bouthillier <jacques.bouthillier@ericsson.com>
I won't comment anymore on the documentation :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested in my local env with the help from Vincent.
Fixes #5532
Description
Run the C/C++ linting tool
clang-tidy
as a task to generate problem markers which can be later consumed by theproblems-view
.Setup
cpp.clangTidy
"cpp.clangTidyChecks": "*"
.clang-tidy
file: create aclang-tidy
file at the root of the workspace, and add the following:This will verify the linter with the selected files for the
"readability"
flaws.If you happen to test for
"hicpp*
warnings, they will be reported as errorsbecause of
WarningsAsErrors: "hicpp-*"
How to Test
tasks.json
file under the directory.theia
of the workspace.Tasks: Run Tasks
thenshell: [Task] clang-tidy
.Additional Information
clang-tidy
executableclangd
version 9 or later"cpp.clangTidyChecks": "-*" will disable all default checks (-*) and add you choice of linter after, reference http://clang.llvm.org/extra/clang-tidy/