top of page

SQLcl formatting cheat sheet

  • Writer: Alice Jordan
    Alice Jordan
  • Aug 11
  • 2 min read

When you export your objects for a SQLcl project framework, you'll have spotted the long list of settings in the format file (project.sqlformat.xml). The names aren't always obvious, and they don't map neatly onto what you actually see in SQL Developer's Advanced Format panel, so working out what each one does tends to be a bit of trial and error. This is based on my own testing, some of these settings are barely documented, and behaviour can shift between versions. If you spot something I've got wrong - drop a comment and I'll get it updated.


Setting

What it does

adjustCaseOnly

If true, skips all whitespace/layout formatting and only changes keyword/identifier case

alignTabColAliases

Align table/column aliases

breakOnSubqueries

Force subqueries onto their own line

alignEquality

Align = in WHERE/ON conditions

singleLineComments

How code comments are handled, options are:

  • CommentsUnchanged

  • SingleLine

  • MultiLine

breakAnsiiJoin

Controls whether an ANSI-style JOIN clause gets forced onto its own line, separate from the table it's joining to.

maxCharLineSize

Line-wrap width

alignAssignments

Align := assignment operators in PL/SQL blocks

breaksProcArgs

Break procedure/function arguments onto separate lines

alignRight

Right-align values in aligned blocks (vs left)

breaksComma

.Before / .After  whether line breaks go before or after a comma

breaksAroundLogicalConjunctions

Line-break placement around AND/OR

alignNamedArgs

Align => in named parameter calls

formatProgramURL

Which Arbori formatting program to use, default uses the built-in one; can point to a custom .arbori program for advanced rule overrides

formatThreshold

Minimum statement complexity before the formatter bothers reformatting

spaceAroundOperators

Spaces around + - = <> etc.

useTab

Use tabs vs spaces for indentation

idCase

Identifier (table/column) case: .UPPER, .lower, or .NoCaseChange

extraLinesAfterSignificantStatements

Blank-line handling after statements like COMMIT

breaksConcat

Line-break placement e.g. .Before: the break goes before each ||, after: the break goes .After each ||, and  .Nobreaks keeps the whole concatenation on one line 

flowControl

.IndentedActions etc. how IF/THEN/ELSE loops indent

commasPerLine

How many comma-separated items per line before wrapping

forceLinebreaksBeforeComment

Force a line break before inline comments

alignTypeDecl

Align type declarations (e.g. in %TYPE blocks)

breakParenCondition

Break conditions inside parentheses onto new lines

parseForwardAndBackward

Runs the parser in both directions to catch formatting edge cases the single-pass parser misses - improves reliability on complex/nested SQL at a small performance cost

identSpaces

Number of spaces per indent level (if useTab is false)

breaksAfterSelect

Line break immediately after SELECT

spaceAfterCommas

Space after each comma

kwCase

Keyword case: .UPPER, .lower, or .NoCaseChange

removeDoubleQuotes

Strips unnecessary double-quotes from identifiers where the quoting isn't required (e.g. not mixed-case or reserved words)

formatWhenSyntaxError

Whether to attempt formatting even if the SQL has a syntax error

spaceAroundBrackets

controls the whitespace the formatter puts around parentheses ( ). .Default has no spaces, .Inside has spaces within the brackets, Outside. has a space outside the brackets 


 
 
bottom of page