Page MenuHomePhabricator

Detect global functions definied inside static functions
Closed, ResolvedPublic

Description

On T183730 there was a global function found created inside a static function.

Codesniffer should at least detect these function with it's PrefixedGlobalFunctionsSniff.

Maybe it is better to detect and forbid them, even there are named wf*?

Event Timeline

Change 420231 had a related patch set uploaded (by MaxSem; owner: MaxSem):
[mediawiki/tools/codesniffer@master] Prohibit nested functions

https://gerrit.wikimedia.org/r/420231

Change 420231 merged by jenkins-bot:
[mediawiki/tools/codesniffer@master] Prohibit nested functions

https://gerrit.wikimedia.org/r/420231

Legoktm assigned this task to MaxSem.