-
Notifications
You must be signed in to change notification settings - Fork 481
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix TISTUD-6597 "use strict"; should not reflow immediately after the…
… brace - Fix generic case of directives. keep them on newlines.
- Loading branch information
1 parent
c66d321
commit e5d04ff
Showing
4 changed files
with
190 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
tests/com.aptana.editor.js.formatter.tests/formatting/test126.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
==PREFS== | ||
js.formatter.spaces.after.commas=1 | ||
js.formatter.spaces.after.assignment.operator=1 | ||
js.formatter.spaces.after.arithmetic.operator=1 | ||
js.formatter.spaces.after.conditional.operator=1 | ||
js.formatter.indent.case.body=true | ||
js.formatter.indent.switch.body=true | ||
js.formatter.spaces.before.for.semicolon.operator=0 | ||
js.formatter.spaces.before.parentheses=0 | ||
js.formatter.spaces.after.semicolon.operator=1 | ||
js.formatter.spaces.before.postfix.operator=0 | ||
js.formatter.spaces.after.postfix.operator=0 | ||
js.formatter.spaces.before.relational.operator=1 | ||
js.formatter.spaces.before.case.colon.operator=1 | ||
js.formatter.spaces.before.unary.operator=0 | ||
js.formatter.wrap.comments=false | ||
js.formatter.indent.group.body=true | ||
js.formatter.line.after.function.declaration=1 | ||
js.formatter.spaces.after.concatenation.operator=1 | ||
js.formatter.wrap.comments.length=80 | ||
js.formatter.spaces.before.conditional.operator=1 | ||
js.formatter.formatter.tabulation.size=4 | ||
js.formatter.spaces.after.relational.operator=1 | ||
js.formatter.spaces.after.case.colon.operator=1 | ||
js.formatter.spaces.before.prefix.operator=0 | ||
js.formatter.indent.blocks=true | ||
js.formatter.spaces.before.concatenation.operator=1 | ||
js.formatter.line.preserve=1 | ||
js.formatter.brace.position.case.block=same.line | ||
js.formatter.brace.position.switch.block=same.line | ||
js.formatter.formatter.tabulation.char=editor | ||
js.formatter.indent.function.body=true | ||
js.formatter.line.after.function.declaration.expression=0 | ||
js.formatter.formatter.indentation.size=4 | ||
js.formatter.newline.before.name.value.pairs=true | ||
js.formatter.spaces.after.parentheses=0 | ||
js.formatter.spaces.after.for.semicolon.operator=1 | ||
js.formatter.newline.before.if.in.elseif=false | ||
js.formatter.spaces.before.key.value.operator=1 | ||
js.formatter.spaces.before.commas=0 | ||
js.formatter.spaces.after.unary.operator=0 | ||
js.formatter.spaces.before.arithmetic.operator=1 | ||
js.formatter.spaces.before.assignment.operator=1 | ||
js.formatter.newline.before.dowhile=false | ||
js.formatter.newline.before.else=false | ||
js.formatter.spaces.before.semicolon.operator=0 | ||
js.formatter.newline.before.finally=false | ||
js.formatter.newline.before.catch=false | ||
js.formatter.spaces.after.prefix.operator=0 | ||
js.formatter.brace.position.function.declaration=same.line | ||
js.formatter.spaces.after.key.value.operator=1 | ||
js.formatter.brace.position.blocks=same.line | ||
==CONTENT== | ||
function exampleFunction() { | ||
"use strict"; | ||
} | ||
==FORMATTED== | ||
function exampleFunction() { | ||
"use strict"; | ||
} |
62 changes: 62 additions & 0 deletions
62
tests/com.aptana.editor.js.formatter.tests/formatting/test127.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
==PREFS== | ||
js.formatter.spaces.after.commas=1 | ||
js.formatter.spaces.after.assignment.operator=1 | ||
js.formatter.spaces.after.arithmetic.operator=1 | ||
js.formatter.spaces.after.conditional.operator=1 | ||
js.formatter.indent.case.body=true | ||
js.formatter.indent.switch.body=true | ||
js.formatter.spaces.before.for.semicolon.operator=0 | ||
js.formatter.spaces.before.parentheses=0 | ||
js.formatter.spaces.after.semicolon.operator=1 | ||
js.formatter.spaces.before.postfix.operator=0 | ||
js.formatter.spaces.after.postfix.operator=0 | ||
js.formatter.spaces.before.relational.operator=1 | ||
js.formatter.spaces.before.case.colon.operator=1 | ||
js.formatter.spaces.before.unary.operator=0 | ||
js.formatter.wrap.comments=false | ||
js.formatter.indent.group.body=true | ||
js.formatter.line.after.function.declaration=1 | ||
js.formatter.spaces.after.concatenation.operator=1 | ||
js.formatter.wrap.comments.length=80 | ||
js.formatter.spaces.before.conditional.operator=1 | ||
js.formatter.formatter.tabulation.size=4 | ||
js.formatter.spaces.after.relational.operator=1 | ||
js.formatter.spaces.after.case.colon.operator=1 | ||
js.formatter.spaces.before.prefix.operator=0 | ||
js.formatter.indent.blocks=true | ||
js.formatter.spaces.before.concatenation.operator=1 | ||
js.formatter.line.preserve=1 | ||
js.formatter.brace.position.case.block=same.line | ||
js.formatter.brace.position.switch.block=same.line | ||
js.formatter.formatter.tabulation.char=editor | ||
js.formatter.indent.function.body=true | ||
js.formatter.line.after.function.declaration.expression=0 | ||
js.formatter.formatter.indentation.size=4 | ||
js.formatter.newline.before.name.value.pairs=true | ||
js.formatter.spaces.after.parentheses=0 | ||
js.formatter.spaces.after.for.semicolon.operator=1 | ||
js.formatter.newline.before.if.in.elseif=false | ||
js.formatter.spaces.before.key.value.operator=1 | ||
js.formatter.spaces.before.commas=0 | ||
js.formatter.spaces.after.unary.operator=0 | ||
js.formatter.spaces.before.arithmetic.operator=1 | ||
js.formatter.spaces.before.assignment.operator=1 | ||
js.formatter.newline.before.dowhile=false | ||
js.formatter.newline.before.else=false | ||
js.formatter.spaces.before.semicolon.operator=0 | ||
js.formatter.newline.before.finally=false | ||
js.formatter.newline.before.catch=false | ||
js.formatter.spaces.after.prefix.operator=0 | ||
js.formatter.brace.position.function.declaration=same.line | ||
js.formatter.spaces.after.key.value.operator=1 | ||
js.formatter.brace.position.blocks=same.line | ||
==CONTENT== | ||
function exampleFunction() { | ||
"first directive"; | ||
'the second in the single quotes'; | ||
} | ||
==FORMATTED== | ||
function exampleFunction() { | ||
"first directive"; | ||
'the second in the single quotes'; | ||
} |
56 changes: 56 additions & 0 deletions
56
tests/com.aptana.editor.js.formatter.tests/formatting/test128.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
==PREFS== | ||
js.formatter.spaces.after.commas=1 | ||
js.formatter.spaces.after.assignment.operator=1 | ||
js.formatter.spaces.after.arithmetic.operator=1 | ||
js.formatter.spaces.after.conditional.operator=1 | ||
js.formatter.indent.case.body=true | ||
js.formatter.indent.switch.body=true | ||
js.formatter.spaces.before.for.semicolon.operator=0 | ||
js.formatter.spaces.before.parentheses=0 | ||
js.formatter.spaces.after.semicolon.operator=1 | ||
js.formatter.spaces.before.postfix.operator=0 | ||
js.formatter.spaces.after.postfix.operator=0 | ||
js.formatter.spaces.before.relational.operator=1 | ||
js.formatter.spaces.before.case.colon.operator=1 | ||
js.formatter.spaces.before.unary.operator=0 | ||
js.formatter.wrap.comments=false | ||
js.formatter.indent.group.body=true | ||
js.formatter.line.after.function.declaration=1 | ||
js.formatter.spaces.after.concatenation.operator=1 | ||
js.formatter.wrap.comments.length=80 | ||
js.formatter.spaces.before.conditional.operator=1 | ||
js.formatter.formatter.tabulation.size=4 | ||
js.formatter.spaces.after.relational.operator=1 | ||
js.formatter.spaces.after.case.colon.operator=1 | ||
js.formatter.spaces.before.prefix.operator=0 | ||
js.formatter.indent.blocks=true | ||
js.formatter.spaces.before.concatenation.operator=1 | ||
js.formatter.line.preserve=1 | ||
js.formatter.brace.position.case.block=same.line | ||
js.formatter.brace.position.switch.block=same.line | ||
js.formatter.formatter.tabulation.char=editor | ||
js.formatter.indent.function.body=true | ||
js.formatter.line.after.function.declaration.expression=0 | ||
js.formatter.formatter.indentation.size=4 | ||
js.formatter.newline.before.name.value.pairs=true | ||
js.formatter.spaces.after.parentheses=0 | ||
js.formatter.spaces.after.for.semicolon.operator=1 | ||
js.formatter.newline.before.if.in.elseif=false | ||
js.formatter.spaces.before.key.value.operator=1 | ||
js.formatter.spaces.before.commas=0 | ||
js.formatter.spaces.after.unary.operator=0 | ||
js.formatter.spaces.before.arithmetic.operator=1 | ||
js.formatter.spaces.before.assignment.operator=1 | ||
js.formatter.newline.before.dowhile=false | ||
js.formatter.newline.before.else=false | ||
js.formatter.spaces.before.semicolon.operator=0 | ||
js.formatter.newline.before.finally=false | ||
js.formatter.newline.before.catch=false | ||
js.formatter.spaces.after.prefix.operator=0 | ||
js.formatter.brace.position.function.declaration=same.line | ||
js.formatter.spaces.after.key.value.operator=1 | ||
js.formatter.brace.position.blocks=same.line | ||
==CONTENT== | ||
"use strict"; | ||
==FORMATTED== | ||
"use strict"; |