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

GixyBear.py: add GixyBear #2745

Closed
wants to merge 1 commit into from
Closed

GixyBear.py: add GixyBear #2745

wants to merge 1 commit into from

Conversation

NNeast
Copy link
Contributor

@NNeast NNeast commented Oct 30, 2018

This adds gixy bear to coala-bears

Closes #1724

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!

class GixyBear:
@staticmethod
def create_arguments(filename, file, config_file):
return '--', filename
Copy link
Collaborator

Choose a reason for hiding this comment

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

Line contains following spacing inconsistencies:

  • No newline at EOF.

Origin: SpaceConsistencyBear, Section: all.python.

The issue can be fixed by applying the following patch:

--- a/tmp/tmpt_yx8rpp/bears/general/GixyBear.py
+++ b/tmp/tmpt_yx8rpp/bears/general/GixyBear.py
@@ -6,4 +6,4 @@
 class GixyBear:
     @staticmethod
     def create_arguments(filename, file, config_file):
-        return '--', filename+        return '--', filename

file,
[Result.from_values('GixyBear',
'done',
file)])
Copy link
Collaborator

Choose a reason for hiding this comment

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

Line contains following spacing inconsistencies:

  • No newline at EOF.

Origin: SpaceConsistencyBear, Section: all.python.

The issue can be fixed by applying the following patch:

--- a/tmp/tmpt_yx8rpp/tests/general/GixyBearTest.py
+++ b/tmp/tmpt_yx8rpp/tests/general/GixyBearTest.py
@@ -18,4 +18,4 @@
             file,
             [Result.from_values('GixyBear',
                                 'done',
-                                file)])+                                file)])

@@ -0,0 +1,9 @@
from coalib.bearlib.abstractions.Linter import linter
Copy link
Collaborator

Choose a reason for hiding this comment

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

The code does not comply to PEP8.

Origin: PEP8Bear, Section: all.autopep8.

The issue can be fixed by applying the following patch:

--- a/tmp/tmpt_yx8rpp/bears/general/GixyBear.py
+++ b/tmp/tmpt_yx8rpp/bears/general/GixyBear.py
@@ -1,4 +1,5 @@
 from coalib.bearlib.abstractions.Linter import linter
+
 
 @linter(executable='gixy',
         output_format='corrected',

class GixyBear:
@staticmethod
def create_arguments(filename, file, config_file):
return '--', filename
Copy link
Collaborator

Choose a reason for hiding this comment

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

The code does not comply to PEP8.

Origin: PEP8Bear, Section: all.autopep8.

The issue can be fixed by applying the following patch:

--- a/tmp/tmpt_yx8rpp/bears/general/GixyBear.py
+++ b/tmp/tmpt_yx8rpp/bears/general/GixyBear.py
@@ -6,4 +6,4 @@
 class GixyBear:
     @staticmethod
     def create_arguments(filename, file, config_file):
-        return '--', filename+        return '--', filename

@@ -0,0 +1,9 @@
from coalib.bearlib.abstractions.Linter import linter

@linter(executable='gixy',
Copy link
Collaborator

Choose a reason for hiding this comment

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

E302 expected 2 blank lines, found 1

Origin: PycodestyleBear (E302), Section: all.autopep8.

class GixyBear:
@staticmethod
def create_arguments(filename, file, config_file):
return '--', filename
Copy link
Collaborator

Choose a reason for hiding this comment

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

W292 no newline at end of file

Origin: PycodestyleBear (W292), Section: all.autopep8.

file,
[Result.from_values('GixyBear',
'done',
file)])
Copy link
Collaborator

Choose a reason for hiding this comment

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

The code does not comply to PEP8.

Origin: PEP8Bear, Section: all.autopep8.

The issue can be fixed by applying the following patch:

--- a/tmp/tmpt_yx8rpp/tests/general/GixyBearTest.py
+++ b/tmp/tmpt_yx8rpp/tests/general/GixyBearTest.py
@@ -18,4 +18,4 @@
             file,
             [Result.from_values('GixyBear',
                                 'done',
-                                file)])+                                file)])

file,
[Result.from_values('GixyBear',
'done',
file)])
Copy link
Collaborator

Choose a reason for hiding this comment

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

W292 no newline at end of file

Origin: PycodestyleBear (W292), Section: all.autopep8.

@gitmate-bot
Copy link
Collaborator

Comment on 60d28d8.

Shortlog of HEAD commit does not match given regex: ([^:]|[^:]+: [A-Z0-9].*)

Origin: GitCommitBear, Section: all.commit.

@gitmate-bot
Copy link
Collaborator

Comment on a3819d8.

Shortlog of HEAD commit does not match given regex: ([^:]|[^:]+: [A-Z0-9].*)

Origin: GitCommitBear, Section: all.commit.

.travis.yml Outdated
@@ -110,6 +110,7 @@ addons:
- flawfinder
- gfortran
- ghc
- gixy
Copy link
Member

Choose a reason for hiding this comment

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

I doubt that gixy is a apt-get package.

how do you install it on your computer?

find other bears that you would install the same way, and look at how they are installed onto the CI



@linter(executable='gixy',
output_format='corrected',
Copy link
Member

Choose a reason for hiding this comment

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

please read the linter guide. this linter probably needs to be in regex message mode.

This adds gixy bear to coala-bears

Closes #1724


@linter(executable='gixy',
output_format='regex',
Copy link
Member

Choose a reason for hiding this comment

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

this only says which mode the bear is in. you need to write the regex. see the linter bear docs. it has a tutorial which covers this.

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

Successfully merging this pull request may close these issues.

Bear proposal: Gixy (nginx config static analyzer)
3 participants