fimbullinter / wotan

Pluggable TypeScript and JavaScript linter
Apache License 2.0
282 stars 23 forks source link

Caching lint results #370

Closed ajafff closed 3 years ago

ajafff commented 5 years ago

It would be nice to support caching to speed up consecutive linter runs with only little changes to the codebase.

Requirements:

ajafff commented 5 years ago

Some more recent thoughts on this:

ajafff commented 5 years ago

More things to consider:

ajafff commented 5 years ago
  • 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

ajafff commented 3 years ago

:tada: This issue has been resolved in version v0.24.0 :tada: