uber/NullAway

Reported error messages: highlight syntax element references

已關閉

#1,619 建立於 2026年6月23日

 (1 則留言) (1 個反應) (0 位負責人)Java (288 個分叉)batch import
enhancementgood first issue

倉庫指標

星標
 (3,462 顆星)
PR 合併指標
 (平均合併 3天 23小時) (30 天內合併 14 個 PR)

描述

Many error messages currently reported by NullAway reference syntax elements as plain text, making a bit annoying to spot them in the middle of such verbose messages, like these:

[NullAway] initializer method does not guarantee @NonNull field points (line 58) is initialized along all control-flow paths (remember to check for exceptions or early returns).
[NullAway] dereferenced expression path is @Nullable
[NullAway] dereferenced expression that is @Nullable

It would be extremely convenient if all the syntax element references were highlighted through quotation marks:

[NullAway] initializer method does not guarantee @NonNull field 'points' (line 58) is initialized along all control-flow paths (remember to check for exceptions or early returns).
[NullAway] dereferenced expression 'path' is @Nullable
[NullAway] dereferenced expression 'that' is @Nullable

This way, syntax element references would unambiguously stick out, easing their evaluation — BTW, some NullAway error messages (see here below) already apply such highlighting, it's just a matter of harmonizing the whole system:

[NullAway] passing @Nullable parameter 'Times.calendar(value)' where @NonNull is required

貢獻者指南