nilaway icon indicating copy to clipboard operation
nilaway copied to clipboard

Support cross-package nolint parsing

Open yuxincs opened this issue 8 months ago • 2 comments

We can report errors on pkg A when we are analyzing pkg B due to our multi-pkg inference. However, nogo’s support for nolint comments is based on reading the AST from current package.

That is, nogo does not know we have a nolint comment in pkg A when analyzing pkg B , but NilAway can report an error there, and hence cannot be suppressed.

The other linter implementations most likely follow the same logic.

We’ll need to implement own cross-pkg nolint support (i.e., reading the nolint and writing it to facts, then read it in downstream analysis to decide whether to report a certain error or not).

yuxincs avatar Nov 02 '23 19:11 yuxincs