Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
coder
Manage
Activity
Members
Labels
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
drupal.org
coder
Commits
d34e468c
Commit
d34e468c
authored
12 years ago
by
sun
Browse files
Options
Downloads
Patches
Plain Diff
Fixed curly braces are not enforced for elseif control structures.
parent
cd013693
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/coder_format/coder_format.inc
+3
-3
3 additions, 3 deletions
scripts/coder_format/coder_format.inc
with
3 additions
and
3 deletions
scripts/coder_format/coder_format.inc
+
3
−
3
View file @
d34e468c
...
...
@@ -1397,9 +1397,9 @@ function coder_postprocessor_if_curly_braces() {
return
array
(
'#title'
=>
'Use curly braces even in situations where they are technically optional.'
,
'#search'
=>
'@
(\s*) # match leading white-space, including newline
(if\ \(.+\)\ ) # match if statement
([^\{].+;) # match conditional executed code not starting with a curly brace, delimited by a semicolon.
(\s*)
# match leading white-space, including newline
(
(?:else)?
if\ \(.+\)\ ) # match if
/elseif
statement
([^\{].+;)
# match conditional executed code not starting with a curly brace, delimited by a semicolon.
@x'
,
'#replace'
=>
'$1$2{$1 $3$1}'
,
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment