openSUSE / suse-doc-style-checker

Style Checker for SUSE Documentation
Other
2 stars 5 forks source link

Output result to stdout #143

Open tomschr opened 7 years ago

tomschr commented 7 years ago

Currently, sdsc supports an optional outputfile. If the outputfile is given, the result will be written into the file. That's good. However, if outputfile is left out, the result is written to a file *-stylecheck.xml.

I think we should change that behaviour for the following reasons:

  1. Both variantes, optional and non-optional, write to a file. The only difference is the filename. IMHO that doesn't make any sense. ;)
  2. It avoids the kind of "de-facto standard" on Linux cli tools which print out the result on stdout.
  3. It maybe even guide you to the wrong path because the --help output doesn't tell you that.

The most compelling reason to use stdout as a output is to create building blocks. For example, you can use sdsc and pipe the result to a different tool. Writing the result to a file makes this use case much more difficult than it has to be.

@sknorr What do you think? 😄

ghost commented 7 years ago
  1. Hm.
  2. Hm.
  3. But the program output tells you the correct path. (Just like DAPS does -- in green.)

But I see your point: If we want to try editor integration, writing to stdout makes sense.

DAPS already sets an output file, so this should not create any important compatibility issues (as most people use sdsc via DAPS anyway).