Commit graph

716 commits

Author SHA1 Message Date
rillig
b3bf02bf7d - The simplification from the last commit was wrong, but those statements
that could have revealed the defect had been commented out. Now they
  can be enabled with -Wspace.
- The state traces are only shown in -dvv mode.
2006-02-19 21:28:35 +00:00
rillig
4725cccab1 - Simplified checking for the RCS Id in the first line of patches. 2006-02-19 16:28:19 +00:00
rillig
e38045fe24 - Completely rewrote the parser for patch files. The new parser can parse
context diffs as well as unified diffs and report much better warnings.
  However, most of the warnings are currently disabled, as they are just
  too many. It cannot parse ed diffs, but produces warnings for them.
2006-02-19 15:28:51 +00:00
rillig
5d63c24400 - Installing documentation to share/doc/html is deprecated. By default, no
warnings are shown for this, as this would produce more than 20000 new
  warnings for the current pkgsrc tree. You need to specify -Wplist-depr
  (new) to see them. Of course, -Wall will work, too.
- Updated the documentation and cleaned it up.
2006-02-18 16:12:13 +00:00
rillig
a2c6d5669d Added EGDIR. 2006-02-18 16:07:16 +00:00
rillig
9acc9f8765 - The checkline_mk_vartype_basic routine needs to know whether the value
it is checking is used in list context or in scalar context -- just
  like in Perl.
- The :Q operator should only be used in list context or in shell commands.
2006-02-18 14:48:58 +00:00
rillig
7d1e2473fc - Disabled the warning that all substiution commands should be enclosed in
quotes. -- I've changed my mind.
2006-02-18 14:18:44 +00:00
rillig
f45271995b Distinguish between Pathnames and Pathlists. The latter are lists of
pathnames, separated by a colon.
2006-02-18 14:13:32 +00:00
rillig
1e0ff5355b Added some variables. 2006-02-18 14:12:49 +00:00
rillig
202bfbc702 - Guess the data type of *PATH variables to be Pathname, of *PATHS to be
List of Pathname.
2006-02-18 11:39:46 +00:00
rillig
84273c8d65 The use of DOWNLOADED_DISTFILE is deprecated because there is no way of
quoting it correctly. The shell variable extract_file should be used
instead.
2006-02-17 20:00:35 +00:00
rillig
720557d02a - Be stricter when checking whether a shell word consists of exactly one
variable or not.
2006-02-17 18:35:34 +00:00
rillig
d2042883eb - Text alignment with spaces is changed to tabs if the --autofix option is
selected and the alignment can be done solely with tabs, that is, the
  alignment leads to a column that is a multiple of 8.
2006-02-17 15:26:01 +00:00
rillig
b1d9c90ec8 - Allow the values -c99 for CFLAGS and -static for LDFLAGS. 2006-02-16 06:33:41 +00:00
rillig
8a81797d91 Added XMKMF_FLAGS. 2006-02-16 06:33:00 +00:00
rillig
dd5b0a6024 - Marked the latest :Q warning as experimental. It currently suggests to
quote even ${CC} and ${CXX}, which is wrong. The warning is not
  printed for the other TOOLS, but that is only because the tool
  variables have not been assigned proper types.
- Reduced the number of negations in a condition.
2006-02-15 17:00:02 +00:00
rillig
0602771898 - Some more typed variables.
- Variables that are not of type "List of something" should be quoted when
  used in shell programs.
- In mail addresses, a "+" is allowed.
2006-02-15 16:10:49 +00:00
rillig
65be8f1f71 - Added some more variables and a new data type, LdFlags. 2006-02-15 11:41:01 +00:00
rillig
23628caa49 Added some more variables. 2006-02-14 22:57:18 +00:00
rillig
5099a17e5d - Added experimental support for detecting defined, but unused variables.
The main task is now to filter out the false positives (that is, all
  system-defined variables) and add them to makevars.map.
2006-02-14 22:03:19 +00:00
rillig
055eed4044 Oops. The last change modified the behavior of an if-then-elsif chain in a
way that I didn't intend. Fixed.
2006-02-13 17:50:40 +00:00
rillig
b61c6ea237 - Including "options.mk" does not qualify to using common Makefiles, which
would suppress the variable order checking.
- Added an additional debugging statement to the variable ordering.
2006-02-13 15:37:49 +00:00
rillig
cf3ce2644e - Even if the type of a variable is guessed based on its name, report it
as untyped when in --debug mode. This allows the --debug mode to be used
  for detecting spelling mistakes.
2006-02-13 15:20:22 +00:00
rillig
860a0bd4e3 Correctly handle Python and Ruby prefixes in binary package names. Patch
provided by YOMURA Masanori in private mail.
2006-02-12 18:35:59 +00:00
rillig
fec6a92aae - ${COMPILER_RPATH_FLAG} should be used instead of the various -Wl,...
flags.
- [Brackets] are allowed in pathname masks.
2006-02-12 12:10:13 +00:00
rillig
3575f7b1eb - Changed the wording of the warning message for misquoted variables. The
wording had been completely mysterious. Now it gives a direct advise on
  how to fix the problem.
