|
22 | 22 | * along with this program; if not, write to the Free Software
|
23 | 23 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *)
|
24 | 24 |
|
25 |
| -(** |
26 |
| - See the meanings of the warning codes here: https://caml.inria.fr/pub/docs/manual-ocaml/comp.html#sec281 |
27 |
| -
|
28 |
| - - 30 Two labels or constructors of the same name are defined in two mutually recursive types. |
29 |
| - - 40 Constructor or label name used out of scope. |
30 |
| -
|
31 |
| - - 6 Label omitted in function application. |
32 |
| - - 7 Method overridden. |
33 |
| - - 9 Missing fields in a record pattern. (*Not always desired, in some cases need [@@@warning "+9"] *) |
34 |
| - - 27 Innocuous unused variable: unused variable that is not bound with let nor as, and doesn’t start with an underscore (_) character. |
35 |
| - - 29 Unescaped end-of-line in a string constant (non-portable code). |
36 |
| - - 32 .. 39 Unused blabla |
37 |
| - - 44 Open statement shadows an already defined identifier. |
38 |
| - - 45 Open statement shadows an already defined label or constructor. |
39 |
| - - 48 Implicit elimination of optional arguments. https://caml.inria.fr/mantis/view.php?id=6352 |
40 |
| - - 101 (bsb-specific) unsafe polymorphic comparison. |
41 |
| -*) |
42 |
| - |
43 | 25 | (*
|
44 |
| - The purpose of default warning set is to make it strict while |
45 |
| - not annoy user too much |
| 26 | + The purpose of the default warning set is to make it strict while not annoying the user too much. |
46 | 27 |
|
47 |
| - -4 Fragile pattern matching: matching that will remain complete even if additional con- structors are added to one of the variant types matched. |
48 |
| - We turn it off since common pattern |
| 28 | + - 4 Fragile pattern matching: matching that will remain complete even if additional constructors are added to one of the variant types matched. |
| 29 | + We turn it off since the following is a common pattern: |
49 | 30 | {[
|
50 |
| - match x with | A -> .. | _ -> false |
| 31 | + switch x { | A => .. | _ => false } |
51 | 32 | ]}
|
52 | 33 |
|
53 |
| - -9 Missing fields in a record pattern. |
54 |
| - only in some special cases that we need all fields being listed |
| 34 | + - 9 Missing fields in a record pattern. |
| 35 | + Only in some special cases that we need all fields being listed |
55 | 36 |
|
56 |
| - We encourage people to write code based on type based disambigution |
57 |
| - 40,41,42 are enabled for compatiblity reasons |
58 |
| - -40 Constructor or label name used out of scope |
59 |
| - This is intentional, we should never warn it |
60 | 37 | - 41 Ambiguous constructor or label name.
|
61 | 38 | It is turned off since it prevents such cases below:
|
62 | 39 | {[
|
63 |
| - type a = A |B |
| 40 | + type a = A | B |
64 | 41 | type b = A | B | C
|
65 | 42 | ]}
|
66 |
| - - 42 Disambiguated constructor or label name (compatibility warning). |
67 | 43 |
|
68 | 44 | - 50 Unexpected documentation comment.
|
69 | 45 |
|
70 |
| - - 102 Bs_polymorphic_comparison |
| 46 | + - 102 Bs_polymorphic_comparison. |
71 | 47 | *)
|
72 | 48 | (* If you change this, don't forget to adapt docs/docson/build-schema.json as well. *)
|
73 |
| -let defaults_w = "+a-4-9-20-40-41-42-50-61-102" |
| 49 | +let defaults_w = "+a-4-9-20-41-50-102" |
74 | 50 |
|
75 | 51 | let defaults_warn_error = "-a+5+6+101+109"
|
76 | 52 | (*TODO: add +10*)
|
0 commit comments