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

MarkdownBear: Add `validate-links` plugin #1919

Merged
merged 5 commits into from Jul 18, 2017

Conversation

7 participants
@yash-nisar
Member

yash-nisar commented Jul 14, 2017

Closes #924

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!

@yash-nisar

This comment has been minimized.

Show comment
Hide comment
@yash-nisar
Member

yash-nisar commented Jul 14, 2017

Show outdated Hide outdated bears/markdown/MarkdownBear.py Outdated
AUTHORS = {'The coala developers'}
AUTHORS_EMAILS = {'coala-devel@googlegroups.com'}
LICENSE = 'AGPL-3.0'
CAN_FIX = {'Formatting'}
_output_regex = re.compile(
r'\s*(?P<line>\d+):(?P<column>\d+)'
r'\s*(?P<severity>warning)\s*(?P<message>.*)')
r'\s*(?P<severity>warning)\s*(?P<message>.+?)(?: .*|\n|$)')

This comment has been minimized.

@Makman2

Makman2 Jul 15, 2017

Member

is this maybe a separate commit?

@Makman2

Makman2 Jul 15, 2017

Member

is this maybe a separate commit?

This comment has been minimized.

@yash-nisar

yash-nisar Jul 16, 2017

Member

Sure 👍

@yash-nisar

yash-nisar Jul 16, 2017

Member

Sure 👍

@@ -127,22 +128,23 @@ def create_arguments(filename, file, config_file,
'ruleSpaces': horizontal_rule_spaces, # Bool
'ruleRepetition': horizontal_rule_repeat, # int
}
remark_configs_plugins = {}
remark_lint_configs = {}

This comment has been minimized.

@Makman2

Makman2 Jul 15, 2017

Member

the rename should be a separate commit

@Makman2

Makman2 Jul 15, 2017

Member

the rename should be a separate commit

@gitmate-bot gitmate-bot added size/M and removed size/S labels Jul 16, 2017

@yash-nisar

This comment has been minimized.

Show comment
Hide comment
@yash-nisar

yash-nisar Jul 16, 2017

Member

@Makman2 @sils How does it look now ?

Member

yash-nisar commented Jul 16, 2017

@Makman2 @sils How does it look now ?

Show outdated Hide outdated bears/markdown/MarkdownBear.py Outdated
Show outdated Hide outdated bears/markdown/MarkdownBear.py Outdated
@@ -136,13 +141,16 @@ def create_arguments(filename, file, config_file,
# Remove { and } as remark adds them on its own
settings = config_json[1:-1]
args = ['--no-color', '--quiet', '--setting', settings]
args = [filename, '--no-color', '--quiet', '--setting', settings]

This comment has been minimized.

@Makman2

Makman2 Jul 17, 2017

Member

do you really need filename, as the linter has use_stdin?

@Makman2

Makman2 Jul 17, 2017

Member

do you really need filename, as the linter has use_stdin?

This comment has been minimized.

@yash-nisar

yash-nisar Jul 18, 2017

Member

Yes, use_stdin doesn't work with validate-links 😄 I've removed the use_stdin though 👍

@yash-nisar

yash-nisar Jul 18, 2017

Member

Yes, use_stdin doesn't work with validate-links 😄 I've removed the use_stdin though 👍

This comment has been minimized.

@Makman2

Makman2 Jul 18, 2017

Member

Ah write that into the commit message please :D
(the reason why you remove use_stdin)

@Makman2

Makman2 Jul 18, 2017

Member

Ah write that into the commit message please :D
(the reason why you remove use_stdin)

This comment has been minimized.

@yash-nisar

yash-nisar Jul 18, 2017

Member

Done 👍

@yash-nisar

yash-nisar Jul 18, 2017

Member

Done 👍

@@ -50,7 +50,7 @@
@generate_skip_decorator(MarkdownBear)
class MarkdownBearMaxLineLengthMessageTest(unittest.TestCase):
class MarkdownBearTest(unittest.TestCase):

This comment has been minimized.

@Makman2

Makman2 Jul 17, 2017

Member

for me it's obvious, anyway put the reason into the commit message :)

@Makman2

Makman2 Jul 17, 2017

Member

for me it's obvious, anyway put the reason into the commit message :)

This comment has been minimized.

@yash-nisar

yash-nisar Jul 18, 2017

Member

Done 👍

@yash-nisar

yash-nisar Jul 18, 2017

Member

Done 👍

@@ -30,7 +30,7 @@ class MarkdownBear:
_output_regex = re.compile(
r'\s*(?P<line>\d+):(?P<column>\d+)'
r'\s*(?P<severity>warning)\s*(?P<message>.*)')
r'\s*(?P<severity>warning)\s*(?P<message>.+?)(?: .*|\n|$)')

