-v option (--vc-report) should direct output to stderr by default, like -o (--std-report) does, even if filename is not specified

Issue #63 resolved
Alexander Ustinov created an issue

At the moment it is not possible to specify -v option without specified file name right after it. -o, in contrast to -v - allows to omit filename, that way output will be redirected to stderr by default

Please implement the same behavior for -v as it was implemented for -o, it should output to stderr if filename is not specified

Reason: it's hard to integrate vera++ and Visual Studio (post-build task), because we need to write to file, then to "cat" (type in windows) the file to stderr then, just to enable vera++ output in Visual Studio Output Window.

-v option is needed to allow Visual Studio tol understand filenames and to allow to navigate right from Output Window.

Comments (4)

  1. Gaëtan Lehmann

    You can use -v followed by - to display the result on the standard output (or error output if used with --warning or --error):

    $ ./src/vera++ --root=.. ../tests/L005.cpp -v -
    ../tests/L005.cpp(1): leading empty line(s)
    ../tests/L005.cpp(1): no copyright notice found
    ../tests/L005.cpp(6): too many consecutive empty lines
    ../tests/L005.cpp(8): trailing empty line(s)
    

    Does it match your need?

  2. Alexander Ustinov reporter

    thanks, that helped. although '-' is not intuitive and a bit unexpected (according to UNIX principles of design)

  3. Log in to comment