The NetBSD Project

CVS log for pkgsrc/pkgtools/pkglint/files/options_test.go

[BACK] Up to [cvs.NetBSD.org] / pkgsrc / pkgtools / pkglint / files

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.25 / (download) - annotate - [select for diffs], Fri Jul 31 22:39:36 2020 UTC (7 weeks, 2 days ago) by rillig
Branch: MAIN
CVS Tags: HEAD
Changes since 1.24: +2 -2 lines
Diff to previous 1.24 (colored)

pkgtools/pkglint: update to 20.2.5

Changes since 20.2.4:

The warning about "unknown options" has been reworded to "undocumented
options", since that is more precise and less confusing.

In pathnames and pathname patterns, the exclamation mark is allowed.
This is necessary for Go packages like devel/gopls.

Revision 1.24 / (download) - annotate - [select for diffs], Sat May 23 08:51:07 2020 UTC (3 months, 4 weeks ago) by rillig
Branch: MAIN
CVS Tags: pkgsrc-2020Q2-base, pkgsrc-2020Q2
Changes since 1.23: +11 -2 lines
Diff to previous 1.23 (colored)

pkgtools/pkglint: update to 20.1.8

Changes since 20.1.7:

There are about 300 cases where a package defines a PLIST conditional in
PLIST_VARS but none of its PLIST files actually uses that condition.
These cases get a warning.

Revision 1.23 / (download) - annotate - [select for diffs], Sun Mar 15 11:31:24 2020 UTC (6 months, 1 week ago) by rillig
Branch: MAIN
CVS Tags: pkgsrc-2020Q1-base, pkgsrc-2020Q1
Changes since 1.22: +12 -12 lines
Diff to previous 1.22 (colored)

pkgtools/pkglint: update to 19.4.11

Changes since 19.4.10:

The use of PKG_OPTIONS and PKG_BUILD_OPTIONS in buildlink3.mk and other
files is checked for common mistakes.

Checking the indentation of a continuation line no longer crashes in edge
cases.

Revision 1.22 / (download) - annotate - [select for diffs], Sun Dec 8 22:03:38 2019 UTC (9 months, 1 week ago) by rillig
Branch: MAIN
CVS Tags: pkgsrc-2019Q4-base, pkgsrc-2019Q4
Changes since 1.21: +1 -1 lines
Diff to previous 1.21 (colored)

pkgtools/pkglint: update pkglint to 19.3.15

Changes since 19.3.14:

Invalid lines in PLIST files are now reported as errors instead of
warnings. If pkglint doesn't know about it, it must be an error.

In PLIST files, all paths are validated to be canonical. That is, no
dotdot components, no absolute paths, no extra slashes, no intermediate
dot components.

Fewer notes for unexpanded variable expressions in DESCR files. Before,
the text $@ was reported as possible Makefile variable even though it
was just a Perl expression.

README files are allowed again in pkgsrc package directories. There was
no convincing argument why these should be forbidden.

A few diagnostics have been changed from NOTE to WARNING or from WARNING
to ERROR, to match their wording.

When pkglint suggests to replace :M with ==, the wording is now "can be
made" instead of "should".

