Skip to content
Snippets Groups Projects
Commit ac21c10c authored by stuebinm's avatar stuebinm
Browse files

slight updates to documentation

parent a572b9e1
No related branches found
No related tags found
No related merge requests found
...@@ -5,8 +5,7 @@ Note: Most lints (even those not related to properties) are currently defined in ...@@ -5,8 +5,7 @@ Note: Most lints (even those not related to properties) are currently defined in
## General Tiledmap Requirements ## General Tiledmap Requirements
- maps must have layers "start" and "floorLayer", and at least one layer wich - maps must have layers "start" and "floorLayer", and at least one layer which has as Property "exitUrl"
has as Property "exitUrl"
- maps must be orthogonal, tile size must be 32 × 32 - maps must be orthogonal, tile size must be 32 × 32
- maps must not define their own scripts (unless allowed to do so in - maps must not define their own scripts (unless allowed to do so in
the configuration file) the configuration file)
......
...@@ -21,8 +21,8 @@ walint --config-file config.json --repository path \ ...@@ -21,8 +21,8 @@ walint --config-file config.json --repository path \
directory. `walint` will lint all maps reachable from it. If not given, it directory. `walint` will lint all maps reachable from it. If not given, it
defaults to `main.json` defaults to `main.json`
- `--lintLevel`: limit output only to messages that have at most the given - `--lintLevel`: limit output only to messages that have at most the given
level. Valid levels are `Info`, `Suggestion`, `Warning`, `Error`, `Fatal`. level. Valid levels are `Info`, `Suggestion`, `Warning`, `Forbidden`, `Error`,
Defaults to `Suggestion` if not given. `Fatal`. Defaults to `Suggestion` if not given.
- `--json`: print output as json instead of the normal more human-friendly format - `--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 - `--pretty`: if used with `--json`, insert line breaks and indentation to make
the output more readable. Otherwise no effect. the output more readable. Otherwise no effect.
...@@ -30,8 +30,9 @@ walint --config-file config.json --repository path \ ...@@ -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 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, 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 `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 any references to local map assets which are not present in the repository,
will fail. 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-file file`: path to a configuation file. Required (for now).
- `--config json`: takes a string which should contain a json object conforming - `--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 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`) ...@@ -51,9 +52,13 @@ you may leave out keys whose type includes `Maybe`)
### Output ### Output
By default `walint` prints lints in a hopefully human-readable manner. If the By default `walint` prints lints in a hopefully human-readable manner. Its exit
`--json` option is given, it will instead give a json that should conform to code will be 1 if the maximum lint level set in its config was exceeded, and 0
the following schema: 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 ```haskell
-- | The main type of walint's output -- | The main type of walint's output
...@@ -84,8 +89,8 @@ type Where = ...@@ -84,8 +89,8 @@ type Where =
-- ^ what is this lint's level? -- ^ what is this lint's level?
} }
-- | Valid lint levels. Encoded as strings. -- | Valid lint levels. Encoded as strings, listed in order here.
data Level = Info | Suggestion | Warning | Error | Fatal data Level = Info | Suggestion | Warning | Forbidden | Error | Fatal
-- | description of a single (missing) asset -- | description of a single (missing) asset
...@@ -105,3 +110,4 @@ type Entrypoint = ...@@ -105,3 +110,4 @@ type Entrypoint =
} }
``` ```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment