mirror of
https://github.com/opnsense/core.git
synced 2026-05-28 04:34:51 -04:00
make: add a lint pass for CSVListField without a Mask
Eventually these fields should all die and if not at least all use a mask with mask-per-item set to reduce complexity.
This commit is contained in:
parent
fafe519ded
commit
846450f9c4
1 changed files with 3 additions and 0 deletions
|
|
@ -81,6 +81,9 @@ lint-model:
|
|||
(xmllint $${MODEL} --xpath '//*[@type="CSVListField" and Mask and (not(MaskPerItem) or MaskPerItem=N)]' 2> /dev/null | grep '^<' || true) | while read LINE; do \
|
||||
echo "$${MODEL}: $${LINE} uses Mask regex with MaskPerItem=N"; \
|
||||
done; \
|
||||
(xmllint $${MODEL} --xpath '//*[@type="CSVListField" and not(Mask)]' 2> /dev/null | grep '^<' || true) | while read LINE; do \
|
||||
echo "$${MODEL}: $${LINE} does not specify a Mask regex"; \
|
||||
done; \
|
||||
for TYPE in .\\AliasesField .\\DomainIPField HostnameField IPPortField NetworkField MacAddressField .\\RangeAddressField; do \
|
||||
(xmllint $${MODEL} --xpath '//*[@type="'$${TYPE}'" and FieldSeparator=","]' 2> /dev/null | grep '^<' || true) | while read LINE; do \
|
||||
echo "$${MODEL}: $${LINE} FieldSeparator=, is the default"; \
|
||||
|
|
|
|||
Loading…
Reference in a new issue