Repository navigation
fix(pb): doctor 增「病毒扫描」检查项——WARN 级 advisory 不改退出码(core#121) - #119
Merged
Merged
Conversation
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.
Refs pigeonbox/core#121
改动
pb doctor新增「病毒扫描」检查项(数据源 = /admin/diagnostics 的moderation.clamav段,core PR pigeonbox/core#129):「WARN 级 + 不改退出码」的落地
issue 要求 WARN 级且退出码对齐「更新检查」项(不改退出码)——doctor 既有语义里 warn ⇒ 退出码 1,两者冲突。落地机制:
doctorCheck.Advisory(提示级:显示 WARN 但不参与退出码)+doctorSummary.note单列计数;worst()不看 note ⇒ 退出码口径不变,人读结论行加「(另有 N 项提示)」(Note==0 时既有文案逐字不变)。若后续想让它红(同 backupCheck 口径),去掉 Advisory 标记即可。测试
go test -count=1 ./...全绿。