Commit graph

735 commits

Author SHA1 Message Date
rillig
4eed0be377 Added APACHE_MODULE. 2006-01-12 13:59:42 +00:00
rillig
0740dd8c6c - Allow '^' to appear unquoted in shell programs, although it ``is an
obsolete synonym for the pipe operator "|", so you must protect it with
  quotes''. (Kernighan/Pike, The UNIX Programming Environment, 1984.)
- $@ is another well-known shell variable.
- All substitution arguments to ${SED} and ${PAX} should be quoted whether
  they contain special characters or not.
2006-01-12 13:51:54 +00:00
rillig
9af416c16b - The shell variables $!, $# and $? are recognized as such. All other
occurences of a $ in double quoted strings result in a warning.
2006-01-12 13:19:57 +00:00
rillig
c0fc81f666 - Improved the parsers for shell words and shell commands. Parsing errors
are only shown in -Wdebug mode, as the diagnostic messages are too
  cryptic.
- Added detection for the $(...) replacement for backticks, as the Solaris
  /bin/sh cannot handle them.
2006-01-12 13:01:47 +00:00
rillig
cb558f2a78 - Defining and using make variables starting with an underscore is only
worth a warning, not an error. There are worse things at the moment that
  need to be fixed.
2006-01-12 10:39:30 +00:00
rillig
4d9663f2a9 - Added three warning categories "debug", "quoting" and "space" that can
be enabled independently. They are all disabled by default.
- A note is emitted if variable definitions are aligned using space instead
  of tabs.
2006-01-12 10:32:40 +00:00
rillig
2ef3b243e0 - Added the package PkgLint::String, which will be used for improving the
precision of the diagnostics. It is currently unused.
2006-01-12 04:31:30 +00:00
rillig
e6e6cf9fb7 - Added plist-clash.pl to the list of files that have @PERL@ replaced. 2006-01-12 04:27:58 +00:00
rillig
fb188361c0 - In the shell command parser, go to state SCST_CONT instead of SCST_START
after parsing the command line options of ${INSTALL}.
- Don't warn for CFLAGS that reference other make variables.
2006-01-11 22:57:10 +00:00
rillig
4907cb1168 - In resolve_relative_path, the depth of the path should only be adjusted
in about half the cases -- added an additional parameter.
2006-01-11 12:25:19 +00:00
rillig
271edbd2ec Fixed spacing issue. 2006-01-11 11:42:27 +00:00
rillig
53e93b0ab9 - Renamed PkgLint::FileUtil::Line to PkgLint::Line in preparation to some
upcoming changes.
2006-01-11 04:29:12 +00:00
rillig
2cd8334aa7 Updated pkglint to 4.52.
Changes since 4.51:
- The occurence of a symlink other than work* inside the pkgsrc tree is
  not an error, just a warning.
- SUBST_MESSAGE should not be quoted.
- If -Wextra is enabled, all make variables that are used in shell commands
  are checked for proper quoting.
- Improved the parser for shell commands.
- Some other minor changes.
2006-01-10 00:52:00 +00:00
rillig
c24a72897b Fixed the simple part of the pkglint -Wall warnings. 2006-01-09 23:39:55 +00:00
rillig
1d78045e51 - Even in an unquoted shell word, variables should be quoted. For example,
${PREFIX:Q}/foo.
- The semicolon after the "for" loop in the shell does not mean that some
  exitcode is ignored, so don't print warnings for it.
2006-01-09 23:14:45 +00:00
rillig
9bb9aae442 - Only check make variables for deprecation and $(...) instead of ${...}. 2006-01-09 03:22:45 +00:00
rillig
043613d277 - Added "Please use ${FOO} instead of $(FOO)."
- It is an error if the COMMENT has the default value from url2pkg.
2006-01-09 02:47:56 +00:00
rillig
2464072040 - Rewrote the state transition of the shell command parser. The source
code now needs less lines than before. For unknown state/shellword
  combinations, warnings are printed (currently none).
2006-01-08 15:55:13 +00:00
rillig
74e4928049 - In shell commands, "case" statements are parsed properly. (Fixes a false
positive warning in mk/subst.mk.)
- Improved debugging support for parsing shell commands by printing the
  current state and word in -vv mode.
2006-01-08 14:14:36 +00:00
rillig
4d0e362738 - Enabled the quoting warning for SUBST_MESSAGE (this time the other
direction: it had been quoted too much in the past).
2006-01-07 23:29:23 +00:00
rillig
6e63ea31f3 - Added SUBST_MESSAGE to the list of checked variables. The plan is to
remove the quoting from the definitions in the Makefiles.
- When checking with -Wall, print warnings about possibly misquoted
  variables in the various states of the shell word parser.
2006-01-07 20:00:00 +00:00
rillig
6bf7eb18c8 - Moved the code for checking macro names in patch lines into its own
subroutine, as it has no code that is specific to patch files.
2006-01-06 21:06:06 +00:00
rillig
d66e28a8c5 - s/existant/existent/ 2006-01-06 18:02:05 +00:00
rillig
b29b41bfc1 - Renamed checkfile_patches_patch to checkfile_patch. 2006-01-06 17:43:18 +00:00
rillig
7fa0c4e8e9 Added an RCS Id and an introductory comment. 2006-01-06 17:24:38 +00:00
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