-
Notifications
You must be signed in to change notification settings - Fork 581
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
from coalib.bearlib.abstractions.Linter import linter | ||
|
||
|
||
@linter(executable='gixy', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. E302 expected 2 blank lines, found 1 Origin: PycodestyleBear (E302), Section: |
||
output_format='regex', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
result_message='done') | ||
class GixyBear: | ||
@staticmethod | ||
def create_arguments(filename, file, config_file): | ||
return '--', filename |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
from queue import Queue | ||
|
||
from bears.general.GixyBear import GixyBear | ||
from coalib.testing.LocalBearTestHelper import LocalBearTestHelper | ||
from coalib.results.Result import Result | ||
from coalib.settings.Section import Section | ||
|
||
file = '1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n' | ||
jayvdb marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
|
||
class TooManyLinesBearTest(LocalBearTestHelper): | ||
jayvdb marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
def setUp(self): | ||
self.uut = GixyBear(Section('name'), Queue()) | ||
|
||
def test_run(self): | ||
self.check_results( | ||
self.uut, | ||
file, | ||
[Result.from_values('GixyBear', | ||
'done', | ||
file)]) |
There was a problem hiding this comment.
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: