Closed rabinpatra closed 3 years ago
If you just validate the module w/o printing the tree you get:
$ pyang moduleA.yang
moduleB.yang:9: error: prefix "common" is not defined (reported only once)
The tree plugin ignores implict errors b/c often it is better to see the tree even if some imported module has some error.
Thanks for the answer! We started using the validation method in our build.
However -- it might still be useful to print out the implicit parsing problems as warnings.
moduleB that uses a type from another module common is missing the import statement for common.
When module B is compiled, pyang throws an error as expected:
However moduleA that imports moduleB and uses its grouping doesn't throw any errors
This causes a lot of problems as errors are obscured from the user and we end up with missing leaves and paths from the final yang model.
Am I missing an option in pyang to perform a stricter check?
Using pyang version 2.4.0
moduleA.yang.txt moduleB.yang.txt common.yang.txt