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

IgnoreResultAction.py: Fix line length violation bug #5208

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

Conversation

alphadose
Copy link
Member

@alphadose alphadose commented Feb 26, 2018

IgnoreResultAction violates line length restrictions.
This commit fixes the bug by using block style comments.

Fixes #4851

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!

@gitmate-bot
Copy link
Collaborator

Comment on e0a45c9.

Shortlog of the HEAD commit contains 52 character(s). This is 2 character(s) longer than the limit (52 > 50).

Origin: GitCommitBear, Section: commit.

if not ignore_comment:
return file_diff_dict

a = '1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111'
Copy link
Collaborator

Choose a reason for hiding this comment

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

E501 line too long (111 > 80 characters)

Origin: PycodestyleBear (E501), Section: autopep8.

if not ignore_comment:
return file_diff_dict

a = '1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111'
Copy link
Collaborator

Choose a reason for hiding this comment

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

Line is longer than allowed. (111 > 80)

Origin: LineLengthBear, Section: linelength.

@alphadose alphadose force-pushed the fix-ignore-action branch 2 times, most recently from 0decf21 to 3ad2316 Compare February 27, 2018 15:40
@@ -78,40 +79,95 @@ def apply(self, result, original_file_dict, file_diff_dict, language: str,

return file_diff_dict

def get_ignore_comment(self, origin, language):
def get_ignore_comment(self, language, spaces: str=''):
Copy link
Member

Choose a reason for hiding this comment

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

please restore origin. removing it is a breaking change.
Do not do that.

Add docstring params to state it is unused.

Also explain what spaces should be in the docstring.

r"""
Returns a string of Ignore Comment, depending on the language
Returns a tuple consisting of a formattable string of Ignore
Copy link
Member

Choose a reason for hiding this comment

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

you can not change the return type of a function. That is a breaking change, as unpacking it will cause an exception.
Do not do that.

If necessary, create a new function which works differently, and try to patch the old function so it sort-of does the 'best' thing, or just remove the old function as that provides a clean breakage for people to investigate why a function disappeared.

@@ -36,6 +36,7 @@ def is_applicable(result: Result,

filenames = set(src.renamed_file(file_diff_dict)
for src in result.affected_code)

Copy link
Member

Choose a reason for hiding this comment

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

unrelated change. drop it.

@jayvdb
Copy link
Member

jayvdb commented Apr 14, 2018

There are issues related to #5077 here. This one should be blocked until that is fixed.

@jayvdb jayvdb added status/blocked The issue requires other referenced issues/PRs to be solved/merged before being worked on and removed process/pending review labels Apr 14, 2018
IgnoreResultAction violates line length restrictions.
This commit fixes the bug by using block style comments.

Fixes coala#4851
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/actions area/CLI area/results difficulty/medium importance/high size/S status/blocked The issue requires other referenced issues/PRs to be solved/merged before being worked on type/bug
Development

Successfully merging this pull request may close these issues.

IgnoreResultAction violates line length restrictions
4 participants