Page MenuHomePhabricator

Codesniffer allows missing space before opening brace
Closed, ResolvedPublic

Description

Following code does not cause any errors or warnings:

if ( !$group ){

Per examples of https://www.mediawiki.org/wiki/Manual:Coding_conventions#General_style it should not be allowed.

Tested with 0.5.1.

Event Timeline

Nikerabbit raised the priority of this task from to Needs Triage.
Nikerabbit updated the task description. (Show Details)
Nikerabbit moved this task to Untriaged on the MediaWiki-Codesniffer board.
Nikerabbit added a subscriber: Nikerabbit.

Hi there,I have submitted my changes to Gerrit about this, I hope it may useful :)

Legoktm claimed this task.

This is caught by the MediaWiki.WhiteSpace.SpaceBeforeControlStructureBrace.SpaceBeforeControl sniff now.