@@ -68,6 +68,9 @@ type t =
68
68
| Eliminated_optional_arguments of string list (* 48 *)
69
69
| No_cmi_file of string (* 49 *)
70
70
| Bad_docstring of bool (* 50 *)
71
+
72
+ | Bs_unused_attribute of string (* 101 *)
73
+ | Bs_polymorphic_comparison (* 102 *)
71
74
;;
72
75
73
76
(* If you remove a warning, leave a hole in the numbering. NEVER change
@@ -127,15 +130,20 @@ let number = function
127
130
| Eliminated_optional_arguments _ -> 48
128
131
| No_cmi_file _ -> 49
129
132
| Bad_docstring _ -> 50
133
+
134
+ | Bs_unused_attribute _ -> 101
135
+ | Bs_polymorphic_comparison -> 102
130
136
;;
131
137
132
- let last_warning_number = 50
138
+ let last_warning_number = 102
133
139
(* Must be the max number returned by the [number] function. *)
140
+ let letter_all =
141
+ let rec loop i = if i = 0 then [] else i :: loop (i - 1 ) in
142
+ loop last_warning_number
134
143
135
144
let letter = function
136
145
| 'a' ->
137
- let rec loop i = if i = 0 then [] else i :: loop (i - 1 ) in
138
- loop last_warning_number
146
+ letter_all
139
147
| 'b' -> []
140
148
| 'c' -> [1 ; 2 ]
141
149
| 'd' -> [3 ]
@@ -389,6 +397,10 @@ let message = function
389
397
| Bad_docstring unattached ->
390
398
if unattached then " unattached documentation comment (ignored)"
391
399
else " ambiguous documentation comment"
400
+ | Bs_unused_attribute s ->
401
+ " Unused bucklescript attribute: " ^ s
402
+ | Bs_polymorphic_comparison ->
403
+ " polymorphic comparison introduced (maybe unsafe)"
392
404
;;
393
405
394
406
let nerrors = ref 0 ;;
@@ -485,6 +497,7 @@ let descriptions =
485
497
48 , " Implicit elimination of optional arguments." ;
486
498
49 , " Missing cmi file when looking up module alias." ;
487
499
50 , " Unexpected documentation comment." ;
500
+ 101 ," Unused bs attributes" ;
488
501
]
489
502
;;
490
503
0 commit comments