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

ConsoleInteraction: Replace nothing_done() inline #6169

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

PrasanthChettri
Copy link

@PrasanthChettri PrasanthChettri commented Jun 3, 2021

Fixes #4523
Removed occurrences of nothing done method in ConsoleInteraction and
Accommodated the code with consequent code changes, eg : deleted tests for the method


For short term contributors: we understand that getting your commits well
defined like we require is a hard task and takes some learning. If you
look to help without wanting to contribute long term there's no need
for you to learn this. Just drop us a message and we'll take care of brushing
up your stuff for merge!

Checklist

  • I read the commit guidelines and I've followed
    them.
  • I ran coala over my code locally. (All commits have to pass
    individually.
    It is not sufficient to have "fixup commits" on your PR,
    our bot will still report the issues for the previous commit.) You will
    likely receive a lot of bot comments and build failures if coala does not
    pass on every single commit!

After you submit your pull request, DO NOT click the 'Update Branch' button.
When asked for a rebase, consult coala.io/rebase
instead.

Please consider helping us by reviewing other peoples pull requests as well:

The more you review, the more your score will grow at coala.io and we will
review your PRs faster!

@PrasanthChettri
Copy link
Author

@anshalshukla I cannot figure out why the tests are failing, if it's not much trouble could you help me with this

@anshalshukla
Copy link
Contributor

Yeah Sure!
The CI is failing with error:

**** GitCommitBear [Section: commit | Severity: NORMAL] ****
!    ! Shortlog of HEAD commit isn't in imperative mood! Bad words are 'fixed'

You can update the commit message and check if the bears pass the test using coala --non-interactive locally.

@akshatkarani
Copy link
Member

Squash your commits and follow the commit guidelines

@PrasanthChettri PrasanthChettri force-pushed the nothing_done_remove branch 2 times, most recently from 036109b to fa8299c Compare June 5, 2021 05:56
@PrasanthChettri
Copy link
Author

PrasanthChettri commented Jun 5, 2021

Additionally coalib/coala_main/run_coala() has these default arguments of do_nothing() that just returns True, one could just have an inline definition such as

print_results = lambda *args : True

which would remove one more indirection, I don't know if it's good code practice or not, would love to have some feedback on this

@akshatkarani
Copy link
Member

akshatkarani commented Jun 5, 2021

Since you are removing the parameter nothing_done, default do_nothing is no longer needed. You can remove it

It is used as default value for other parameter, keep it. Also it is better to keep it as a function because it is used more than once

@PrasanthChettri
Copy link
Author

PrasanthChettri commented Jun 5, 2021

Since you are removing the parameter nothing_done, default do_nothing is no longer needed. You can remove it

It is used as default value for other parameter, keep it. Also it is better to keep it as a function because it is used more than once

@akshatkarani, @anshalshukla Okay,thanks for the suggestion, the commits do not have the changes and I think are good to go for a review

Copy link
Member

@akshatkarani akshatkarani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@abhishalya abhishalya changed the title removed occurence of nothing_done method ConsoleInteraction: Replace nothing_done() inline Jun 7, 2021
@abhishalya
Copy link
Member

The issue is not a bug, so the commit short log should mention it Closes the issue. Everything else lgtm.

Removed nothing_done() and added it inline where it's called and
deleted tests for the method.

Closes coala#4523
@PrasanthChettri
Copy link
Author

PrasanthChettri commented Jun 7, 2021

The issue is not a bug, so the commit short log should mention it Closes the issue. Everything else lgtm.

Done
@abhishalya Can it be merged now ?

Copy link
Member

@utkarsh2102 utkarsh2102 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Me likey! +1! 🌮

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

Successfully merging this pull request may close these issues.

Inline ConsoleInteraction.nothing_done()
5 participants