Skip to content

Commit d4eea55

Browse files
committed
make target to format schema
1 parent c1af82c commit d4eea55

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,8 @@ unit-tests: mocks-gen
7878
ygot:
7979
pyang tests/schema/*
8080
go install github.com/openconfig/ygot/generator@latest
81-
generator -output_file=tests/sdcioygot/sdcio_schema.go -package_name=sdcio_schema -generate_fakeroot -fakeroot_name=device ./tests/schema/*
81+
generator -output_file=tests/sdcioygot/sdcio_schema.go -package_name=sdcio_schema -generate_fakeroot -fakeroot_name=device ./tests/schema/*
82+
83+
.PHONY: format_yang
84+
format_yang:
85+
cd $(CURDIR)/tests/schema; find ./ -name "*.yang" | xargs -I{} bash -c "cp {} {}.bak ; pyang -f yang {}.bak > {} ; rm {}.bak -f"

0 commit comments

Comments
 (0)