Hi!

> I was saying, you can find several examples of wrong and correct code at
> [1].
> Thiemo pointed out that this patch could encourage to write shorter and
> less readable code (you can find his rationale in Gerrit comments), and I
> partly agree with him. My proposal is to only trigger the sniff if the "if"
> conditions are "short" enough. Which could mean either a single condition,
> shorter than xxx characters etc.
> We're looking for some feedback to know whether you would deem this feature
> useful, and how to tweak it in order to avoid encouraging bad code.
> Thanks to you all, and again - sorry for the half message.

This looks useful. I think PHPStorm has this check built in, but having
it in sniffs too wouldn't be a bad thing. I've seen such things happen
when refactoring code.

-- 
Stas Malyshev
[email protected]

_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to