Skip to content

Relative argument paths on Windows #59

@TheOtherMarcus

Description

@TheOtherMarcus

I'm on Windows. I would like to use parameter paths relative to my project.

"cppcheck-official.arguments": "--platform=./CppCheck/platform.xml"

I understand this doesn't work. I then tried running a script to generate parameters

"cppcheck-official.arguments": "@(./CppCheck/plugin_arguments.cmd)"

but I can't get this script to run, even when using an absolute path.

I also tried with a wrapper to cppcheck itself

"cppcheck-official.path": "./CppCheck/plugin_wrapper.cmd"

@echo off

REM Find project root (parent of this script directory)
set ROOT="%~dp0\.."

echo -- >>%ROOT%\args
echo %* >>%ROOT%\args

REM Run cppcheck with all passed arguments
"C:\Program Files\CppCheck Premium\cppcheck.exe" %*

The script is invoked once with the parameter "--version", then silence.

Any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions