@@ -167,10 +167,12 @@ subcommands:
167167 or off respectively, regardless of whether the output is going to a
168168 terminal.
169169
170- * ` --configuration <file> ` : The path to a JSON file that contains
170+ * ` --configuration <file|string > ` : The path to a JSON file that contains
171171 [ configurable settings] ( #configuring-the-command-line-tool ) for
172- ` swift-format ` . If omitted, a default configuration is use (which
173- can be seen by running ` swift-format dump-configuration ` ).
172+ ` swift-format ` . If no file is found, ` swift-format ` tries to load the json
173+ data as a string, if valid. If the parameter is omitted, a default
174+ configuration is used (which can be seen by running
175+ ` swift-format dump-configuration ` ).
174176
175177* ` --ignore-unparsable-files ` : If this option is specified and a source file
176178 contains syntax errors or can otherwise not be parsed successfully by the
@@ -202,14 +204,18 @@ JSON-formatted file named `.swift-format` in the same directory. If one is
202204found, then that file is loaded to determine the tool's configuration. If the
203205file is not found, then it looks in the parent directory, and so on.
204206
207+ If there is no project specific configuration file, the
208+ [ config directories] ( Documentation/Configuration.md#Global-Configuration )
209+ are checked for a ` swift-format/config.json ` configuration file.
210+
205211If no configuration file is found, a default configuration is used. The
206212settings in the default configuration can be viewed by running
207213` swift-format dump-configuration ` , which will dump it to standard
208214output.
209215
210- If the ` --configuration <file> ` option is passed to ` swift-format ` , then that
211- configuration will be used unconditionally and the file system will not be
212- searched.
216+ If the ` --configuration <file|string > ` option is passed to ` swift-format ` ,
217+ then that configuration will be used unconditionally and the file system will
218+ not be searched.
213219
214220See [ Documentation/Configuration.md] ( Documentation/Configuration.md ) for a
215221description of the configuration file format and the settings that are
0 commit comments