Ticket #4981: do not show color warning with --nocolor#5081
Ticket #4981: do not show color warning with --nocolor#5081zyv merged 1 commit intoMidnightCommander:masterfrom
Conversation
In general, I tend to ask for a test when 1) the changes seem "risky" according to my subjective feeling and 2) it seems to me that they can indeed be tested relatively simply with the current setup. I mostly have a feeling that changes are "risky" when an old large function full of loops and conditionals, and possibly external variables, which is otherwise not covered with tests, is changed, and likely in a non-trivial fashion. In this case, I wouldn't demand a test, but, of course, every little bit is welcome, if you feel like it. Our test coverage is very bad, and this is one of the reasons why it's so hard to review PRs in a timely manner. You have to check that the code makes sense and doesn't have unwanted side-effects, and with no test coverage it's mostly a gamble... |
8abd9f1 to
5ae01ef
Compare
I took a quick look at this over the weekend and decided to add a test. It turned out to be fairly simple, and writing it was a nice way to better understand this part of the code. |
c6a2a27 to
97dd6e6
Compare
|
I don't understand why my mc_skin_init() test fails on both Ubuntu and Fedora. Is there a way to look at the log somewhere? |
On Fedora, it's a simple formatting issue, and you have accidentally botched a symlink. You can see the log here: https://github.com/MidnightCommander/mc/actions/runs/23750102108/job/69189411316?pr=5081
On Ubuntu, it's more interesting. Maybe something to do with mocking? |
5f8b10e to
909c0dc
Compare
I've added a line to my test code ( |
f731395 to
09c916f
Compare
467d1eb to
24ae55a
Compare
24ae55a to
6dc6dd0
Compare
zyv
left a comment
There was a problem hiding this comment.
@peripherium I think that I've now fixed the CI and reverted all of your experimental changes. Please have another look.
The problem was that you failed to account for VPATH builds, and so your hacked skin loading wasn't working correctly. The other irritating problem with library linking order is due to #4806. I hope that one day I'll get enough time to fix this. Sorry that it has taken me so long.
@mc-worker @egmontkob, are you fine with the current state of the PR?
|
/rebase |
Suppress the color capability warning when --nocolor is used. Keep the warning if a skin is explicitly requested. Signed-off-by: Manuel Einfalt <einfalt1@proton.me> Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
32c7234 to
ae89a8e
Compare
Proposed changes
Suppress the color capability warning when
--nocoloris used.The warning is still shown if a skin is explicitly requested via menu.
Additionally, the global variable
mc_skin_is_initwas removed:it is set with seemingly meaningful values but never actually used.
Checklist
git commit --amend -smake indent && make check)Quick question: in earlier commits I was asked to add a test function
even when the function already existed. Should a test function be
added for every existing function in the future? If so, I can add
one for this change as well.