AdguardTeam / AGLint

Universal adblock filter list linter
https://www.npmjs.com/package/@adguard/aglint
MIT License
51 stars 3 forks source link

Implementing a cache mechanism #188

Open scripthunter7 opened 1 year ago

scripthunter7 commented 1 year ago

We need to implement a caching mechanism that allows us to check only the changed files. For example, writing information to .aglintcache as ESLint does. See https://eslint.org/docs/latest/use/command-line-interface#caching

In addition, we can introduce a cache for the parser, so that, for example, we don't have to parse CSS from scratch every time. In the new v2 version of AGTree, the CSS parsing will change to a faster and simpler implementation, but in AGLint, full CSS parsing by ECSSTree is still required to fully validate the syntax, and this can be accelerated by the cache.

Cache settings should also be available from the CLI.

scripthunter7 commented 9 months ago

For workflows, we should take a look at https://github.com/actions/cache