mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-24 01:24:26 +01:00
doc: reintroduce the fmt command to fmt the schema
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
This commit is contained in:
committed by
Rusty Russell
parent
1ef77504b1
commit
11c94528b3
@@ -93,10 +93,14 @@ doc-all: $(MANPAGES) doc/index.rst
|
||||
|
||||
SCHEMAS := $(wildcard doc/schemas/*.json)
|
||||
check-fmt-schemas: $(SCHEMAS:%=check-fmt-schema/%)
|
||||
fmt-schemas: $(SCHEMAS:%=fmt-schema/%)
|
||||
|
||||
check-fmt-schema/%: %
|
||||
@jq . < "$*" > "$*".fmt && diff -u "$*" "$*.fmt" && rm "$*.fmt"
|
||||
|
||||
fmt-schema/%: %
|
||||
@jq . < "$*" > "$*".fmt && cat "$*".fmt > "$*" && rm "$*.fmt"
|
||||
|
||||
check-doc: check-config-docs check-manpages check-fmt-schemas
|
||||
|
||||
# Some manpages use a schema, so need that added.
|
||||
|
||||
Reference in New Issue
Block a user