|
2 | 2 |
|
3 | 3 | Setting a removed option on the command line should display an error message: |
4 | 4 |
|
5 | | - $ ocamlformat a.ml --extension-sugar preserve |
6 | | - ocamlformat: option '--extension-sugar': This option has been removed in |
7 | | - version 0.17. Concrete syntax will now always be preserved. |
8 | | - Usage: ocamlformat [OPTION]… [SRC]… |
9 | | - Try 'ocamlformat --help' for more information. |
10 | | - [1] |
11 | | - |
12 | | - $ ocamlformat a.ml --let-open preserve |
13 | | - ocamlformat: option '--let-open': This option has been removed in version |
14 | | - 0.17. Concrete syntax will now always be preserved. |
15 | | - Usage: ocamlformat [OPTION]… [SRC]… |
16 | | - Try 'ocamlformat --help' for more information. |
17 | | - [1] |
18 | | - |
19 | | - $ ocamlformat a.ml --escape-chars preserve |
20 | | - ocamlformat: option '--escape-chars': This option has been removed in version |
21 | | - 0.16. Concrete syntax will now always be preserved. |
22 | | - Usage: ocamlformat [OPTION]… [SRC]… |
23 | | - Try 'ocamlformat --help' for more information. |
24 | | - [1] |
25 | | - |
26 | | - $ ocamlformat a.ml --escape-strings preserve |
27 | | - ocamlformat: option '--escape-strings': This option has been removed in |
28 | | - version 0.16. Concrete syntax will now always be preserved. |
29 | | - Usage: ocamlformat [OPTION]… [SRC]… |
30 | | - Try 'ocamlformat --help' for more information. |
31 | | - [1] |
32 | | - |
33 | | - $ ocamlformat a.ml --doc-comments-val unset |
34 | | - ocamlformat: option '--doc-comments-val': This option has been removed in |
35 | | - version 0.16. If you are using `doc-comments-val=before` in |
36 | | - combination with `doc-comments=before` then only |
37 | | - `doc-comments=before` is now required to achive the same |
38 | | - behavior. If you are using `doc-comments-val=before` in |
39 | | - combination with `doc-comments=after` this behavior is not |
40 | | - available anymore. If you are using `doc-comments-val=after` in |
41 | | - combination with `doc-comments=before` please now use |
42 | | - `doc-comments=before-except-val`. If you are using |
43 | | - `doc-comments-val=after` in combination with |
44 | | - `doc-comments=after` then only |
45 | | - `doc-comments=after-when-possible` is now required to achieve |
46 | | - the same behavior. If you are using `doc-comments-val=unset` the |
47 | | - same behavior can now be achieved by setting `doc-comments` |
48 | | - only. |
49 | | - Usage: ocamlformat [OPTION]… [SRC]… |
50 | | - Try 'ocamlformat --help' for more information. |
| 5 | + $ ocamlformat a.ml --extension-sugar preserve 2>/dev/null |
51 | 6 | [1] |
52 | 7 |
|
53 | 8 | An error is also reported if a removed option is set in an .ocamlformat file: |
54 | 9 |
|
55 | 10 | $ echo 'escape-chars = preserve' > .ocamlformat |
56 | | - $ ocamlformat a.ml |
57 | | - ocamlformat: Error while parsing $TESTCASE_ROOT/.ocamlformat: |
58 | | - For option "escape-chars": This option has been removed in version 0.16. Concrete syntax will now always be preserved. |
59 | | - [1] |
60 | | - |
61 | | -Setting an option to a deprecated value on the command line should also display an error message: |
62 | | - |
63 | | - $ ocamlformat a.ml --break-separators=after-and-docked |
64 | | - ocamlformat: option '--break-separators': value `after-and-docked` has been |
65 | | - removed in version 0.12. One can get a similar behaviour by |
66 | | - setting `break-separators=after`, `space-around-lists=false`, |
67 | | - and `dock-collection-brackets=false`. |
68 | | - Usage: ocamlformat [OPTION]… [SRC]… |
69 | | - Try 'ocamlformat --help' for more information. |
70 | | - [1] |
71 | | - |
72 | | - $ ocamlformat a.ml --break-string-literals=wrap |
73 | | - ocamlformat: option '--break-string-literals': value `wrap` has been removed |
74 | | - in version 0.12. It has been replaced by the new default `auto` |
75 | | - value, which breaks lines at newlines and wraps string literals |
76 | | - at the margin. |
77 | | - Usage: ocamlformat [OPTION]… [SRC]… |
78 | | - Try 'ocamlformat --help' for more information. |
| 11 | + $ ocamlformat a.ml 2>/dev/null |
79 | 12 | [1] |
0 commit comments