Lib/log: linting and small improvements#1959
Merged
NoahGorny merged 3 commits intoBash-it:masterfrom Jan 18, 2022
Merged
Conversation
009720a to
df9ebb8
Compare
f75fe4b to
dc39c19
Compare
372a4d0 to
03e5074
Compare
6fa3506 to
53620bc
Compare
97cfc77 to
0d80ef4
Compare
lib/log for shellchecklib/log for shellcheck, and some fixup
lib/log for shellcheck, and some fixuplib/log
6 tasks
14335a2 to
08a1829
Compare
NoahGorny
reviewed
Jan 3, 2022
NoahGorny
approved these changes
Jan 3, 2022
NoahGorny
reviewed
Jan 7, 2022
69782a5 to
8c65989
Compare
Alsö, fix tests to load `lib/colors` instead of `lib/appearance`...wut Alsö, `short-circuit _has_colors()`: If we already looked up colors, and we already have them, then don't run `tput` again. My apologies to future `git blame` hunters ♥
...to `_bash-it-log-message()`. alsö, add common log levels with common names.
...to replace `_set-prefix-based-on-path()` in `scripts/reloader`. Deliberately does not use `_bash-it-get-component-name-from-path()`/`_bash-it-get-component-type-from-path()` as we need some of the intermediate state and would have to reimplement anyway.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Please review commit notes as appropriate.
Description
This is a partial PR covering only the
lib/logportion of #1917 in support of #1696.Motivation and Context
My
shellcheckbranch (#1917) got a bit large, so I'm splitting it up. This PR is independent of my other PRs.The only non-trivial change here is renaming
_log_general()to_bash-it-log-message()and new function to replace_set-prefix-based-on-path().How Has This Been Tested?
The full test suite and
shellcheckhave run on #1917 and this is part of my main branch.Types of changes
Checklist:
clean_files.txtand formatted it usinglint_clean_files.sh.