Closed mmarseu closed 5 months ago
@mmarseu the reason is that we started with Jenkins being supported and them wanting a JSON with an issues
-array, making the name issues.json
the most obvious one.
I would also prefer the first solution, as the tool is still in development, i.e. still on 0.y.z, we can be more open regarding breaking changes.
When the
--report-format
option is set to anything butstdout
, the validate command requires an output path to write the report file. Currently, this path defaults toissues.json
, if the--output
option isn't given. Leaving aside the fact that this might not be sufficiently clear to the user, what happens ifissues.json
already exists?Expected behavior: As a user I would expect the program to abort with an error message.
Actual behavior: The program silently overwrites
issues.json
.To be clear, I'm only talking about the case where there is no
--output
option. If the user provides a filename, it is their responsibility to ensure they don't overwrite anything important. But an implicitly chosen default value shouldn't lead to overwriting an existing file.I see two possible solutions:
--output
option if a report file is needed. This is clear, fixes the problem and places no great burden on the user.