diff options
author | stuebinm | 2021-11-17 01:01:37 +0100 |
---|---|---|
committer | stuebinm | 2021-11-17 01:05:55 +0100 |
commit | ac21c10ca9a0ca3fed263a2e761e4045e6353473 (patch) | |
tree | 822b6ff39cb9b534df313065442ba85e82a4d87a | |
parent | a572b9e1b113e0c8bea94c4f561c35742cdf4aeb (diff) |
slight updates to documentation
Diffstat (limited to '')
-rw-r--r-- | Lints.md | 3 | ||||
-rw-r--r-- | Readme.md | 24 |
2 files changed, 16 insertions, 11 deletions
@@ -5,8 +5,7 @@ Note: Most lints (even those not related to properties) are currently defined in ## General Tiledmap Requirements - - maps must have layers "start" and "floorLayer", and at least one layer wich - has as Property "exitUrl" + - maps must have layers "start" and "floorLayer", and at least one layer which has as Property "exitUrl" - maps must be orthogonal, tile size must be 32 × 32 - maps must not define their own scripts (unless allowed to do so in the configuration file) @@ -21,8 +21,8 @@ walint --config-file config.json --repository path \ directory. `walint` will lint all maps reachable from it. If not given, it defaults to `main.json` - `--lintLevel`: limit output only to messages that have at most the given - level. Valid levels are `Info`, `Suggestion`, `Warning`, `Error`, `Fatal`. - Defaults to `Suggestion` if not given. + level. Valid levels are `Info`, `Suggestion`, `Warning`, `Forbidden`, `Error`, + `Fatal`. Defaults to `Suggestion` if not given. - `--json`: print output as json instead of the normal more human-friendly format - `--pretty`: if used with `--json`, insert line breaks and indentation to make the output more readable. Otherwise no effect. @@ -30,8 +30,9 @@ walint --config-file config.json --repository path \ json written to this path will be minimised, and *only those maps and assets which are reachable from the entrypoint* will be writen at all. If not given, `walint` will only run the linter and do nothing else. If `walint` encounters - any references to local map assets which are not present in the repository, it - will fail. + any references to local map assets which are not present in the repository, + or if the map generates lints above the maximum lint level, it will instead + exit with code 1 without touching the output path at all. - `--config-file file`: path to a configuation file. Required (for now). - `--config json`: takes a string which should contain a json object conforming to the same schema as the configuration file, except that all keys are @@ -51,9 +52,13 @@ you may leave out keys whose type includes `Maybe`) ### Output -By default `walint` prints lints in a hopefully human-readable manner. If the -`--json` option is given, it will instead give a json that should conform to -the following schema: +By default `walint` prints lints in a hopefully human-readable manner. Its exit +code will be 1 if the maximum lint level set in its config was exceeded, and 0 +otherwise. Only in the latter case will it write out an adjusted map respository +to the path passed to `--out`. + +If the `--json` option is given, output to stdout will be printed as json, which +should conform to the following schema (here defined in a quasi-haskell syntax): ```haskell -- | The main type of walint's output @@ -84,8 +89,8 @@ type Where = -- ^ what is this lint's level? } --- | Valid lint levels. Encoded as strings. -data Level = Info | Suggestion | Warning | Error | Fatal +-- | Valid lint levels. Encoded as strings, listed in order here. +data Level = Info | Suggestion | Warning | Forbidden | Error | Fatal -- | description of a single (missing) asset @@ -105,3 +110,4 @@ type Entrypoint = } ``` + |