Skip to content

Commit 02ec2aa

Browse files
committed
Included the path for draft moduled found invalid in the module paths when running yanglint, in order to avoid some unhelpful model not found messages. Fixes issue ietf-tools#2398.
- Legacy-Id: 14266
1 parent ec02ed5 commit 02ec2aa

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

ietf/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@ def skip_unreadable_post(record):
684684
IDSUBMIT_STAGING_URL = '//www.ietf.org/staging/'
685685
IDSUBMIT_IDNITS_BINARY = '/a/www/ietf-datatracker/scripts/idnits'
686686
SUBMIT_PYANG_COMMAND = 'pyang --verbose --ietf -p {libs} {model}'
687-
SUBMIT_YANGLINT_COMMAND = 'yanglint --verbose -p {rfclib} -p {draftlib} -p {tmplib} {model} -i'
687+
SUBMIT_YANGLINT_COMMAND = 'yanglint --verbose -p {tmplib} -p {rfclib} -p {draftlib} -p {invallib} {model} -i'
688688
SUBMIT_YANGLINT_COMMAND = None # use the value above if you have yanglint installed
689689

690690
SUBMIT_YANG_CATALOG_MODULEARG = "modules[]={module}"

ietf/submit/checkers.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,8 @@ def check_file_txt(self, path):
226226
cmd_template = settings.SUBMIT_YANGLINT_COMMAND
227227
command = [ w for w in cmd_template.split() if not '=' in w ][0]
228228
cmd_version = VersionInfo.objects.get(command=command).version
229-
cmd = cmd_template.format(model=path, rfclib=settings.SUBMIT_YANG_RFC_MODEL_DIR, draftlib=settings.SUBMIT_YANG_DRAFT_MODEL_DIR, tmplib=workdir)
229+
cmd = cmd_template.format(model=path, rfclib=settings.SUBMIT_YANG_RFC_MODEL_DIR, tmplib=workdir,
230+
draftlib=settings.SUBMIT_YANG_DRAFT_MODEL_DIR, invallib=settings.SUBMIT_YANG_INVAL_MODEL_DIR, )
230231
code, out, err = pipe(cmd)
231232
if code > 0 or len(err.strip()) > 0:
232233
error_lines = err.splitlines()

0 commit comments

Comments
 (0)