Skip to content

Commit b89670d

Browse files
committed
README: Explain that --file-lines ranges are 1-based
1 parent fb41b93 commit b89670d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ If you want to restrict reformatting to specific sets of lines, you can
7777
use the `--file-lines` option. Its argument is a JSON array of objects
7878
with `file` and `range` properties, where `file` is a file name, and
7979
`range` is an array representing a range of lines like `[7,13]`. Ranges
80-
are inclusive of both end points. Specifying an empty array will result in
81-
no files being formatted. For example,
80+
are 1-based and inclusive of both end points. Specifying an empty array
81+
will result in no files being formatted. For example,
8282

8383
```
8484
rustfmt --file-lines '[

0 commit comments

Comments
 (0)