dlang-community / D-Scanner

Swiss-army knife for D source code
Boost Software License 1.0
242 stars 80 forks source link

Print help to stdout not stderr #945

Closed ryuukk closed 9 months ago

CyberShadow commented 6 months ago

I don't think this is quite right. If a switch is added in the future, and a program will try to use that switch, but the D-Scanner version will not have that switch yet, then this will send the help text to the program invoking D-Scanner. It will then try to parse the help text as if it was D-Scanner output.

Generally, messages intended for humans go to stderr, and messages for consumers of program output go to stdout.

If help text is requested specifically (e.g. via --help), then help text can be sent to stdout, but only then.

ryuukk commented 1 month ago

@CyberShadow sent a PR to fix it: https://github.com/dlang-community/D-Scanner/pull/960