niti: force `eval` to parse things as modules.

Signed-off-by: Jean Privat <jean@pryen.org>
nitunit: allows multiple independant block in a single comment

A new block is started by non-trivial modules

Signed-off-by: Jean Privat <jean@pryen.org>
nitunit: `-W` warns fishy block in comments

Usefull to find buggy nitunit tests with the `--no-act` flag.

Signed-off-by: Jean Privat <jean@pryen.org>
nitunit: keeps track of the source directory of the tested module.

So you can do something like `nitunit src/tests.nit`.
Alternative of #415

Signed-off-by: Jean Privat <jean@pryen.org>
lib: fix some nitunit tests, thanks to the new features of the tool

Signed-off-by: Jean Privat <jean@pryen.org>
tests: update sav/nitunit & sav/test_markdown

Signed-off-by: Jean Privat <jean@pryen.org>
nitls: option `-M` aliases `-d`, `-p` and `-s`

Signed-off-by: Jean Privat <jean@pryen.org>
nitls: use `-P` for `--project`. `-p` is already used for `--path`

Signed-off-by: Jean Privat <jean@pryen.org>
tests: update nitls

Signed-off-by: Jean Privat <jean@pryen.org>
lib: fix Counter::clear

Now the sum is also set to 0 when call to clear

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
metrics: clear metrics set between each group analysis

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
model_utils: add attributes count (local + inherited) in MClass
model_utils: add MAttribute::is_nullable

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
metrics: compute number of properties and number of attributes in mclasses_metrics

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
metrics: count nullable attributes

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
metrics: display sums in to_console

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
nitls: parse options before instantiating modelbuilder

Because things, eg paths, may depend on options,

Signed-off-by: Jean Privat <jean@pryen.org>
Merge: Improve nitunit

More robust, verbose, helpfull and now understand the fences `~~~`

Also fix some existing nitunit tests.

Pull-Request: #415
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Merge: improve nitls

Improve nitls to be more versatile.

Pull-Request: #413
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
modelbuilder: a directory named `src` triggers more heuristics

A MGroup is determined by the fact that a directory is named `src`
Thus, current project that put their module in a src directory can be
correctly identified as MProject

~~~
$ nitls src/nit*.nit examples/mnit_dino/src/*.nit -t
mnit_dino (examples/mnit_dino/src)
|--dino (examples/mnit_dino/src/dino.nit)
|--dino_android (examples/mnit_dino/src/dino_android.nit)
|--dino_linux (examples/mnit_dino/src/dino_linux.nit)
|--fancy_dino (examples/mnit_dino/src/fancy_dino.nit)
|--game_logic (examples/mnit_dino/src/game_logic.nit)
|--graphism (examples/mnit_dino/src/graphism.nit)
`--splash (examples/mnit_dino/src/splash.nit)
nit (src)
|--nit (src/nit.nit)
|--nit_version (src/nit_version.nit)
|--nitdbg_client (src/nitdbg_client.nit)
|--nitdbg_server (src/nitdbg_server.nit)
|--nitdbg_websocket_server (src/nitdbg_websocket_server.nit)
|--nitdoc (src/nitdoc.nit)
|--nitg (src/nitg.nit)
|--nitlight (src/nitlight.nit)
|--nitls (src/nitls.nit)
|--nitmetrics (src/nitmetrics.nit)
|--nitunit (src/nitunit.nit)
`--nitx (src/nitx.nit)
~~~

Signed-off-by: Jean Privat <jean@pryen.org>