Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --quiet option. Closes #211 #228

Merged
merged 4 commits into from Dec 4, 2015
Merged

Add --quiet option. Closes #211 #228

merged 4 commits into from Dec 4, 2015

Conversation

gooh
Copy link
Contributor

@gooh gooh commented Oct 17, 2015

Adds a --quiet option that will suppress version, workarounds and runtime statistics, as well as any output the result printer would usually give when running pdepend from the command line.

#211

given that we have printVersion(), printWorkarounds() and so on, it
makes sense to encapsulate this functionality into a separate method,
too.
the TextUI ResultPrinter will output directly to STDOUT. In order to
implement a --quiet flag, we need an additional ResultPrinter that
doesn't output anything.

refs #211
we want to suppress any output that is not an error when running
pdepend. For this I am adding a new option --quiet to the TextUI
Command. Setting this flag will put pdepend into silent mode, meaning it
will use the NulLResultPrinter instead of the regular ResultPrinter and
it will not output version, workarounds and runtime statistics. It will
output any errors though.

Closes #211
We do not actually need the NullResultPrinter because if no
ProcessListener is registered in the Runner, no output will be
generated. So if the --quiet flag is set, we just don't add the regular
ResultPrinter. And if the flag is not set, we do. Less code to maintain.

refs #211
manuelpichler pushed a commit that referenced this pull request Dec 4, 2015
Add --quiet option. Closes #211
@manuelpichler manuelpichler merged commit d134d20 into pdepend:master Dec 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

2 participants