Felix Lechner pushed to branch master at lintian / lintian
Commits:
dccf2351 by Felix Lechner at 2019-10-14T03:35:18Z
Remove unused import.
Gbp-Dch: ignore
- - - - -
104baa6a by Felix Lechner at 2019-10-14T03:35:28Z
In test runner, use [% and %] as delimiters for Text::Template.
The standard delimiter setting in Text::Template is curly braces. They
have several disadvantages. Changes the configuration of the module in
tests (but not in reports) to [% and %].
The new setting is the default for Template::Toolkit, which we may use
in the future. For now, we continue to use Text::Template.
The biggest disadvantage of the curly braces is that variables in
Debian control files, such as ${misc:Depends}, must be escaped. The
resulting backslashes are cumbersome, visually unattractive, and error
prone.
Another disadvantage may be speed, although probably not paramount for
our application. The module's author wrote:
"Because the parsing of templates is simplified by the absence of
backslash escapes, using alternative DELIMITERS may speed up the
parsing process by 20-25%. This shows that my original choice of
{ and } was very bad."
This sets the programmatic delimiters for template substitutions in
the test runner. Subsequent commits will actually change the
templates.
The reporting framework also uses Text::Template but is not affected.
- - - - -
dcc08fdc by Felix Lechner at 2019-10-14T03:36:53Z
In defaults, use [% and %] as delimiters for Text::Template.
The standard delimiter setting in Text::Template is curly braces. They
have several disadvantages. Changes the delimiter in the defaults for
the test suite to [% and %].
The new setting is the default for Template::Toolkit, which we may use
in the future. For now, we continue to use Text::Template.
The biggest disadvantage of the curly braces is that variables in
Debian control files, such as ${misc:Depends}, must be escaped. The
resulting backslashes are cumbersome, visually unattractive, and error
prone.
Another disadvantage may be speed, although probably not paramount for
our application. The module's author wrote:
"Because the parsing of templates is simplified by the absence of
backslash escapes, using alternative DELIMITERS may speed up the
parsing process by 20-25%. This shows that my original choice of
{ and } was very bad."
This replaces the delimiters for template substitutions in the
defaults for the test suite.
Gbp-Dch: ignore
- - - - -
02c23f0d by Felix Lechner at 2019-10-14T03:38:11Z
In templates, use [% and %] as delimiters for Text::Template.
The standard delimiter setting in Text::Template is curly braces. They
have several disadvantages. Changes the delimiters in templates used
in the test suite.
The new setting is the default for Template::Toolkit, which we may use
in the future. For now, we continue to use Text::Template.
The biggest disadvantage of the curly braces is that variables in
Debian control files, such as ${misc:Depends}, must be escaped. The
resulting backslashes are cumbersome, visually unattractive, and error
prone.
Another disadvantage may be speed, although probably not paramount for
our application. The module's author wrote:
"Because the parsing of templates is simplified by the absence of
backslash escapes, using alternative DELIMITERS may speed up the
parsing process by 20-25%. This shows that my original choice of
{ and } was very bad."
This replaces the delimiters for template substitutions in the
templates for the test framework.
Gbp-Dch: ignore
- - - - -
377f1606 by Felix Lechner at 2019-10-14T03:40:13Z
In templates, remove the escaping backslashes before curly braces.
The escape characters are no longer needed. We now use [% and %] as
delimiters for template substitutions in the test suite.
Gbp-Dch: ignore
- - - - -
d971f5e6 by Felix Lechner at 2019-10-14T03:40:28Z
In tests, use [% and %] as delimiters for Text::Template.
The standard delimiter setting in Text::Template is curly braces. They
have several disadvantages. Changes the delimiters in all test
specifications.
The new setting is the default for Template::Toolkit, which we may use
in the future. For now, we continue to use Text::Template.
The biggest disadvantage of the curly braces is that variables in
Debian control files, such as ${misc:Depends}, must be escaped. The
resulting backslashes are cumbersome, visually unattractive, and error
prone.
Another disadvantage may be speed, although probably not paramount for
our application. The module's author wrote:
"Because the parsing of templates is simplified by the absence of
backslash escapes, using alternative DELIMITERS may speed up the
parsing process by 20-25%. This shows that my original choice of
{ and } was very bad."
This replaces the delimiters for template substitutions in Lintian's
test specifications.
The reporting framework also uses Text::Template but is not affected.
- - - - -
f1b0d6c0 by Felix Lechner at 2019-10-14T03:40:33Z
In tests, remove the escaping backslashes before curly braces.
The escape characters are no longer needed. We now use [% and %] as
delimiters for template substitutions in the test suite.
- - - - -
30 changed files:
- lib/Test/Lintian/Hooks.pm
- lib/Test/Lintian/Prepare.pm
- lib/Test/Lintian/Templates.pm
- t/defaults/desc
- t/tags/checks/apache2/apache2-modules-general/debian/control.in
- t/tags/checks/apache2/apache2-webapplications-general/debian/control.in
-
t/tags/checks/application-not-library/application-not-library/debian/control.in
-
t/tags/checks/binaries/binaries-development-package-ships-elf-binary-in-path/debian/control.in
- t/tags/checks/binaries/binaries-doesnt-match-sonames/debian/control.in
- t/tags/checks/binaries/binaries-missing-depends-on-libc/debian/control.in
- t/tags/checks/binaries/binaries-missing-depends/debian/control.in
- t/tags/checks/binaries/binaries-missing-lfs/debian/control.in
- t/tags/checks/binaries/binaries-multiarch-same/debian/control.in
- t/tags/checks/binaries/binaries-static-lib/debian/control.in
- t/tags/checks/binaries/legacy-binary/debian/changelog.in
- t/tags/checks/binaries/legacy-debug/debian/changelog.in
- t/tags/checks/binaries/legacy-libbaz/debian/changelog.in
- t/tags/checks/changes-file/changed-by-localhost/test.changes.in
- t/tags/checks/changes-file/changed-by-malformed/test.changes.in
- t/tags/checks/changes-file/changed-by-no-name/test.changes.in
- t/tags/checks/changes-file/changed-by-root-email/test.changes.in
- t/tags/checks/changes-file/changed-by-root/test.changes.in
- t/tags/checks/changes-file/changelog-file-backport/debian/changelog.in
- t/tags/checks/changes-file/changelog-file-stable/debian/changelog.in
- t/tags/checks/changes-file/changes-bad-ubuntu-distribution/test.changes.in
- t/tags/checks/changes-file/changes-directory-traversal/test.changes.in
- t/tags/checks/changes-file/changes-distribution-mismatch/test.changes.in
- t/tags/checks/changes-file/changes-experimental-mismatch/test.changes.in
- t/tags/checks/changes-file/changes-file-bad-section/test.changes.in
- t/tags/checks/changes-file/changes-file-size-checksum-mismatch/test.changes.in
The diff was not included because it is too large.
View it on GitLab:
https://salsa.debian.org/lintian/lintian/compare/33508343d8fde77a3d5db22863ff358dbf7a915f...f1b0d6c0c92b7d337395839549f20bed07ee7803
--
View it on GitLab:
https://salsa.debian.org/lintian/lintian/compare/33508343d8fde77a3d5db22863ff358dbf7a915f...f1b0d6c0c92b7d337395839549f20bed07ee7803
You're receiving this email because of your account on salsa.debian.org.