Skip to content

Commit 60e9b74

Browse files
committed
Included the temporary yang model extraction directory in the list of model librarires given to yanglint, in order to support drafts with models referencing models in the same draft. Fixes issue ietf-tools#2324.
- Legacy-Id: 13736
1 parent ade8973 commit 60e9b74

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

ietf/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,7 @@ def skip_unreadable_post(record):
671671
IDSUBMIT_STAGING_URL = '//www.ietf.org/staging/'
672672
IDSUBMIT_IDNITS_BINARY = '/a/www/ietf-datatracker/scripts/idnits'
673673
SUBMIT_PYANG_COMMAND = 'pyang --verbose --ietf -p {libs} {model}'
674-
SUBMIT_YANGLINT_COMMAND = 'yanglint --verbose -p {rfclib} -p {draftlib} {model}'
674+
SUBMIT_YANGLINT_COMMAND = 'yanglint --verbose -p {rfclib} -p {draftlib} -p {tmplib} {model}'
675675
SUBMIT_YANGLINT_COMMAND = None # use the value above if you have yanglint installed
676676

677677
IDSUBMIT_CHECKER_CLASSES = (

ietf/submit/checkers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ def check_file_txt(self, path):
229229
cmd_template = settings.SUBMIT_YANGLINT_COMMAND
230230
command = cmd_template.split()[0]
231231
cmd_version = VersionInfo.objects.get(command=command).version
232-
cmd = cmd_template.format(model=path, rfclib=settings.SUBMIT_YANG_RFC_MODEL_DIR, draftlib=settings.SUBMIT_YANG_DRAFT_MODEL_DIR)
232+
cmd = cmd_template.format(model=path, rfclib=settings.SUBMIT_YANG_RFC_MODEL_DIR, draftlib=settings.SUBMIT_YANG_DRAFT_MODEL_DIR, tmplib=workdir)
233233
code, out, err = pipe(cmd)
234234
if code > 0:
235235
error_lines = err.splitlines()

0 commit comments

Comments
 (0)