Skip to content
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

clang-tidy settings UseColor breaks clang-tidy integration #10407

Closed
tnixeu opened this issue Jan 20, 2023 · 2 comments
Closed

clang-tidy settings UseColor breaks clang-tidy integration #10407

tnixeu opened this issue Jan 20, 2023 · 2 comments
Assignees
Labels
bug Feature: Code Analysis Related to integration with clang-tidy, cppcheck, cl.exe /analyze, etc. fixed Check the Milestone for the release in which the fix is or will be available. Language Service verified Bug has been reproduced
Milestone

Comments

@tnixeu
Copy link

tnixeu commented Jan 20, 2023

Environment

  • OS and Version: Windows 11
  • VS Code Version: v1.74.3
  • C/C++ Extension Version: v1.13.9
  • clang-tidy Version: v15.0.6

Bug Summary and Steps to Reproduce

Bug Summary:

The clang-tidy integration does not work if in the clang-tidy configuration file UseColor is set to true. It seems that the coloring information breaks the parser.

Steps to reproduce:

  1. Create a clang-tidy configuration file
  2. Set UserColor to true
  3. set "C_Cpp.loggingLevel": "Information" // not need but helps debugging it
  4. Run Code Analysis
  5. Clang-tidy finishes but no warnings or errors are highlighted by squiggles
  6. Output in C/C++ log shows the clang-tidy output as
    grafik

Expected behavior:

Ignore coloring information when parsing clang-tidy output or silently configure clang-tidy to not use color in its output by adding --use-color=false to the command line.

Workaround:

For now I am using "C_Cpp.codeAnalysis.clangTidy.args": ["--use-color=false"] in order to get the clang-tidy integration working again.

Configuration and Logs

I do not think this is need for this bug

Other Extensions

No response

Additional context

No response

@michelleangela michelleangela added bug Feature: Code Analysis Related to integration with clang-tidy, cppcheck, cl.exe /analyze, etc. labels Jan 23, 2023
@michelleangela michelleangela added this to the 1.14 milestone Jan 23, 2023
@michelleangela michelleangela added the verified Bug has been reproduced label Jan 24, 2023
@michelleangela
Copy link
Contributor

@tnixeu
Thanks for finding and reporting this issue. The extension's parser for clang-tidy indeed doesn't consider color information from the clang-tidy output. This issue is slated to be fixed.

@bobbrow bobbrow modified the milestones: 1.14, On Deck Feb 7, 2023
@browntarik browntarik added the fixed Check the Milestone for the release in which the fix is or will be available. label Feb 13, 2023
@browntarik browntarik removed the fixed Check the Milestone for the release in which the fix is or will be available. label Feb 13, 2023
@sean-mcmanus sean-mcmanus modified the milestones: On Deck, 1.15 Feb 13, 2023
@browntarik browntarik added the fixed Check the Milestone for the release in which the fix is or will be available. label Mar 6, 2023
@sean-mcmanus sean-mcmanus modified the milestones: 1.15, 1.15.0 Mar 10, 2023
@sean-mcmanus
Copy link
Collaborator

The fix is available with 1.15.0 (pre-release): https://github.com/microsoft/vscode-cpptools/releases/tag/v1.15.0

@github-actions github-actions bot locked and limited conversation to collaborators Jun 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Feature: Code Analysis Related to integration with clang-tidy, cppcheck, cl.exe /analyze, etc. fixed Check the Milestone for the release in which the fix is or will be available. Language Service verified Bug has been reproduced
Projects
None yet
Development

No branches or pull requests

6 participants