Skip to content

Commit

Permalink
fix documentation on sql formatter
Browse files Browse the repository at this point in the history
change link and add a sample configuration file

Closes diffplug#339
  • Loading branch information
baptistemesta authored Jan 21, 2019
1 parent 3c1741b commit 5c04e4b
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion plugin-gradle/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -290,12 +290,24 @@ spotless {
sql {
// default value for target files
target '**/*.sql'
// configFile is optional, arguments available here: https://github.com/diffplug/spotless/blob/master/lib/src/main/java/com/diffplug/spotless/sql/DBeaverSQLFormatterStep.java
// configFile is optional, arguments available here: https://github.com/diffplug/spotless/blob/master/lib/src/main/java/com/diffplug/spotless/sql/dbeaver/DBeaverSQLFormatterConfiguration.java
dbeaver().configFile('dbeaver.props')
}
}
```

Default configuration file:
```properties
# case of the keywords (UPPER, LOWER or ORIGINAL)
sql.formatter.keyword.case=UPPER
# Statement delimiter
sql.formatter.statement.delimiter=;
# Indentation style (space or tab)
sql.formatter.indent.type=space
# Number of identation characters
sql.formatter.indent.size=4
```

<a name="cpp"></a>

## Applying to C/C++ sources
Expand Down

0 comments on commit 5c04e4b

Please sign in to comment.