Changes since 19.4.0:
The notes for inserting an empty line have been changed from "insert
after this line" to "insert before this line" to make the line numbers
in the diagnostics contiguous. There had been several places where the
diagnostics went from line 1 to line 2 and then back to line 1, which
was confusing.
The lines in ALTERNATIVES files are checked for trailing whitespace.
This is only for consistency with the other checks. In the whole pkgsrc
tree all ALTERNATIVES files are already fine.
The diagnostics for comments in .endif/.endfor lines that don't
correspond to their .if/.elif/.for counterparts now includes the exact
line number of the corresponding condition, to make the warning easier
to fix.
The diagnostics for wrong variable value alignment now mention the
current column in addition to the desired column, to make it easier to
see by how much and in which direction the indentation should be fixed.
Variables that are used in conditions before they are actually defined
need the :U modifier.
Changes since 19.3.10:
The check for buildlink3.mk files that are included conditionally in one
place and unconditionally in another place have been refined. Now they
also work in cases that do not involve any variables, such as when the
condition is a mere exists(filename).
References to variables that use parentheses instead of the usual braces
produce a warning now, even if pkglint cannot fix them automatically.
This affects only a few instances where more than one such variable
reference appeared in a single line.
The --log-verbose command line option has been removed since it does not
have any practical use other than improving the performance during
pkglint development itself. Because of that it hadn't even been
mentioned in the manual page.
Warnings for missing license files now report the path to the license
file relative to the line where the warning occurs, like everywhere
else.
Changes since 5.7.15:
* Completely rewrote the code for aligning multiple variable assignment
lines. It works on the actual lines of the file now instead of the
parsed lines. This provides more exact diagnostics and also makes the
handling of these lines easier so that future requirements can be
implemented more easily.
* Added support for exotic conditions in .if clauses. These conditions
are not seen in the wild though.
* Fixed wrong diagnostics for ALTERNATIVES files that appear
conditionally in the PLIST.
* As always: lots of refactorings and newly added tests.
Changes since 5.7.13:
- Removed the -Cextra command line option since it didn't produce useful
warnings.
- Removed unwarranted warnings about _WRAP_EXTRA_ARGS.CC being used in
packages.
- Cleaned up the canonical order of variables in package Makefiles.
- Added a few commands to those that cannot fail, to reduce the number of
"at the left of the | operator" in shell programs.
- Fixed warnings about "-ggdb" being an unknown shell command.
- Reduced number of warnings about lists being used where a single value
is expected.
- Replaced unreliable check for invalid CFLAGS and LDFLAGS with a more
practical check.
- Renamed "RCS tag" to "CVS tag" to make the diagnostics more modern.
- Added warning when PKGNAME or PKGVERSION is used in MASTER_SITES.
- Reworded warning for missing or superfluous PLIST files.
- Lots of other detail changes, refactorings and automatic tests.
Changes since 5.7.4:
* Warn about invalid variable uses in directives like
.if and .for
* Do not warn when a package-settable variable is assigned using the ?=
operator before including bsd.prefs.mk. This warning only makes sense
for user-settable and system-provided variables.
* The parser for variable uses like ${VAR:@v@${v:Q}} is more robust now,
which reduces the number of parse errors and leads to more appropriate
diagnostics, in cases like ${URL:Mftp://*}, which should really be
${URL:Mftp\://*}.
* The valid values for OPSYS are now determined by the files in
mk/platform instead of allowing arbitrary identifiers. This catches a
few instances where "Solaris" is used instead of the correct "SunOS".
* Setting USE_LANGUAGES only has an effect if mk/compiler.mk has not yet
been included. In all other cases, pkglint warns now.
* Missing entries in doc/CHANGES produce a note now. This will lead to
more accurate statistics for the release notes.
Changes since 5.6.8:
* In addition to the pkglint binary, the whole pkglint code is installed as
a library, so that other packages can use the code for doing their own
checks on pkgsrc packages, Makefiles, shell programs, or the other file
types from pkgsrc.
* BUILDLINK_*.* may be used in all files.
* Lots of refactorings
Changes since 5.6.6:
User-defined variables that are not yet added to BUILD_DEFS are only
reported once per file.
Unnecessary space after variable names is only worth a note instead of
a warning. Example:
MASTER_SITES = https://cdn.example.org/
All variable names that are defined in the pkgsrc infrastructure are
assumed to be available to the package Makefiles. This reduces the
number of wrong "used but not defined" warnings, at the expense of
Variable names that are used in other variable names are checked
whether they are defined somewhere. Example:
CFLAGS+= ${CFLAGS.${PARAM}} # PARAM is now checked
In SUBST_SED, when the pattern is s,@VAR@,${VAR}, or a slight variant
thereof, pkglint suggests to define SUBST_VARS instead, which frees the
package author from thinking about how to escape special characters and
is generally easier to read. Example:
SUBST_SED.class= s,@VAR@,${VAR:Q},
SUBST_VARS.class= VAR
Directives like .if !defined(...) are now handled the same whether or
not there is a space after before the (...).
The check for locally modified files now works independently of the
timezone.
As always, lots of refactorings have happened under the hood. Many small
bugs have been discovered and fixed accordingly.
Changes since 5.6.2:
* Add check for version patterns 1.5*, which should rather be 1.5.*
* Re-enable check for "set -e" and commands that may silently fail
because of missing error checking
* Lots of internal clean-up and tests
Changes since 5.5.16:
* Check for negated shell commands (if ! test -z "foo"); they are not
supported by Solaris.
* Don't check variable permissions for infrastructure files. A warning
like "may not be set by any package" doesn't make sense for them.
* Check that PLIST_VARS matches PLIST.*, which is especially useful in
options.mk files.
* Improve checks for options.mk files (for PKG_OPTIONS_SET).
* Prefer options handling with !empty() over checking empty() first.
* Prefer ${MACHINE_ARCH} == i386 over !empty(MACHINE_ARCH:Mi386), for
single-valued variables.
Changes since 5.5.1:
* Fixed command line parsing for the --only option.
* Improved alignment of variable values in Makefiles.
* Code cleanup: better abstraction in the tests.
Changes since 5.4.2:
* Variables like ${VAR_${OTHER_VAR}} are no longer checked for
use/define mismatch
* The check for plural variable names has been removed
* The type of variables called *DESTDIR is no longer guessed to be a
directory name
* The check for unknown shell commands is disabled in Makefile
sections that depend on OPSYS
* The experimental hand-written shell parser has been replaced with
a Yacc-generated one
* Meta packages don't need a LICENSE
* When PKGNAME is defined in terms of ${DISTNAME:S/from/to/:tl}, more
modifiers (like :tl) are handled properly
* When the MAINTAINER or OWNER of a package is not the current user,
a warning is printed for modified files
* The check for share/applications/*.desktop has been disabled, since
pkglint would need to inspect the file's actual contents to see
whether desktopdb.mk must be included or not
* SUBST_CLASSES may also be SUBST_CLASSES.NetBSD
* Loosened the usage restrictions for several variables, e.g. many
variables that may be appended in a Makefile may also be set
unconditionally
* PKG_OPTIONS_VAR must be of the form PKG_OPTIONS.*