buildsys: add lint incremental mode, use stricter check mode for full build

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2020-11-12 10:10:19 +01:00
parent a19ccbb9cd
commit 2622cc7cca
2 changed files with 7 additions and 3 deletions

2
debian/control vendored
View File

@ -3,7 +3,7 @@ Section: web
Priority: optional Priority: optional
Maintainer: Proxmox Support Team <support@proxmox.com> Maintainer: Proxmox Support Team <support@proxmox.com>
Build-Depends: debhelper (>= 10~), Build-Depends: debhelper (>= 10~),
pve-eslint, pve-eslint (>= 7.12.1-1),
Standards-Version: 3.9.8 Standards-Version: 3.9.8
Homepage: http://www.proxmox.com Homepage: http://www.proxmox.com

View File

@ -65,12 +65,16 @@ JSSRC= \
all: ${SUBDIRS} all: ${SUBDIRS}
set -e && for i in ${SUBDIRS}; do ${MAKE} -C $$i; done set -e && for i in ${SUBDIRS}; do ${MAKE} -C $$i; done
.lint-incremental: ${JSSRC}
eslint $?
touch "$@"
.PHONY: lint .PHONY: lint
check: lint check: lint
lint: ${JSSRC} lint: ${JSSRC}
eslint ${JSSRC} eslint --strict ${JSSRC}
proxmoxlib.js: ${JSSRC} proxmoxlib.js: .lint-incremental ${JSSRC}
# add the version as comment in the file # add the version as comment in the file
echo "// ${DEB_VERSION_UPSTREAM_REVISION}" > $@.tmp echo "// ${DEB_VERSION_UPSTREAM_REVISION}" > $@.tmp
cat ${JSSRC} >> $@.tmp cat ${JSSRC} >> $@.tmp