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

Support mypy #13

Closed
tuukkamustonen opened this issue Feb 6, 2017 · 7 comments

Comments

@tuukkamustonen
Copy link

commented Feb 6, 2017

https://pypi.python.org/pypi/mypy-lang is static checker for python 3 type annotations. Example output:

fs/cs/backend/log.py: note: In member "filter" of class "CsLogFilter":
fs/cs/backend/log.py:16: error: "LogRecord" has no attribute "user_uuid"
fs/cs/backend/log.py:17: error: "LogRecord" has no attribute "tenant_id"
fs/cs/backend/errorhandler.py: note: In member "__init__" of class "CsErrorHandler":
fs/cs/backend/errorhandler.py:16: error: The return type of "__init__" must be None
fs/cs/backend/api.py: note: At top level:
fs/cs/backend/api.py:23: error: ContextManager[Any] not callable
tests/test_schema.py:864: error: Name 'test_nested_only_and_exclude' already defined

I have used ^(.*):(\d+): (.*): (.*)$ regex with warning plugin:

String fileName = matcher.group(1)
String lineNumber = matcher.group(2)
String category = matcher.group(3)
String message = matcher.group(4)
tomasbjerre added a commit that referenced this issue Feb 6, 2017
@tomasbjerre

This comment has been minimized.

Copy link
Owner

commented Feb 6, 2017

It should be released in all plugins now. Open issue again if any problems!

@tomasbjerre tomasbjerre closed this Feb 6, 2017
@tuukkamustonen

This comment has been minimized.

Copy link
Author

commented Feb 6, 2017

Thanks for super-fast actions again! Will test it tomorrow.

Btw. clicking the commit to 31b2ded in https://github.com/tomasbjerre/violations-lib/blob/master/CHANGELOG.md leads to 404.

@tomasbjerre

This comment has been minimized.

Copy link
Owner

commented Feb 7, 2017

I updated the changelog now!

@tuukkamustonen

This comment has been minimized.

Copy link
Author

commented Feb 7, 2017

Just installed the latest 1.43 (and restarted), but I don't see the new parsers in listing:

image

Would it be cool if plugins auto-discovered parsers in violations-lib - so you wouldn't need to update anything in plugin side (expect lib dependency version)?

@tomasbjerre

This comment has been minimized.

Copy link
Owner

commented Feb 7, 2017

@tuukkamustonen

This comment has been minimized.

Copy link
Author

commented Feb 7, 2017

True, either removing/re-adding build step or adding to a new job shows the new parsers.

@tuukkamustonen

This comment has been minimized.

Copy link
Author

commented Feb 7, 2017

Updated my job via Job DSL plugin and new parsers appeared correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.