2006-02-11 20:58:08 +00:00
rillig
d78a085b17 - Removed duplicate definition for LIB_DEPENDS. 2006-02-11 19:49:58 +00:00
rillig
9021008619 - MANDIR is deprecated. Use PREFIX/PKGMANDIR instead. 2006-02-11 19:29:39 +00:00
rillig
e5d84f7208 - Added a backtrace() subroutine that prints a backtrace when debugging
mode and very verbose mode are activated. Currently unused, but it's
  handy to have it defined.
- Removed two subroutine calls that had resulted in duplicate warnings.
- Variables whose names end in _VAR may appear inside double quotes.
2006-02-11 16:14:40 +00:00
rillig
1c9ae5d76c - Added TOOLS_DEPMETHOD. 2006-02-11 16:12:26 +00:00
rillig
7135541b60 - Absolute pathnames are interpreted as such when pkglint checks whether
the file exists or not.
2006-02-11 12:47:05 +00:00
rillig
8ec9cc0783 - Recognize "set -e" even when it is hidden by other options, like
"set -eu".
2006-02-11 11:55:19 +00:00
rillig
9bcca64f85 - PKGNAME may appear in double quoted shell strings. 2006-02-11 11:53:21 +00:00
rillig
139bcdc38c - Don't warn if shell variables appear unquoted in ``for'' loops. 2006-02-10 12:49:22 +00:00
rillig
acca5866d1 - New error: The Solaris /bin/sh cannot handle "cd" inside conditionals. 2006-02-07 22:10:20 +00:00
rillig
e661eea073 - ../../pkgtools/x11-links/buildlink3.mk must not be included directly. 2006-02-07 21:44:39 +00:00
rillig
886c0440a6 - The diagnostics are filtered through strxvis(), so that pkglint is able
to check and report warnings even in files of random contents without
  emitting any terminal control sequences.
2006-02-07 09:49:09 +00:00
rillig
675546c4b7 - Not only check for the definition of deprecated variables, but also for
using them.
- The :Q operator should not be used in double quotes.
2006-02-07 09:20:17 +00:00
rillig
5fab31e375 - Reworded two occurrences of "unportable". They sounded too harsh. 2006-02-06 10:07:23 +00:00
rillig
f017b5590f - Don't emit an extra warning if a tool should be added to USE_TOOLS. Just
append it to the previous line.
2006-02-06 09:46:42 +00:00
rillig
e47296e901 Readded almost all variables that had been here in the past. We cannot
force the developers to learn all pkgsrc changes every three months, so
it's better to keep the warnings for a much longer time. I don't know
yet what "much longer" exactly means.
2006-02-05 00:05:39 +00:00
rillig
abd8089cf7 - Some tools that are often used as ${TOOLNAME} need to be explicitly
added to the USE_TOOLS variable. When complaning about their direct
  use, add a proper advice.
2006-02-04 03:37:08 +00:00
rillig
05451e4af6 - bsd.prefs.mk does not need to be included before BUILDLINK_DEPMETHOD gets
assigned using the "?=" operator, since these variables are not meant to
  be set by the user.
- Restricted the files that are checked for absolute pathnames in patch
  files.
2006-02-02 20:50:02 +00:00
rillig
75562fa202 - Added a hack to be able to parse nested make(1) variables like
${TOOL.${t}}. They just extend up to, but not including the next space or
  quote character.
- log_debug() is used for printing debugging info, not log_error().
- Even if NO_CHECKSUM is set, distinfo files may exist if the package has
  patches. Noted by salo.
2006-01-30 01:26:04 +00:00
rillig
16bdee598a - Variables whose name end in DIR, DIRS, FILE, FILES, as well as PATH,
PREFIX, LOCALBASE and PKGNAME may appear in single quotes.
2006-01-29 01:29:38 +00:00
rillig
c99dd61732 - PkgLint::String::substring accepts an undefined second argument.
- Added PkgLint::String::match_all.
- Make(1) variables of the form $(...) are detected properly.
- The shellword parser's state is printed in --debug mode.
- In double quoted strings, normal text is processed faster.
- The proof of concept for match_all is done with finding absolute
  pathnames in patch files.
2006-01-28 12:24:20 +00:00
rillig
6282c39496 - Added a comment above get_regex_plurals, explaining what it does. 2006-01-28 11:19:07 +00:00
rillig
20511917c5 - Added PkgLint::Util::min and PkgLint::Util::max.
- Rewrote PkgLint::String::substring to make it look less like a Brainf***
  program. I guess this will greatly improve execution speed.
2006-01-28 11:18:17 +00:00
rillig
6af5ebf4c7 - Removed PkgLint::Util::match.
- Added PkgLint::Match, which represents the result of matching a regular
  expression against a PkgLint::String.
- Fixed the arguments to substr in PkgLint::String::substring.
- Added PkgLint::String::match.
- Added a proof of concept in checkfile_patch, in the warning about RCS
  tags. Run pkglint -s --klickibunti to see it.
2006-01-28 11:11:49 +00:00
rillig
0d54162e3d - Found the one variable that slipped through when renaming $file to
$fname.
2006-01-27 02:25:52 +00:00