Skip to content

Improve handling of check output #89

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

Merged
merged 3 commits into from
Dec 4, 2020
Merged

Conversation

per1234
Copy link
Contributor

@per1234 per1234 commented Dec 3, 2020

Check functions may return a string that provides information about the check result.

Previously, the focus was primarily on the handling of output in the case of a failure check result, but the output can be useful to provide an explanation to the user about why the check couldn't be or wasn't run and the handling of this functionality was very poor.

The check functions may output an explanation when they are unable to run, which is printed to the console following a
"notice:" check result label. If no explanation was provided by the check function author, this resulted in a confusing
line in the console. Although it is best for an explanation to always be provided, this is not guaranteed to always be
done, so it's more user friendly to suppress the check level display in this situation.
Previously, the level returned was for a failure result, regardless of the actual result of the check, with the
effective check level adjusted according to the check result in the result package. The code is more maintainable and
easier to understand if the check level is determined in a single location. The checklevel package is the logical place
for that.
Previously, the message in the report was always that of the failure state of the check, regardless of the actual check
result.
@per1234 per1234 requested a review from silvanocerza December 3, 2020 19:22
Copy link
Contributor

@rsora rsora left a comment

Choose a reason for hiding this comment

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

LGTM!!!!!!

@per1234 per1234 merged commit 484fee6 into main Dec 4, 2020
@per1234 per1234 deleted the per1234/improve-check-output branch December 7, 2020 08:34
@per1234 per1234 added the topic: code Related to content of the project itself label Sep 29, 2021
@per1234 per1234 self-assigned this Nov 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants