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

Allow parallel lint and remove broken "verbose" mode #36

Merged
merged 4 commits into from
Apr 18, 2018

Conversation

ldoktor
Copy link
Contributor

@ldoktor ldoktor commented Apr 10, 2018

The first commit adds "parallel" execution of "inspekt lint" and the second one removes the "--verbose" mode from all sub-commands, because it is not really passed as an argument. Partially it works in the sense the loggers are set by the main app to DEBUG vs. INFO leading to some messages being printed, but the different setting for lint does not work. As this issue is with us for quite a while I choose to remove it and keep only to already working DEBUG vs. INFO part as it might be useful to people.

Note: It'd be nice to release new inspektor with this commit to speedup the Travis executions.

@ldoktor ldoktor force-pushed the parallel branch 2 times, most recently from 4900b12 to 16b68c7 Compare April 10, 2018 19:25
Pylint supports parallel execution, let's allow it in inspekt as well.
One draw-back of this is that when parallel pylint is enabled, it does
not reports passed tests as usual, therefor there is no simple way of
adding our "Lint: %(path)s %(status)" debug messages. It is not
impossible, but not feasible, therefor this version prints the list of
results after the execution. Also instead of filename it prints module
name (for the same reason).

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
The "--verbose" argument is already consumed by cliff's App() and is
used to set logging levels. It is not passed to sub-commands and
therefor the removed code in lint did not work.

Using "--verbose" still changes the logging levels, so all the
"checker.log_status()" messages are only printed when "--verbose" is
enabled.

This patch removes the original "verbose" mode for "pylint" because it
does not actually work every since we moved to cliff. Since no one
complained about it I think it's better to remove it and keep the
current behavior which is to run normal pylint and log the
"checker.log_status()" messages in "verbose" mode.

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
The newly introduced W605 informs about places where non-existing escape
is used, which used to be automatically escaped but is about to become
syntax error.

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
@ldoktor
Copy link
Contributor Author

ldoktor commented Apr 11, 2018

@clebergnu clebergnu self-assigned this Apr 16, 2018
Copy link
Contributor

@clebergnu clebergnu left a comment

Choose a reason for hiding this comment

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

Nice, LGTM.

Thanks for the other fixes too.

@@ -54,9 +54,13 @@ def __init__(self, args, logger=logging.getLogger('')):
self.log = logger
self.args = args
self.verbose = args.verbose
if hasattr(args, 'parallel'):
Copy link
Contributor

Choose a reason for hiding this comment

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

I was really intrigued on why this was necessary: basically the default should set this always. Then I remember that sometimes lint is called by checkall, so yes, LGTM.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

exactly (and Travis actually reminded me this on this very PR)

@clebergnu clebergnu merged commit 706d9bf into avocado-framework:master Apr 18, 2018
@clebergnu clebergnu mentioned this pull request Apr 18, 2018
Copy link
Member

@lmr lmr left a comment

Choose a reason for hiding this comment

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

Looks good!

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

Successfully merging this pull request may close these issues.

3 participants