Commit graph

710 commits

Author SHA1 Message Date
rillig
8005613009 - It is not an error to have symlinks in pkgsrc -- just a warning. Any
directory entry besides regular files, directories and symlinks is still
  an error.
2006-01-06 13:42:47 +00:00
joerg
a485b489e3 Ask for warnings so that e.g. CONFIGURE_DIRS has overrides for
config.guess and config.sub as well.
2006-01-03 20:52:27 +00:00
rillig
1c0702676a Cleaned up the TODO list. 2006-01-02 10:12:09 +00:00
rillig
0ff3a14888 - For possibly misquoted variables the current shellword state is
printed (-vv only).
- TODO: Decide which variables may be used in which quoting states.
2006-01-02 10:09:03 +00:00
rillig
862032689f * record with each substring its source location to be able to make
even more precise diagnostics
2006-01-02 09:42:52 +00:00
rillig
83f5dee91f Updated pkglint to 4.51. Welcome to the Fahrenheit release.
Changes since 4.50:
- Extended the quoting checks for make variables to shell commands.
- Added a check for unquoted shell variables (only with -Wextra).
- Some other minor changes.
2006-01-02 08:29:55 +00:00
rillig
11b91ee6d2 - Fixed the wording of the message when CONFIGURE_DIRS and friends are
prefixed with ${WRKSRC}. It had been plainly wrong.
2006-01-02 03:02:29 +00:00
rillig
d3a90242d3 - Removed the type guessing code for variables with unknown type, as
this code has led to duplicate diagnostics. It had been misplaced as
  well.
2006-01-02 01:20:31 +00:00
rillig
b42c46442f - Added MESSAGE_SUBST, PKG_GROUPS, PKG_USERS. 2006-01-02 01:18:24 +00:00
rillig
bc5fc19c6f - Unquoted shell variables may appear in for loops. 2006-01-01 22:08:22 +00:00
rillig
08274c2f69 - Uncommented the note that CONFIGURE_DIRS, BUILD_DIRS and INSTALL_DIRS
don't need to be prefixed with ${WRKSRC}, now that there will be no
  more pullups to 2005Q3.
2006-01-01 21:58:12 +00:00
rillig
2d6877dcb0 - Added a check for unquoted shell variables (only with -Wextra). 2006-01-01 21:55:44 +00:00
rillig
bab261e700 - Integrated checklines_patches_patch back into checkfile_patches_patch. 2006-01-01 19:58:36 +00:00
rillig
54171b1096 - Fixed typo: It's __NetBSD_Version__, not __NetBSD_Version_. 2006-01-01 19:07:20 +00:00
wiz
faf65456ad Remove stuff that was marked for removal after 2005Q4. 2006-01-01 18:53:03 +00:00
rillig
be3a661d5b - Added a parser for shell words.
- Added warnings for imperfect quoting style inside double quotes.
- All shell commands are checked for correct quoting of make(1) variables
  in shell assignments like --prefix=${PREFIX:Q} and TMPDIR=${WRKSRC:Q}.
2006-01-01 18:40:12 +00:00
rillig
ea3cb56d30 - Moved the code that checks for valid shell words into its own subroutine
because it will be extended soon.
2005-12-31 15:00:15 +00:00
rillig
068c3c65d5 Updated pkglint to 4.50.
Changes since 4.49:
- Added checks for shell commands whose exitcodes are ignored.
- Added checks for CFLAGS, CPPFLAGS and CXXFLAGS.
- Improved diagnostics.
- Various bugfixes.

Changes to lintpkgsrc:
- Avoided double occurrence of pkg_install.
2005-12-31 14:09:51 +00:00
rillig
816ce58996 Added some variables, strengthened the checks for some other variables. 2005-12-31 14:02:28 +00:00
rillig
5b0ebb51c6 - Restructured the header comment.
- Rewrote the message formatting.
- The indentation of explanations is changed to be always a tabulator
  character instead of depending on the last message.
- In verbose mode, statistics about the frequency of the individual
  messages are printed before exiting.
- The command line option -Wextra enables additional warnings that are
  not enabled by default because I have been told that Alistair would kill
  me for them. :)
- Improved the shell tokenizer by recognizing parentheses.
- Improved checking of pkgsrc-internal files (mostly in pkgsrc/mk).
- Added a (trivial) spellchecker.
- Added checks for shell code that ignores the exitcode of commands.
- Added checks for CFLAGS, CPPFLAGS and CXXFLAGS.
- Avoided false positive warnings for absolute filenames in AWK code.
- Added checks for .for variables.
- Pkglint can check single files in directories that are three levels deep.
  This is mostly useful for checking patch files.
2005-12-31 14:01:46 +00:00
rillig
7255646a18 Since pkg_install appears in the pkg_info listing, there is no need for
special treatment. Reported by Christoph Egger via private mail.
2005-12-31 09:07:22 +00:00
joerg
ff4b54c998 Index: has sometimes different precedence in patch, avoid problems. 2005-12-30 16:27:13 +00:00
rillig
1ddd52875f lintpkgsrc needs pkgtools/digest, so readd it to the DEPENDS. 2005-12-18 15:20:21 +00:00
rillig
b776d7dde2 Synchronized the way the checksum of patch files is computed with the one
that is used in the rest of pkgsrc. This avoids false positive errors.
2005-12-18 14:25:40 +00:00
wiz
525916457d NetBSD capitalization police. 2005-12-13 12:03:47 +00:00
rillig
18cff5b614 + ERROR: Other Makefiles must not be included. Use Makefile.common instead. 2005-12-12 21:36:45 +00:00
rillig
9c2bd09a33 * check quoting in CFLAGS+= -DPREFIX=\"${PREFIX:Q}\" 2005-12-11 22:07:46 +00:00
rillig
80b3d9a596 Improved diagnostic of the warning for @comment in variables. 2005-12-09 08:40:40 +00:00
rillig
5e79129a20 - Improved the wording of the explanation regarding relative directories.
- Fixed a bunch of format string bugs. (As this is not C, these were
  only bugs, not vulnerabilities. ;))
2005-12-08 21:13:49 +00:00
rillig
a1ff561a90 Updated pkglint to 4.49.
Changes since 4.48:
- Added a check for .include lines in all Makefiles and *.mk files to make
  sure that only existant files are referenced and that pkgsrc packages do
  not contain references to packages in pkgsrc-wip.
- Extended the --autofix option to all Makefile* and *.mk files. Before, only the
  package Makefile could be fixed.
- Rewrote the detection of direct use of tool names.
- Append-only lists may be initialized using the "?=" operator.
- The typical form of ShellWords for CONFIGURE_ARGS, --foo=${FOODIR}, is checked for
  quoting errors.
- All PKG_OPTIONs are checked whether they are documented in mk/defaults/\
  options.description.
- Many small fixes and improvements.
2005-12-08 10:57:59 +00:00
rillig
ab84b76ce4 Cleaned up the TODO list. 2005-12-08 10:47:38 +00:00
rillig
081ebe2d92 The option names are now checked if they are in
mk/defaults/options.description.
2005-12-08 10:43:04 +00:00
rillig
1f93724529 - Fixed a typo (SUBST_PLIST => PLIST_SUBST) noted by wiz. 2005-12-08 10:07:20 +00:00
rillig
ebba7b0a8c - Added a warning that prevents the quoting issues from the recent
"pkglint --autofix" change. Added a long and detailed explanation for it.
2005-12-08 09:01:08 +00:00
rillig
0ed1c6a38d - All PKG_OPTIONs are checked whether they are documented in mk/defaults/\
options.description.
- Added the checkline_relative_pkgdir() subroutine, as the code is useful
  in two different places.
2005-12-07 21:39:59 +00:00
rillig
45edf96e98 - Fixed a comment. The order of subroutines is no longer historical. 2005-12-07 19:46:51 +00:00
rillig
ddf867e458 I've sent joerg a patch which would fix his TODO item. 2005-12-07 18:47:34 +00:00
rillig
59f4a103be - Added a check that exists if RelativePkgDir exists. Suggested by wiz in
a private mail.
2005-12-07 18:46:28 +00:00
rillig
e55cea632a - Changed the type of PKG_OPTIONS_VAR from Varname to PkgOptionsVar. Added
a check that PKGBASE is not used in PKG_OPTIONS_VAR.
- Added some macros to the list of portable CPP macro names.
2005-12-06 22:07:35 +00:00
rillig
e12c8a5077 - Moved checkline_mk_varassign() below checkline_mk_vartype() to avoid
forward references.
2005-12-06 17:37:06 +00:00
rillig
d526260071 - Improved the heuristics for shell words by allowing pkgsrc variables with
a "$" in the modifier part, as long as they don't contain references to
  other variables.
- Removed checkline_mk_direct_tool_use().
- Renamed checkline_mk_shellcmd() to checkline_mk_shelltext(). This sub-
  routine is also used for checking the right hand side of variable assign-
  ments.
- Renamed direct_tools_ok_vars to non_shellcode_vars, which is more
  appropriate. Added some variables to it that produced false positive
  warnings.
2005-12-06 17:32:12 +00:00
rillig
e3aeff9129 * IMAKE_MANNEWSUFFIX should be deprecated in PLISTs, says Joerg. 2005-12-06 16:42:15 +00:00
rillig
8c635c3030 - Removed the checklines_mk() subroutine and copied the code to
checklines_package_Makefile(). Then, renamed
  checklines_package_Makefile() to checklines_mk(), as it not only
  applies to the main package Makefile.
- Fixed the regular expression for detecting ambiguous variables like
  $f, which could mean either ${f} or $$f.
- When checking for deprecated variables, also mention the ones that
  don't have modifiers.
2005-12-06 16:13:28 +00:00
rillig
e9a455da93 - Integrated the code from checklines_mk_deprecated_variables() into
checkline_mk_text() and checkline_mk_varassign(). This saves 20 lines
  and makes the warnings appear ordered by line number.
2005-12-06 15:47:14 +00:00
rillig
01f34446ba - Improved the heuristics for detecting direct use of ${TOOL}s.
- Moved the whole complicated code from checklines_package_Makefile() to
  checkline_mk_shellcmd() and checkline_mk_varassign().
- Reenabled the -Wdirectcmd options by default.
2005-12-06 15:22:28 +00:00
rillig
4cff6fbbc6 Reordered the complete file. Grouped subroutines by name (checkline_*,
checklines_*, checkfile_*). No functional changes.
2005-12-06 14:15:02 +00:00
rillig
df0a56361d Collected the routines that load pkglint-specific data in one section.
No functional changes.
2005-12-06 13:23:16 +00:00
rillig
2c55734d95 - Renamed get_make_vars_typemap() to get_vartypes_map().
- Added specialized subroutines for checking a single line.
- Removed checklines_Makefile_varuse().
- Removed checklines_direct_tools(), which has been replaced by the
  specialized routines mentioned above.
2005-12-06 13:16:23 +00:00
rillig
6a6a3411e1 - Rewrote the code that checks for direct use of tool names. It is
disabled by default, as I am currently working on it, and neither the
  current nor the previous version is good enough for the end user.
- Pkglint can now distinguish the two kinds of tools: The ones that
  should be used like ${TOOL} and the ones that are provided in the
  .tools/bin directory. The list of the first kind of tools is extracted
  from the mk/tools/ directory instead of being hard-coded. This adds
  a whole lot of new warnings.
2005-12-06 11:41:14 +00:00
rillig
7276fc4b34 - Improved detection of valid shell words once more.
- Rewrote the code for loading the deprecated.map file. It is only
  loaded once now. The code that checks for use of deprecated variables
  can handle multiple variables in a single line now.
2005-12-06 01:07:20 +00:00