Mantis - Mascot
Erweiterte Problemanzeige
76 general kleinerer Fehler nicht getestet 2011-08-08 16:19 2012-08-29 20:17
sigonnea  
xclerc  
normal  
erledigt 1.0-beta  
erledigt  
keine    
keine 1.0  
0000076: No mandatory spaces around range operator
According to the example in Ocaml documentation (see section 7.4), range pattern does not have to be surrounded by whitespace.
Below is a small patch that corrects this:

diff --git a/src/checks/typo_spacesAroundOperators.ml b/src/checks/typo_spacesAroundOperators.ml
index 2d9046e..5ca5ac0 100644
--- a/src/checks/typo_spacesAroundOperators.ml
+++ b/src/checks/typo_spacesAroundOperators.ml
@@ -46,13 +46,13 @@ let run _ _ (_, tokens) _ report =
         (match s.[0] with
         | '-' | '~' ->
             Camlp4Utils.check_white "operator" s err prev
- | '$' | '%' | '&' | '*' | '+' | '/' | '<' | '=' | '>' | (* '?' | *) '@' | '^' | '|' ->
+ | '$' | '%' | '&' | '*' | '+' | '/' | '<' | '=' | '>' | '@' | '^' | '|' ->
             Camlp4Utils.check_white "operator" s err prev;
             Camlp4Utils.check_first_white "operator" s err tl
         | ':' when len > 1 && s.[1] = ':' ->
             Camlp4Utils.check_white "operator" s err prev;
             Camlp4Utils.check_first_white "operator" s err tl
- | '.' when len > 1 ->
+ | '.' when len > 1 && s <> ".." ->
             Camlp4Utils.check_white "operator" s err prev;
             Camlp4Utils.check_first_white "operator" s err tl
         | _ -> ());
Problem-Historie
2011-08-08 16:19 sigonnea Neues Problem
2012-08-29 20:17 xclerc Status neu => erledigt
2012-08-29 20:17 xclerc Behoben in Version => 1.0
2012-08-29 20:17 xclerc Lösung offen => erledigt
2012-08-29 20:17 xclerc Bearbeitung durch => xclerc

Zu diesem Problem gibt es keine Notizen.