This comment has been minimized.

@Makman2

Makman2 Jul 17, 2017

Member

Please reason that inside the commit message :)

@Makman2

Makman2 Jul 17, 2017

Member

Please reason that inside the commit message :)

This comment has been minimized.

@Makman2

Makman2 Jul 17, 2017

Member

Actually I would rephrase the shortlog to something like Improve result message or so, as this is the effective reason :)

@Makman2

Makman2 Jul 17, 2017

Member

Actually I would rephrase the shortlog to something like Improve result message or so, as this is the effective reason :)

This comment has been minimized.

@yash-nisar

yash-nisar Jul 18, 2017

Member

Done 👍

@yash-nisar

yash-nisar Jul 18, 2017

Member

Done 👍

Show outdated Hide outdated bears/markdown/MarkdownBear.py Outdated
@AsnelChristian

This comment has been minimized.

Show comment
Hide comment
@AsnelChristian

AsnelChristian Jul 18, 2017

Member

please rebase and address @Makman2 issues :)

Member

AsnelChristian commented Jul 18, 2017

please rebase and address @Makman2 issues :)

@yash-nisar

This comment has been minimized.

Show comment
Hide comment
@yash-nisar
Member

yash-nisar commented Jul 18, 2017

Updated @Makman2

Show outdated Hide outdated bears/markdown/MarkdownBear.py Outdated
@Makman2

This comment has been minimized.

Show comment
Hide comment
@Makman2

Makman2 Jul 18, 2017

Member

For the rename commits: Please put the reason of the name-change into the commit body 👍

Member

Makman2 commented Jul 18, 2017

For the rename commits: Please put the reason of the name-change into the commit body 👍

yash-nisar added some commits Jul 14, 2017

MarkdownBear: Add `validate-links` plugin
Add `validate-links` plugin and since the `validate-links`
plugin is incompatible with stdin input, `use_stdin=True`
was removed.

Closes #924
MarkdownBear: Rename test classname
Rename test classname from `MarkdownBearMaxLineLengthMessageTest`
to `MarkdownBearTest` because there were a few generic additions
to the tests.
MarkdownBear: Rename `remark_configs_plugins`
Rename `remark_configs_plugins` to `remark_lint_configs` because
the latter is more appropriate and future addition of plugins
may conflict with the former name.
MarkdownBear: Improve result message
Improves the result message by modifying the regex and ignoring
the non-crucial output obtained from the linter.
MarkdownBear: Rename `remark_configs_settings`
Rename to `remark_configs` so it becomes easier to distinguish
from `remark_lint_configs`.
@Makman2

This comment has been minimized.

Show comment
Hide comment
@Makman2
Member

Makman2 commented Jul 18, 2017

@Makman2

This comment has been minimized.

Show comment
Hide comment
@Makman2
Member

Makman2 commented Jul 18, 2017

@rultor merge

@rultor

This comment has been minimized.

Show comment
Hide comment
@rultor

rultor Jul 18, 2017

@rultor merge

@Makman2 OK, I'll try to merge now. You can check the progress of the merge here

rultor commented Jul 18, 2017

@rultor merge

@Makman2 OK, I'll try to merge now. You can check the progress of the merge here

@rultor rultor merged commit d6100ce into coala:master Jul 18, 2017

6 of 8 checks passed

ci/circleci CircleCI is running your tests
Details
continuous-integration/travis-ci/push The Travis CI build is in progress
Details
codecov/project 100% (target 100%)
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
review/gitmate/commit No issues with this one - go ahead! :)
Details
review/gitmate/manual This commit was acknowledged.
Details
review/gitmate/pr All is well! :) (0 problems solved)
Details
@rultor

This comment has been minimized.

Show comment
Hide comment
@rultor

rultor Jul 18, 2017

@rultor merge

@Makman2 Done! FYI, the full log is here (took me 2min)

rultor commented Jul 18, 2017

@rultor merge

@Makman2 Done! FYI, the full log is here (took me 2min)

@yash-nisar yash-nisar deleted the yash-nisar:md-validate-links branch Jul 18, 2017

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