I've been having this idea for a while, and already implemented some code to help with that. Not evaluating the AST means avoiding to deal with unavailable variables etc., although there shouldn't be a sensible difference runtime-wise.
The acceptance criterion here is that we should be able to report more errors at syntax-check time. Some kinds of errors will be hard to report there, e.g. if a variable is of the right type, so we may end up declining this task. Or alternatively, have a dedicated wiki page for runtime errors (T193064 / r429381). However, I still believe it's worth investigating. To make things easier, this should be done after enabling CachingParser in production, and inverting the inheritance between the old and the new parser (or even deleting the old one).
Description
Description
Details
Details
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
Add a static analyzer for the filter language | mediawiki/extensions/AbuseFilter | master | +1 K -171 |
Event Timeline
Comment Actions
Change 551966 had a related patch set uploaded (by Nullzero; owner: Nullzero):
[mediawiki/extensions/AbuseFilter@master] [DO NOT MERGE] Add a static analyzer for the filter language
Comment Actions
Change 551966 merged by jenkins-bot:
[mediawiki/extensions/AbuseFilter@master] Add a static analyzer for the filter language