sputnik icon indicating copy to clipboard operation
sputnik copied to clipboard

dry-run option?

Open JKrag opened this issue 9 years ago • 2 comments

Hi TouK I have recently been using your tool, and integrating it in a CD pipeline on Jenkins. During my testing and experimenting with reasonable configurations, I ran sputnik from command line on my local machine (usually on already closed change-sets). For this purpose, It would have been a great help to have a --dry-run option that did the whole analysis, but skipped reporting back to Gerrit. I actually started working on a pull-request, and have added the CliOption, but couldn't really figure out the 'correct' way to introduce the "no reporting" part in a generic matter.

Would you consider adding this feature? (I would happily send you my partial pull-request, but it is really only a couple of lines of code, and you can probably write those faster than pulling a PR).

Regards Jan

JKrag avatar Apr 27 '15 13:04 JKrag

Hi Jan

What's the point of dry run if you don't report it to Gerrit? You want to see results in console?

SpOOnman avatar Apr 29 '15 07:04 SpOOnman

Exactly. While I am experimenting with settings or tweaking things like check style settings, I might have to run the tool many times (from the console), and don't want to "spam" Gerrit with comments. I might also use the option temporarily while setting up Sputnik on a Jenkins pipeline, to make sure the Gerrit triggers and paths are set up correctly.

In the really ideal nice-to-have world, it would be nice if dry-run did some sort of pretty print to the console (like line by line), but not really that important.

Hope this makes sense.

Cheers, Jan

JKrag avatar Apr 29 '15 07:04 JKrag