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

linter: Add new parameters to normalize numbers #5350

Merged
merged 1 commit into from Apr 22, 2018

Conversation

li-boxuan
Copy link
Member

@li-boxuan li-boxuan commented Apr 9, 2018

Control line-index and column-index conversion
to handle zero-based and one-based conventions.

Closes #5346

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!

@@ -43,6 +44,15 @@ def _prepare_options(options, bear_class):
if not options['use_stdout'] and not options['use_stderr']:
raise ValueError('No output streams provided at all.')

if options['convert_index']:
Copy link
Member

Choose a reason for hiding this comment

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

dont abuse strings like this.

there are four possible scenarios, being the combinations of.

  • increment line numbers, or dont touch them.
  • increment column numbers, or dont touch them.

those should be two meaningful arg names, bool obviously.

arg names are checked by the Python runtime, providing consistent error messages. the user documentation becomes easy. etc. etc.

Add new parameters `normalize_line_numbers` and
`normalize_column_numbers` to handle the conversion
from zero-based to one-based conventions.

Closes coala#5346
@jayvdb jayvdb changed the title linter: Add new parameter convert_index linter: Add new parameters to normalize numbers Apr 22, 2018
@jayvdb
Copy link
Member

jayvdb commented Apr 22, 2018

ack 229bd95

@gitmate-bot gitmate-bot added process/approved The PR is approved and will be merged soon and removed process/pending review labels Apr 22, 2018
@jayvdb
Copy link
Member

jayvdb commented Apr 22, 2018

@gitmate-bot ff

@gitmate-bot
Copy link
Collaborator

Hey! I'm GitMate.io! This pull request is being fastforwarded automatically. Please DO NOT push while fastforward is in progress or your changes would be lost permanently ⚠️

@gitmate-bot
Copy link
Collaborator

Automated fastforward with GitMate.io was successful! 🎉

@gitmate-bot gitmate-bot removed the process/approved The PR is approved and will be merged soon label Apr 22, 2018
@gitmate-bot gitmate-bot merged commit 229bd95 into coala:master Apr 22, 2018
@gitmate-bot gitmate-bot added the process/approved The PR is approved and will be merged soon label Apr 22, 2018
@li-boxuan li-boxuan deleted the linter_convert_index branch April 22, 2018 02:55
@gitmate-bot gitmate-bot removed the process/approved The PR is approved and will be merged soon label Jun 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants