From 4b8c8d5469c260fe2c4bdd6a9724ef142c2264d4 Mon Sep 17 00:00:00 2001 From: David Schleef Date: Sun, 7 Nov 2004 20:50:10 +0000 Subject: [PATCH] testsuite/gst-lint: Check for pad templates that aren't statically scoped. Original commit message from CVS: * testsuite/gst-lint: Check for pad templates that aren't statically scoped. --- ChangeLog | 5 +++++ tests/old/testsuite/gst-lint | 15 +++++++++++++++ testsuite/gst-lint | 15 +++++++++++++++ 3 files changed, 35 insertions(+) diff --git a/ChangeLog b/ChangeLog index 5d1de3810a..0cb60c9574 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-11-07 David Schleef + + * testsuite/gst-lint: Check for pad templates that aren't statically + scoped. + 2004-11-07 Ronald S. Bultje * configure.ac: diff --git a/tests/old/testsuite/gst-lint b/tests/old/testsuite/gst-lint index 19bdc8d37d..4b99a1da96 100755 --- a/tests/old/testsuite/gst-lint +++ b/tests/old/testsuite/gst-lint @@ -47,6 +47,7 @@ sub check_typo(); sub check_explicit_caps(); sub check_signals(); sub check_gettext(); +sub check_padtemplate(); sub m_check_plugindir(); sub m_check_interfaces(); @@ -76,6 +77,7 @@ foreach $filename () { check_explicit_caps(); check_signals(); check_gettext(); + check_padtemplate(); # less important stuff check_license(); @@ -539,3 +541,16 @@ sub check_gettext() } } +# +# Check that pad templates are statically scoped +# +sub check_padtemplate() +{ + foreach $line (@lines){ + if ($line =~ /GstStaticPadTemplate/ && !($line =~ /static/)) { + print "W: pad template definitions should be static\n" + return; + } + } +} + diff --git a/testsuite/gst-lint b/testsuite/gst-lint index 19bdc8d37d..4b99a1da96 100755 --- a/testsuite/gst-lint +++ b/testsuite/gst-lint @@ -47,6 +47,7 @@ sub check_typo(); sub check_explicit_caps(); sub check_signals(); sub check_gettext(); +sub check_padtemplate(); sub m_check_plugindir(); sub m_check_interfaces(); @@ -76,6 +77,7 @@ foreach $filename () { check_explicit_caps(); check_signals(); check_gettext(); + check_padtemplate(); # less important stuff check_license(); @@ -539,3 +541,16 @@ sub check_gettext() } } +# +# Check that pad templates are statically scoped +# +sub check_padtemplate() +{ + foreach $line (@lines){ + if ($line =~ /GstStaticPadTemplate/ && !($line =~ /static/)) { + print "W: pad template definitions should be static\n" + return; + } + } +} +