toolcontext: add some documentation
authorJean Privat <jean@pryen.org>
Fri, 19 Sep 2014 18:15:52 +0000 (14:15 -0400)
committerJean Privat <jean@pryen.org>
Fri, 19 Sep 2014 18:15:52 +0000 (14:15 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>

src/toolcontext.nit

index dd1d2c1..dfb6f2d 100644 (file)
@@ -17,7 +17,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-# Common command-line tool infractructure than handle options and error messages
+# Common command-line tool infrastructure than handle options and error messages
 module toolcontext
 
 import opts
@@ -25,11 +25,19 @@ import location
 import version
 import template
 
+# A warning or an error
 class Message
        super Comparable
        redef type OTHER: Message
 
+       # The origin of the message in the source code, if any.
        var location: nullable Location
+
+       # The human-readable description of the message.
+       #
+       # It should be short and fit on a single line.
+       # It should also have meaningful information first in case
+       # on truncation by an IDE for instance.
        var text: String
 
        # Comparisons are made on message locations.