summaryrefslogtreecommitdiff
path: root/Readme.md
diff options
context:
space:
mode:
authorstuebinm2021-11-17 01:01:37 +0100
committerstuebinm2021-11-17 01:05:55 +0100
commitac21c10ca9a0ca3fed263a2e761e4045e6353473 (patch)
tree822b6ff39cb9b534df313065442ba85e82a4d87a /Readme.md
parenta572b9e1b113e0c8bea94c4f561c35742cdf4aeb (diff)
slight updates to documentation
Diffstat (limited to 'Readme.md')
-rw-r--r--Readme.md24
1 files changed, 15 insertions, 9 deletions
diff --git a/Readme.md b/Readme.md
index 1da89e6..c1cd707 100644
--- a/Readme.md
+++ b/Readme.md
@@ -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 =
}
```
+