app: Add a "check-for-deprecated-procedures-in-script-fu" make target
Add a "check-for-deprecated-procedures-in-script-fu" make target that looks for usage of deprecated procedures in *.scm files. We currently use quite a bit of deprecated procedures. When we don't do that anymore, we should connect this to make check somehow so our nightly build fails if someone deprecated a procedures without also porting all clients. Run it like this from the source root: make -C plug-ins/script-fu check-for-deprecated-procedures-in-script-fu
This commit is contained in:
1
NEWS
1
NEWS
@ -49,6 +49,7 @@ Plug-ins:
|
||||
- Use poppler's cairo API to load PDFs, the pixbuf API is removed
|
||||
- Port screenshot from GdkPixbuf to cairo
|
||||
- Fix the annoying parser build warnings in imagemap
|
||||
- Add a check-for-deprecated-procedures-in-script-fu make target
|
||||
- PNG?
|
||||
|
||||
Data:
|
||||
|
@ -81,3 +81,18 @@ LDADD = \
|
||||
$(RT_LIBS) \
|
||||
$(INTLLIBS) \
|
||||
$(script_fu_RC)
|
||||
|
||||
|
||||
# Perform static analysis on all *.scm files and look for usage of
|
||||
# deprecated pdb procedures
|
||||
check-for-deprecated-procedures-in-script-fu:
|
||||
@echo "Looking for deprecated procedures in *.scm files"
|
||||
@scm_files=`find $(top_srcdir)/plug-ins/script-fu -name "*.scm"`; \
|
||||
deprecated_procs=`$(top_builddir)/app/gimp-$(GIMP_APP_VERSION)$(EXEEXT) --dump-pdb-procedures-deprecated`; \
|
||||
for scm_file in $$scm_files; do \
|
||||
for proc in $$deprecated_procs; do \
|
||||
if grep -qw $$proc $$scm_file; then \
|
||||
echo "$${scm_file} uses deprecated procedure '$${proc}'"; \
|
||||
fi \
|
||||
done \
|
||||
done
|
||||
|
Reference in New Issue
Block a user