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; + } + } +} +