Refactor return code docs [1.4-maint]#9948
Conversation
|
review by claude opus 4.8 SummaryDocs-only, one file. Content is accurate and a clear improvement over what was there. I checked the prose against the actual 1.4-maint code and verified the exit-code behaviour empirically. Two things should be fixed before merge (one of them also affects master). Verification of the warning-grouping claim
This is correct. rcs = sorted(set(w_info.wc for w_info in _warnings_list))
if len(rcs) == 1:
# Easy: there was only one kind of warning, so we can be specific.
return rcs[0]
# There were different kinds of warnings.
return EXIT_WARNINGThe Checked against borg 1.4.5 with
The rest of the prose also matches the code: group precedence signal > error > warning > success matches Findings1. Broken cross-reference (blocking)Last line of the file: For a list of all specific error and warning codes, see :ref:msgid.The backticks are missing, so this is not a reST role at all: it renders as the literal text For a list of all specific error and warning codes, see :ref:`msgid`.Note the same regression was merged to master by #9945 (c7a53b1), so a follow-up fix is needed there as well. 2. "see list below" is inaccurateBoth table rows say "see list below", but the message id list lives in 3. Minor: over-narrow scopingThe paragraph is prefixed "If modern exit codes are enabled ( Non-blocking notes on the underlying behaviourNot defects in this PR, but relevant if you want the docs to be exact:
Verdict: LGTM once the |
e85665b to
19f3001
Compare
|
|
ad 1.: CI only renders the docs, but is not clever enough to see that this piece of "plaintext" should have been a rst reference. ad 2.: ok ad 3.: that "first signal / first error" is a bit strange: from borg's perspective of the fatal stuff, there can be only one - there can be no second signal/error because borg has terminated when the "first-and-only-one" hit. nitpicking. :-) |
|
Thanks! |
Manual backport of #9945 to match Borg 1 default behaviour