You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are designing what running namelint should produce. Criteria:
7
+
8
+
* Guaranteed UTF-8: no invalid Unicode UTF-8 byte sequences
9
+
* Nothing unsafe: looking at the output shouldn't mess up your terminal
10
+
* Separate results (ex: lint errors) from tooling messages (ex: errors loading rules)
11
+
* Distinct: filenames should be as close to actual as possible, but still show what is going on behind the scenes
12
+
* Nice output for humans looking at a tty
13
+
* Nice output when running in CI
14
+
15
+
## What goes where
16
+
17
+
* Stdout: Progress updates (controlled by a `--progress` option)
18
+
* Stdout: human-readable lint results
19
+
* Stderr: tooling messages (controlled by a `--loglevel` option)
20
+
* File: machine-readable (=JSON) lint results (controlled by a `--output` option)
21
+
22
+
## Details
23
+
24
+
Progress is one of `none`, `dots` or `bar`. If stdout is a tty, the default is `bar`. Otherwise the default is `dots`.
25
+
26
+
The JSON output has:
27
+
* the `filename` if the filename is UTF-8 and has no null bytes. All non-ASCII characters will use the escaped form (`\uXXXX`), so the file should be 7-bit ASCII safe.
28
+
* a `bytes` version of the filename if there are any non-Posix characters.
29
+
* a `display` version of the filename, with non-Posix characters replaced by `?`
0 commit comments