Revision 1.21 / (download) - annotate - [select for diffs], Sun Dec 8 00:06:38 2019 UTC (9 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.20: +11 -3 lines
Diff to previous 1.20 (colored)

pkgtools/pkglint: update to 19.3.14

Changes since 19.3.13:

When pkglint suggests to replace !empty(VARNAME:Mfixed) with ${VARNAME}
== fixed, the exact suggested expression is now part of the diagnostic.
The check and the autofix have been improved. They now apply only to the
last modifier in the whole chain, everything else was a bug in pkglint.

Pkglint now knows the scope of variables better than before. It knows
the difference between variables from <sys.mk> like MACHINE_ARCH, which
are always in scope, and those from mk/defaults/mk.conf, which only come
into scope later, after bsd.prefs.mk has been included. It warns when
variables are used too early, for example in .if conditions.

The pathnames in ALTERNATIVES files are now checked for absolute
pathnames. This mistake doesn't happen in practice, but the code for
converting the different path types internally made it necessary to add
these checks. At least this prevents typos.

The special check for obsolete licenses has been removed since their
license files have been removed and that is checked as well.

Variables named *_AWK may be appended to.

The variables _PKG_SILENT and _PKG_DEBUG are no longer deprecated, they
are obsolete now. They are not used in main pkgsrc and pkgsrc-wip
anymore.

When a package sets a default value for a user-settable variable (which
is something that should not happen anyway), it should .include
bsd.prefs.mk before, in order to not accidentally overwrite the
user-specified value.

Variable modifiers of the form :from=to are now parsed like in bmake.
They are greedy and eat up any following colons as well. This means that
${VAR:.c=.o:Q} replaces source.c with source.o:Q, instead of quoting it.
Pkglint now warns about such cases.

The handling of relative paths in diagnostics is now consistent. All
paths that are part of a diagnostic are relative to the line that issues
the diagnostic.

Fatal errors are no longer suppressed in --autofix mode.

Plus lots of refactoring, to prevent accidental mixing of incompatible
relative paths.

Revision 1.20 / (download) - annotate - [select for diffs], Mon Dec 2 23:32:09 2019 UTC (9 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.19: +15 -16 lines
Diff to previous 1.19 (colored)

pkgtools/pkglint: update to 19.3.13

Changes since 19.3.12:

The command line option -Wspace has been removed. Warnings and notes
about whitespace are now generated by default and cannot be switched
off. This is to ensure a consistent visual appearance of the package
Makefiles.

Shell programs that are indented unnecessarily deep generate a note by
default now. Before, the option -Wall was necessary to get these notes.

The check for unintended comments in multi-line shell programs is now
enabled again. It had been disabled some time ago as byproduct of a bug
fix in the shell parser.

The check for unique buildlink3 package identifiers now also works if
pkglint is run from a package directory instead of the pkgsrc root
directory.

Revision 1.19 / (download) - annotate - [select for diffs], Sun Nov 17 01:26:25 2019 UTC (10 months ago) by rillig
Branch: MAIN
Changes since 1.18: +90 -90 lines
Diff to previous 1.18 (colored)

pkgtools/pkglint: update to 19.3.7

Changes since 19.3.6:

Improved variable value alignment.

Fixed wrong warning about comment lines that were interpreted as shell
commands before.

Warn when the first category of a package doesn't correspond to the
path in the filesystem. This affects 603 packages.

No longer warn about deprecated BUILDLINK_TRANSFORM.${OPSYS}. The
deprecation warning was meant for BUILDLINK_TRANSFORM.${pkgbase}, but
since pkglint cannot distinguish between these, the warnings were wrong.

Revision 1.18 / (download) - annotate - [select for diffs], Mon Nov 4 18:44:21 2019 UTC (10 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.17: +86 -73 lines
Diff to previous 1.17 (colored)

pkgtools/pkglint: update to 19.3.6

Changes since 19.3.5:

Improved indentation and alignment of multi-line variable assignments.

Improved indentation of multi-line shell commands.

Added warning for adding unquoted words to PKG_FAIL_REASON, which is a
list of messages, one per line.

Lines that start with tabs followed by a # are not shell commands, they
are comments. Bmake treats them in the same way.

Change the type of BROKEN to be a list of messages, instead of a single
message. This allows at least a bit of formatting in the error messages.

Revision 1.17 / (download) - annotate - [select for diffs], Sat Nov 2 16:37:48 2019 UTC (10 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.16: +213 -11 lines
Diff to previous 1.16 (colored)

pkgtools/pkglint: update to 19.3.5

Changes since 19.3.4:

Variable uses in parentheses (such as $(VAR) instead of ${VAR}) are
treated the same. The ones in parentheses had less support before.

Improved the checks for options.mk files, adding support for options
that are defined using .for loops and those referring to other
variables.

Packages that set DISTFILES to an empty list no longer require a
distinfo file.

Patches whose filename contains the word CVE may patch more than one
target file.

Revision 1.16 / (download) - annotate - [select for diffs], Fri Nov 1 19:56:53 2019 UTC (10 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.15: +98 -0 lines
Diff to previous 1.15 (colored)

pkgtools/pkglint: update to 19.3.4

Changes since 19.3.3:

In cases where the conditions for including buildlink3.mk files differ
between the package itself and its own buildlink3.mk file, explain how
to determine PKG_OPTIONS for dependencies.

Don't issue wrong warnings in options.mk files when the options are
handled in a .for loop.

Revision 1.15 / (download) - annotate - [select for diffs], Wed Aug 21 16:45:17 2019 UTC (13 months ago) by rillig
Branch: MAIN
CVS Tags: pkgsrc-2019Q3-base, pkgsrc-2019Q3
Changes since 1.14: +63 -0 lines
Diff to previous 1.14 (colored)

pkgtools/pkglint: update to 5.7.21

Changes since 5.7.20:

* PKG_OPTIONS that are handled using patterns are correctly identified.

* Simple R packages should follow the canonical variable order.

* Fixed some edge cases for aligning variable assignments.

* Improved detection of allowed values for USE_LANGUAGES.

Revision 1.14 / (download) - annotate - [select for diffs], Sun Jun 30 20:56:19 2019 UTC (14 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.13: +16 -16 lines
Diff to previous 1.13 (colored)

pkgtools/pkglint: update to 5.7.14

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.

Revision 1.13 / (download) - annotate - [select for diffs], Mon Jun 10 19:51:57 2019 UTC (15 months, 1 week ago) by rillig
Branch: MAIN
CVS Tags: pkgsrc-2019Q2-base, pkgsrc-2019Q2
Changes since 1.12: +60 -0 lines
Diff to previous 1.12 (colored)

pkgtools/pkglint: updated to 5.7.13

Changes since 5.7.12:

* Fixed a warning in the variable permissions that previously said "this
  variable should not be used at load time in this file, it would be ok
  in .", with an empty list of alternative files.

* Lots of refactoring and new tests.

Revision 1.12 / (download) - annotate - [select for diffs], Sat Apr 20 17:43:24 2019 UTC (17 months ago) by rillig
Branch: MAIN
Changes since 1.11: +31 -0 lines
Diff to previous 1.11 (colored)

pkgtools/pkglint: update to 5.7.5

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.

Revision 1.11 / (download) - annotate - [select for diffs], Thu Feb 21 22:49:03 2019 UTC (18 months, 4 weeks ago) by rillig
Branch: MAIN
CVS Tags: pkgsrc-2019Q1-base, pkgsrc-2019Q1
Changes since 1.10: +41 -0 lines
Diff to previous 1.10 (colored)

pkgtools/pkglint: update to 5.7.0

Changes since 5.6.12:

* Many of the -C and -W command line options have been removed since
  they are not used in practice. The -Wall and -Call options continue
  to work though; these are the only options mentioned in the pkgsrc
  guide.

* When a PLIST file contains redundant libtool libraries (.la and the
  corresponding .so), there is only a single warning per file.

* Warnings about the package COMMENT are now strictly ordered from left
  to right.

* The hashes for all distfiles must now contain the SHA512 hash. This
  hash has been added to many distfiles in 2015. It's time now to
  enforce it on all other distfiles as well.

* Makefile fragments that are included inside an .elif exists(...)
  are not reported as missing.

* The check for redundant variables and accidentally overwritten
  variables has been improved. Now the warning occurs at the later
  definition. This especially applies to cases where a file is included
  and after that, some of its variables are overridden. Variables in
  unrelated files are no longer marked as redundant.

* When a package contains multiple definitions of a single variable
  (typical for Makefile.common), the later definition overrides the
  earlier definition. That way, the location of DISTINFO_FILE and
  PATCHDIR is resolved correctly.

Revision 1.10 / (download) - annotate - [select for diffs], Sat Jan 26 16:31:33 2019 UTC (19 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.9: +63 -0 lines
Diff to previous 1.9 (colored)

pkgtools/pkglint: update to 5.6.12

Changes since 5.6.11:

* In buildlink3.mk files, print the paths relative
  to the line, not to the pkgsrc root.

* When explaining that a variable cannot be set/used because of wrong
  permissions, list the permissions. This provides more transparency
  than just stating that the desired action is not allowed.

* When pkglint checks a pkgsrc-wip package, don't warn about malformed
  lines in doc/CHANGES-* since pkgsrc-wip users typically cannot do
  anything about these errors.

* In profiling mode, not only the code coverage and the performance
  statistics are dumped, the whole heap is also dumped to see which
  parts of pkglint consume the most heap memory. Pkglint now needs
  less heap memory than before, which mainly affects full scans.

* The checks for absolute pathnames have gone. They were of questionable
  value since pkglint has failed to give proper advice on how to fix
  them properly, at least for the last 12 years.

* The check that pkgsrc-wip packages should only use exact CVS Ids
  (the unexpanded variant) has been disabled again. It occurred about
  16000 times but even fixing it wouldn't improve anything since it
  was mostly a formatting issue without any practical consequences.

* Warn about trailing variable modifiers like in ${VAR:S,from,to,extra}.

* Properly parse ${VAR:!command!}.

* Suggest to replace SUBST_SED with SUBST_VARS where possible, even
  with complicated shell quoting. Pkglint can autofix most of these
  overly verbose cases.

* Load builtin.mk whenever the corresponding buildlink3.mk file is
  included. This fixes several warnings about undefined variables
  (especially for packages using OpenSSL).

* Parse .for lines like bmake does since 2015, splitting words like
  in brk_string.

* Optionally show a warning even if it cannot be autofixed by pkglint.
  This is useful for the SUBST_VARS replacement since even when
  pkglint cannot automatically replace the code, there are still cases
  where it can warn at least.

* As always, several refactorings.

Revision 1.9 / (download) - annotate - [select for diffs], Sun Jan 13 19:55:53 2019 UTC (20 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.8: +20 -20 lines
Diff to previous 1.8 (colored)

pkgtools/pkglint: update to 5.6.11

Changes since 5.6.10:

* Improved the wording of several warnings

* Fixed parsing of complicated dependency patterns such as
  {ssh{,6}-[0-9]*,openssh-[0-9]*}. Pkglint still doesn't understand
  them but at least it doesn't mark them as "unknown" anymore.

* Lots of refactoring, as usual. This is the last part of the big
  refactoring, therefore future changes to pkglint are expected to be
  smaller than in the previous 3 months.

Revision 1.8 / (download) - annotate - [select for diffs], Fri Dec 21 08:05:24 2018 UTC (21 months ago) by rillig
Branch: MAIN
CVS Tags: pkgsrc-2018Q4-base, pkgsrc-2018Q4
Changes since 1.7: +6 -6 lines
Diff to previous 1.7 (colored)

pkgtools/pkglint: update to 5.6.10

Changes since 5.6.9:

* ALTERNATIVES files are correctly checked now. Before, pkglint had
  suggested to remove the @PREFIX/ from the alternative, which was
  wrong and simply didn't work.

* Diagnostics about variable assignments are ordered to report the
  left-hand side first and then everything to the right of the
  assignment operator.

* The pkglint output is escaped properly to avoid sending unwanted
  escape sequences to the terminal.

* The items in .for loops are parsed taking "double" and 'single'
  quotes into account since bmake does it in the same way since 2015.

* In DESCR files, overly long lines are only warned about if they
  contain a space and therefore can be made shorter.

* In DESCR files, text like ${PREFIX} only gets a note if it refers
  to a commonly known pkgsrc variable. This avoids distraction when
  a package mentions ${prefix}/bin or ${template.property}.

* Lots of refactorings and small changes.

Revision 1.7 / (download) - annotate - [select for diffs], Mon Dec 17 00:15:39 2018 UTC (21 months ago) by rillig
Branch: MAIN
Changes since 1.6: +17 -12 lines
Diff to previous 1.6 (colored)

pkgtools/pkglint: update to 5.6.9

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

Revision 1.6 / (download) - annotate - [select for diffs], Tue Oct 9 19:12:13 2018 UTC (23 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.5: +1 -0 lines
Diff to previous 1.5 (colored)

pkgtools/pkglint: update to 5.6.4

Changes since 5.6.3:

* Allow += for COMMENT

* Sync variable type definitions with reality

* Fix check for "used but not defined" variables. This check had been
  broken since pkgtools/pkglint/files/pkglint.pl r1.776 from 2008-10-18
  (3cd071958e63), which missed its 10-year anniversary by just 9 days.

  After fixing this check, pkglint produces about 800 new warnings
  spread all over pkgsrc, most of which are real typos.

* Detect used variables also in .if and .elif conditions. This is
  closely related to the above fix and reduces the number of "defined
  but not used" variables, while at the same time producing new warnings
  because these variables are used at load time, where some of these
  variables are not yet defined.

* Detect variables for which pkglint doesn't know the exact data type
  by scanning all files under mk/ at startup. Currently there are about
  470 of these variables. No "used but not defined" warnings are issued
  for these variables anymore.

* To speed up pkglint when checking the whole pkgsrc tree at once, the
  most often needed files are cached to reduce IO load. The checks for
  USE_TOOLS are optimized now since they were a major bottleneck.
  Together with other performance improvements this makes pkglint about
  50% faster when checking the whole pkgsrc tree including pkgsrc-wip.

Revision 1.5 / (download) - annotate - [select for diffs], Wed Oct 3 22:27:53 2018 UTC (23 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.4: +8 -4 lines
Diff to previous 1.4 (colored)

pkgtools/pkglint: Update to 5.6.3

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

Revision 1.4 / (download) - annotate - [select for diffs], Wed Sep 5 17:56:22 2018 UTC (2 years ago) by rillig
Branch: MAIN
CVS Tags: pkgsrc-2018Q3-base, pkgsrc-2018Q3
Changes since 1.3: +6 -4 lines
Diff to previous 1.3 (colored)

pkgtools/pkglint: update to 5.6.2

Changes since 5.6.1:

* Improved checks that depend on whether bsd.prefs.mk is included or
  not.

* Improved checks for tools, whether they may be used at load time
  or at run time.

* Improved tokenizer for shell commands. $| is not a variable but a
  dollar followed by a pipe.

* Warnings about SUBST context are now shown by default.

* A warning is shown when a SUBST block is declared for *-configure
  but the package has defined USE_CONFIGURE=no.

* Don't warn about USE_TOOLS:= ${USE_TOOLS:Ntool}.

* Don't warn about using the ?= operator in buildlink3.mk files before
  including bsd.prefs.mk (for some more variables, but not all).

* Report an error for packages from main pkgsrc that have a TODO or
  README file. Packages should be simple enough that they don't need
  a README file and ready for production so that they don't need a TODO.

* Lots of small bug fixes and new tests.

Revision 1.3 / (download) - annotate - [select for diffs], Thu Aug 16 20:41:42 2018 UTC (2 years, 1 month ago) by rillig
Branch: MAIN
Changes since 1.2: +2 -2 lines
Diff to previous 1.2 (colored)

pkgtools/pkglint: update to 5.6.1

Changes since 5.6.0:

* Fix output of relative paths in the diagnostics (thanks @wiz)
* Fix parsing of ${VAR:ts---}; it is now a syntax error
* Load more type definitions from mk/* instead of hard-coding them
* Lots of refactoring to improve test coverage, fixing several
  small bugs as they were found

Revision 1.2 / (download) - annotate - [select for diffs], Sun Aug 12 16:31:56 2018 UTC (2 years, 1 month ago) by rillig
Branch: MAIN
Changes since 1.1: +52 -11 lines
Diff to previous 1.1 (colored)

pkgtools/pkglint: update to 5.6.0

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.

Revision 1.1 / (download) - annotate - [select for diffs], Thu Aug 9 20:08:12 2018 UTC (2 years, 1 month ago) by rillig
Branch: MAIN

pkgtools/pkglint: Update to 5.5.16

Changes since 5.5.15:

* Add checks for options.mk files

* Treat redundant variable definitions as notes, not as warnings

* Check doc/CHANGES-* for typos in the dates (only for 2018 and later)

* Lots of cleanup in the test code

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>