CFLAGS=${CFLAGS}, check for the correct modifiers. The above is
obviously not correct, as CFLAGS may contain white-space.
CFLAGS=${CFLAGS:Q} is also a little wrong in that it may contain leading
and/or trailing white-space, which must be discarded, too, because the
broken GNU configure scripts cannot handle them correctly. This can be
done using ${CFLAGS:M*:Q}, which first splits CFLAGS into a list of
shell words, then selects all of them and finally combines the words
forming a nicely formatted string without leading and trailing
white-space where all entries are separated from each other by a single
space.
- Added a new type ShellWord that is used for MAKE_ENV and the like to
check for invalid FOO="${VALUE}" additions. They really should be
FOO=${VALUE:Q}, as they may already contain embedded quotes. This is
especially important for CPPFLAGS and CFLAGS.
- Fixed perl -T warnings:
- Replaced $#{@{$lines}} with $#{$lines}.
- Avoided calls to external programs (sed and digest).
- Removed redundant warning if DISTNAME is set to an invalid package name
and PKGNAME is not defined.
- Changed dependency from pkgtools/digest to security/p5-Digest-SHA1.
Changes since 4.43:
- Removed the remaining code that had been imported from FreeBSD's
portlint.
- Removed the (undocumented) -Wvague option.
- Removed the -Wexec and -Wparen options. The latter had no effect at all,
and the former cannot lead to false positives, so it is always enabled.
- Variable names starting with an underscore are reserved for internal
pkgsrc use.
- Added some more type checks.
- Renamed the type Dependency to DependencyWithPath.
- Added new types Dependency, PlatformTuple and RelativePkgDir.
- Added some of the common variables to the list of typed variables.
Changes since 4.42:
- Reduced the number of duplicate diagnostics when checking multiple files.
Only diagnostics concerning the current package are printed.
- Added checks for EXTRACT_SUFX and PKG_INSTALLATION_TYPES.
- Added a work-around for the PHP patches warnings.
- PERL5_PACKLIST should not contain references to other variables.
- Added the -s|--source command line option to show the code along with the
diagnostics.
- Fixed a bug in get_logical_line(); logical lines have not had their
physical lines attached.
- Deprecated variables are not only checked when they are defined but also
when they are used.
- Added a check that PERL5_PACKLIST does not contain references to other
variables. Some packages have ${PERL5_SITEARCH} in it, which results in
a double slash, and the CHECK_FILES framework cannot handle this.
in the $all_lines parameter, but the whole text of the included files in
the $whole parameter.
This change avoids duplicate diagnostics for *.mk and Makefile* in the
package directory. A side effect is that package authors only get the
diagnostics they can probably fix, as diagnostics from included files are
not given.
Changes since 4.41:
- In .mk files, line continuations are properly handled.
- An open bracket is allowed in variable and tool names.
- Added checks for ALTERNATIVES and INSTALL/DEINSTALL files.
- By default, don't check files in ${FILESDIR}.
- Warn about unknown file and directory names.
- Documented the --recursive option.
- Added an option -Cmk for checking .mk files besides buildlink3.mk.
- pkglint can handle individual files on the command line, not only
packages. (experimental)
- Replaced checkfile_buildlink3_mk() with checkfile_mk().
- Factored out the checkfile() subroutine from checkdir_package().
- Removed all references to the build-time pkgsrc directory, ${PKGSRCDIR}.
This makes the binary package independent of the build location.
Fixes PR 32006.
Changes since 4.38:
- Disabled the check on Makefile variable order, as the discussion on
tech-pkg has not finished yet.
- Improved detection of valid tool names.
- Improved detection of direct use of tool names. (Less false positives.)
- Improved the diagnostics for direct use of tool names.
pkgsrc/mk/defaults/mk.conf. All those variable names are then checked as
being of type Userdefined. As that file is currently too unstructured
and contains too much garbage, this check cannot yet be enabled.
- pkglint(1) does not use the hard-coded PKGSRCDIR anymore.
This fix is related to PR 32006, but doesn't fix it, since the PR is
about lintpkgsrc(1), not pkglint(1).
- It is an error if packages define a variable whose name starts with an
underscore.
- Removed the (vague) "wip" check, as it has been replaced by special checks for
DEPENDS and .include directives.
- Disabled the check for variable ordering until the discussion on tech-pkg
has led to any results.
- PKGNAME is checked for being a valid package name.
- PLIST files should not contain filenames that match */CVS/*.
- Completely rewrote the check for variable ordering. The new code
operates on a data structure that's easily understandable and
extendable (see the source for an example). It also generates greatly
improved diagnostics. As the old code had been enabled only when
checking with -Wvague or -Wall, it has been seldom used anyway.
- Removed the hard-coded values for valid tool names.
The detection is good enough.
- Make sure that the domain part NetBSD.org is written like this
in mail addresses.