@@ -200,17 +200,14 @@ configuration, by redirecting it to a file and editing it.
200200
201201### Configuring the Command Line Tool
202202
203- For any source file being checked or formatted, ` swift-format ` looks for a
204- JSON-formatted file named ` .swift-format-ignore ` in the same directory.
205- The presence of this file will disable all formatting and linting.
206- The contents of ` .swift-format-ignore ` are ignored - it can be an empty file.
203+ For any source file being checked or formatted, ` swift-format ` looks for
204+ configuration files in the same directory, and parent directories.
207205
208- If the file is not found, then it looks in the same directory for a file
209- called ` .swift-format ` . If one is found, then that file is loaded to
210- determine the tool's configuration.
206+ If it finds a file named ` .swift-format-ignore ` , it will disable all
207+ formatting and linting.
211208
212- If neither configuration file is found, the search for files continues
213- in the parent directory, and so on.
209+ If it finds a JSON-formatted file called ` .swift-format ` , then that
210+ file is loaded to determine the tool's configuration.
214211
215212If no configuration file is found at any level, a default configuration
216213is used. The settings in the default configuration can be viewed by
@@ -225,6 +222,9 @@ See [Documentation/Configuration.md](Documentation/Configuration.md) for a
225222description of the configuration file format and the settings that are
226223available.
227224
225+ Note that the contents of any ` .swift-format-ignore ` are ignored; the
226+ file can be empty.
227+
228228### Miscellaneous
229229
230230Running ` swift-format -v ` or ` swift-format --version ` will print version
0 commit comments