Skip to content

Improve output #99

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 9 commits into from
Dec 12, 2020
Merged

Improve output #99

merged 9 commits into from
Dec 12, 2020

Conversation

per1234
Copy link
Contributor

@per1234 per1234 commented Dec 11, 2020

No description provided.

The log output is not of interest to the ordinary users, so it should only be enabled when one of the logging
configuration environment variables is set.
The error must always be printed with a newline, otherwise the log will be appended to the output.

This follows the convention set by the Arduino CLI feedback package.
Even though not currently needed, this brings consistency with the standard fmt API.
The previous approach of adding trailing newlines when the report text was generated made it difficult to keep track of
how the output was formatted.
It's better for this function to be exclusively for the running of checks. It is more sensible for the project related
output to be handled at a higher level.
These uses of `feedback.Error()` in the event of internal failures was a departure from the convention established in
the rest of the code of using `feedback.Error()` only for failures resulting from external issues, and panic() for those
resulting from internal issues (in which case the traceback is useful).
This log output is only meaningful if there wasn't an error.
@per1234 per1234 force-pushed the per1234/improve-output branch from 8dfc5f2 to 23d32fd Compare December 12, 2020 00:06
@per1234 per1234 merged commit d6fbfe1 into main Dec 12, 2020
@per1234 per1234 deleted the per1234/improve-output branch December 12, 2020 00:19
@per1234 per1234 added topic: code Related to content of the project itself type: enhancement Proposed improvement labels 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 type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants