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

spread-shellcheck: fix interleaved error messages, tweaks #5951

Merged
merged 2 commits into from Oct 10, 2018

Conversation

bboozzoo
Copy link
Collaborator

@bboozzoo bboozzoo commented Oct 9, 2018

When shellcheck identifies erorrs in many files, the error log will be
interleaved as the logging is happening from inside of the helper ran by a
thread pool executor. Tweak the code so that the helpers return the error
instead of doing the logging directly.

Minor logging cleanup.

When shellcheck identifies erorrs in many files, the error log will be
interleaved as the logging is happening from inside of the helper ran by a
thread pool executor. Tweak the code so that the helpers return the error
instead of doing the logging directly.

Minor logging cleanup.

Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
@bboozzoo bboozzoo added the Simple 😃 A small PR which can be reviewed quickly label Oct 9, 2018
@bboozzoo bboozzoo requested a review from chipaca October 9, 2018 07:54
Copy link
Contributor

@stolowski stolowski left a comment

Choose a reason for hiding this comment

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

LGTM, +1


with ThreadPoolExecutor(max_workers=max_workers) as executor:
for serr in executor.map(check1path, locations):
if not isinstance(serr, ShellcheckError):
Copy link
Contributor

Choose a reason for hiding this comment

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

wouldn't this work better with if serr is None?

Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
@mvo5 mvo5 merged commit c31f379 into snapcore:master Oct 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Simple 😃 A small PR which can be reviewed quickly
Projects
None yet
4 participants