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

danger pr is too verbose, and can't turn it off #1405

Open
technicalpickles opened this issue Nov 18, 2022 · 4 comments · May be fixed by #1424
Open

danger pr is too verbose, and can't turn it off #1405

technicalpickles opened this issue Nov 18, 2022 · 4 comments · May be fixed by #1424

Comments

@technicalpickles
Copy link

technicalpickles commented Nov 18, 2022

Report

What did you do?

$ danger run <pr>

What did you expect to happen?

I expected Danger to run, and for me to be able to scroll back to look at the output.

What happened instead?

I get a flood verbose output for (seemingly) each plugin , ie:

Running your Dangerfile against this PR - <url>
Turning on --verbose

# pages and pages of the following repeated, enough to fill my terminal's buffer

Info:

+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|                                                                                                          Danger v8.4.2                                                                                                           |
|                                                                                                          DSL Attributes                                                                                                          |
+------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|    status_report |                                                                                                                                                                                                               |
| violation_report |                                                                                                                                                                                                               |
|         warnings | []                                                                                                                                                                                                            |
|        markdowns | []

I tried danger --verbose=false pr <url> and danger pr --verbose=false pr <url>, but it doesn't change anything. It does seem to accept the flag though, because if it wasn't a registered one, there would be a 'unknown option' error.

Your Environment

  • Which CI are you running on? n/a
  • Are you running the latest version of Danger?
  • What is your Dangerfile?
danger.import_dangerfile(gem: 'some-internal-gem')
danger.import_dangerfile(gem: 'another-internal-gem')

# this repeated dozens of times
danger.import_plugin('danger/some_local_check.rb')
some_local_check.check
@manicmaniac
Copy link
Member

manicmaniac commented Jan 29, 2023

It looks like an intended behavior since Danger::LocalSetup#setup forces --verbose option here.

unless verbose
cork.puts "Turning on --verbose"
dm.verbose = true
end

Not only danger local but also danger pr calls Danger::LocalSetup#setup, as a result they have the same behavior about forsing --verbose flag.

@manicmaniac
Copy link
Member

@orta
How do you think about removing the behavior that forces --verbose flag in danger local and danger pr?
Since both of them are mainly for debugging purpose, I don't think no one cares about this breaking change. Those who want the current behavior are still able to add --verbose flag explicitly.

@orta
Copy link
Member

orta commented Jan 29, 2023

Seems reasonable to me

@manicmaniac
Copy link
Member

I tried danger --verbose=false pr and danger pr --verbose=false pr , but it doesn't change anything. It does seem to accept the flag though, because if it wasn't a registered one, there would be a 'unknown option' error.

I just noticed that --verbose flag may be what you want.
Surprisingly, the flag works the other way when you invoke danger pr or danger local.

#1424 should correct this behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants