You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* PoC for adding a %todo extension that warns with proper locations
* raise instead of emulating Obj.magic
* align
* use Js.Exn.raiseError and include ReScript file name + location of todo code in error thrown at runtime
* update fixtures
* change text
* fixtures
* changelog
(* If you remove a warning, leave a hole in the numbering. NEVER change
91
92
the numbers of existing warnings.
@@ -151,6 +152,7 @@ let number = function
151
152
|Bs_integer_literal_overflow -> 107
152
153
|Bs_uninterpreted_delimiters_ -> 108
153
154
|Bs_toplevel_expression_unit_ -> 109
155
+
|Bs_todo_ -> 110
154
156
155
157
let last_warning_number =110
156
158
@@ -509,6 +511,11 @@ let message = function
509
511
|Other -> "yourExpression") in
510
512
Printf.sprintf "\n\n Possible solutions:\n - Assigning to a value that is then ignored: `let _ = %s`\n - Piping into the built-in ignore function to ignore the result: `%s->ignore`" helpText helpText
511
513
|_ -> "")
514
+
|Bs_todomaybe_text -> (
515
+
match maybe_text with
516
+
|None -> "Todo found."
517
+
|Sometodo -> "Todo found: "^ todo
518
+
) ^"\n\n This code is not implemented yet and will crash at runtime. Make sure you implement this before running the code."
0 commit comments