Skip to content

manual: add IDE integration chapter - #9122

Open
danmar wants to merge 2 commits into
cppcheck-opensource:mainfrom
cppchecksolutions:manual-ide-integration
Open

danmar wants to merge 2 commits into
cppcheck-opensource:mainfrom
cppchecksolutions:manual-ide-integration

Conversation

@danmar

@danmar danmar commented Dec 5, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

Describe how to integrate Cppcheck in Visual Studio Code, Visual Studio
(external tools), Eclipse-based IDEs and CLion.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@dmcppcheck dmcppcheck left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI review

This PR only changes documentation. The main problem is in the Visual Studio External Tools arguments: $(ItemPath) and --project=$(ProjectDir)$(ProjectFileName) are not quoted. Visual Studio does not quote the expanded macros, so a file or project under a path with spaces (for example C:\Users\John Doe\source\repos\...) is split into several arguments, and Cppcheck then looks for files that don't exist. Apart from that I found nothing wrong: all 21 new images are present and are valid PNGs, the premium blocks use the same content-visible when-profile syntax that filters/manual.lua already handles, and the options the chapter mentions (--template=vs, --premium=misra-c++-2023, --premium=safety-off) are valid in cli/cmdlineparser.cpp.

Comments

# Comment By Where Status
1 $(ItemPath) is unquoted, so paths with spaces break AI review man/manual.md:1524 🆕 New
2 --project=$(ProjectDir)$(ProjectFileName) is unquoted, so paths with spaces break AI review man/manual.md:1533 🆕 New

@danmar, please fix, resolve or reply to the open and new comments: #1, #2.

Testing

  • I did not build cppcheck or run testrunner. The PR only changes man/manual.md and adds PNG files under man/images/, so no code changes.
  • I could not render the manual: neither pandoc nor quarto is installed in the container, so man/buildman.sh could not run.
  • Images: I checked with file that each image the new chapter references exists under man/images/ and is a valid PNG (21 files).
  • Premium blocks: the ::: {.content-visible when-profile="premium"} blocks match the syntax that man/filters/manual.lua supports and that manual.md already uses elsewhere.
  • Options: I checked in cli/cmdlineparser.cpp that --template=vs, --premium=misra-c++-2023 and --premium=safety-off exist and appear in the help text.
  • I did not check the screenshots themselves or the names of the third-party plugins and their settings (VS Code "Cppcheck Official", cppcheclipse, the CLion plugin).

Automated review of 18f0650 by Claude. The pull request was built and tested locally.

Comment thread man/manual.md Outdated

- Title: anything you like, for instance `Cppcheck File`
- Command: the path to the Cppcheck executable, for instance `C:\Program Files\Cppcheck\cppcheck.exe`
- Arguments: `--enable=style -q --template=vs $(ItemPath)`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI review

Visual Studio does not quote the expanded macros in the External Tools "Arguments" field. If the file path contains a space (for example C:\Users\John Doe\source\repos\app\main.cpp), Cppcheck receives several separate arguments and reports that it can't find those files. Microsoft's own external tool examples quote the macro. Suggested argument line:

--enable=style -q --template=vs "$(ItemPath)"

Comment thread man/manual.md Outdated

- Title: anything you like, for instance `Cppcheck Project`
- Command: the path to the Cppcheck executable, for instance `C:\Program Files\Cppcheck\cppcheck.exe`
- Arguments: `--enable=style -j12 -q --template=vs --project=$(ProjectDir)$(ProjectFileName)`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI review

The same problem as for $(ItemPath): $(ProjectDir) very often contains spaces (C:\Users\<name>\source\repos\My Project\), and then the --project= argument is cut off at the first space. Suggested argument line:

--enable=style -j12 -q --template=vs "--project=$(ProjectDir)$(ProjectFileName)"

… the PDF

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@dmcppcheck dmcppcheck left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI review

I found no new problems. The PR changes only documentation: man/manual.md and 21 new PNG screenshots. Both issues from the earlier review are fixed. $(ItemPath) is now quoted, and so is the --project= value. Windows command-line parsing removes quotes in the middle of an argument, so --project="$(ProjectDir)$(ProjectFileName)" arrives as one argument. $(ProjectDir) ends in a backslash, but the file name follows it, so no backslash comes right before the closing quote and the quote is not escaped.

Comments

# Comment By Where Status
1 $(ItemPath) is unquoted, so paths with spaces break AI review man/manual.md:1524 ✅ Fixed
2 --project=$(ProjectDir)$(ProjectFileName) is unquoted, so paths with spaces break AI review man/manual.md:1533 ✅ Fixed

Testing

  • I did not build cppcheck or run testrunner because the PR changes no code.
  • I could not render the manual: neither pandoc nor quarto is installed in the container.
  • Images: I checked with file that all 21 man/images/ide-*.png files that the new chapter references exist and are valid PNGs.
  • Visual Studio arguments: I checked the current argument lines at man/manual.md:1527 and man/manual.md:1541. Both now quote the path macros.

Automated review of 6a362d6 by Claude. The pull request was built and tested locally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants