Closed ajafff closed 3 years ago
Some more recent thoughts on this:
More things to consider:
- Findings might depend on the uses of a declaration. Therefore we also need to consider downstream consumers in addition to upstream dependencies (make rules have Metadata to tell this?)
- Findings could depend on completely unrelated files (e.g. duplicate function implementation). That doesn't work with caching at all.
Possible solution: rules should call a method on RuleContext
with the file name of each file they inspect other than the current one. It's not necessary to report files that are (transitive) dependencies of the current file. That means following Symbol/Signature.declaration
is fine. You only need to add something special if you use Program#getSourceFiles
It would be nice to support caching to speed up consecutive linter runs with only little changes to the codebase.
Requirements:
/// <reference />
,import
,export
andimport('')
(andrequire
and JSDocimport()
in JS files)@types
, wildcard ambient modules, global augmentations, module agumentations,export as default namespace
///<amd-dependency>
?-m @fimbul/valtyr
).fimbullinter.yaml