[YANGTOOLS-550] Parser accepts invalid models Created: 18/Nov/15  Updated: 10/Apr/22  Due: 03/Dec/15  Resolved: 18/Dec/15

Status: Resolved
Project: yangtools
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: Robert Varga Assignee: Filip Gregor
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issue Links:
Blocks
blocks YANGTOOLS-505 malformed union type not caught at co... Resolved
blocks YANGTOOLS-533 NPE in case of missing leaf type - fi... Resolved
is blocked by SFC-124 invalid yang files Resolved
is blocked by YANGTOOLS-541 Check nested substatements in stateme... Resolved
Duplicate
is duplicated by YANGTOOLS-541 Check nested substatements in stateme... Resolved
External issue ID: 4646

 Description   

yang/yang-parser-impl/src/test/resources/type-tests/types.yang contains:

leaf leaf-decimal64 {
type decimal64

{ fraction-digits 2; range "1 .. 3.14 | 10 | 20..max"; description "test decimal64"; reference "test decimal64 ref"; status current; }

}

which clearly violates RFC6020, yet the parser accepts it silently. It should reject the model due to invalid statements being present 'type' statement. Audit and fix all similar failures to validate statement appropriateness.



 Comments   
Comment by Martin Ciglan [ 20/Nov/15 ]

Validation design discussed, will be implemented

Comment by Filip Gregor [ 01/Dec/15 ]

Fix pushed: https://git.opendaylight.org/gerrit/#/c/30202/

Generated at Wed Feb 07 20:53:34 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.