mirror of
https://github.com/opnsense/core.git
synced 2026-05-28 04:34:51 -04:00
make: put the multi-line description test first
This commit is contained in:
parent
846450f9c4
commit
81464fb4a3
1 changed files with 4 additions and 4 deletions
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) 2025 Franco Fichtner <franco@opnsense.org>
|
||||
# Copyright (c) 2025-2026 Franco Fichtner <franco@opnsense.org>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
|
|
@ -54,6 +54,9 @@ lint-model:
|
|||
.if exists(${.CURDIR}/${DIR})
|
||||
@for MODEL in $$(find ${DIR} -depth 3 \
|
||||
-name "*.xml"); do \
|
||||
(xmllint $${MODEL} --xpath '/model/description' 2> /dev/null | wc -l | awk '{ print $$1 }' | grep -v '^1$$' || true) | while read LINE; do \
|
||||
echo "$${MODEL}: <description/> is not on a single line or missing"; \
|
||||
done; \
|
||||
(xmllint $${MODEL} --xpath '//*[@type and not(@type="ArrayField") and (not(Required) or Required="N") and Default]' 2> /dev/null | grep '^<' || true) | while read LINE; do \
|
||||
echo "$${MODEL}: $${LINE} has a spurious default value set"; \
|
||||
done; \
|
||||
|
|
@ -98,9 +101,6 @@ lint-model:
|
|||
(grep '<ValidationMessage>[a-z ]' $${MODEL} || true) | while read LINE; do \
|
||||
echo "$${MODEL}: $${LINE} does not start with an uppercase letter"; \
|
||||
done; \
|
||||
(xmllint $${MODEL} --xpath '/model/description' 2> /dev/null | wc -l | awk '{ print $$1 }' | grep -v '^1$$' || true) | while read LINE; do \
|
||||
echo "$${MODEL}: <description/> is not on a single line or missing"; \
|
||||
done; \
|
||||
done
|
||||
.endif
|
||||
.endfor
|
||||
|
|
|
|||
Loading…
Reference in a new issue