Mantis - Mascot
Erweiterte Problemanzeige
74 general kleinerer Fehler nicht getestet 2011-08-03 22:20 2011-08-07 08:20
sigonnea  
xclerc  
normal  
erledigt 1.0-beta  
erledigt  
keine    
keine 1.0  
0000074: typography.spaces_around_operators: check the '::' operator
The Caml programming guidelines [1] state that '::' operator should be surrounded by whitespace, which is not checked in this version of mascot.

[1] http://caml.inria.fr/resources/doc/guides/guidelines.en.html [^]
Here is a trivial patch that performs this check:

[Spaces around '::' operator
Benjamin Sigonneau <benjamin@xxxxxxxxxxxx.info>**20110803201454
 Ignore-this: 989c2be8dc6be67b43faa718ac13b454
 
 Detect the absence of whitespace around the '::' operator, as stated in Caml programming guidelines <http://caml.inria.fr/resources/doc/guides/guidelines.en.html>. [^]
     
] hunk ./src/checks/typo_spacesAroundOperators.ml 48
         (match s.[0] with
         | '-' | '~' ->
             Camlp4Utils.check_white "operator" s err prev
- | '$' | '%' | '&' | '*' | '+' | '/' | '<' | '=' | '>' | '?' | '@' | '^' | '|' ->
+ | '$' | '%' | '&' | '*' | '+' | '/' | '<' | '=' | '>' | '?' | '@' | '^' | '|'
+ | ':' when s = "::" ->
             Camlp4Utils.check_white "operator" s err prev;
             Camlp4Utils.check_first_white "operator" s err tl
         | '.' ->

Context:

[TAG 1.0-beta
mascot@x9c.fr**20110715041203
 Ignore-this: 5d3c45d2c84c26077cf3af5135d116a3
]
Problem-Historie
2011-08-03 22:20 sigonnea Neues Problem
2011-08-07 08:20 xclerc Problemnotiz hinzugefügt: 0000241
2011-08-07 08:20 xclerc Status neu => erledigt
2011-08-07 08:20 xclerc Behoben in Version => 1.0
2011-08-07 08:20 xclerc Lösung offen => erledigt
2011-08-07 08:20 xclerc Bearbeitung durch => xclerc

Notiz
(0000241)
xclerc   
2011-08-07 08:20   
Thanks for reporting, I just overlooked the "::" operator despite its wide use...
If you found other inconsistencies (or misses) from the official guidelines, do
not hesitate to report them. The goal is of course to be able to enforce them
(or a subset chosen by configuration, and taste) through the tool.