summaryrefslogtreecommitdiff
path: root/pkgtools/pkglint/README
blob: 654863e3ab414175baf4f6b984362acc761b670f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
$NetBSD: README,v 1.3 2006/02/28 15:21:09 rillig Exp $

== Current problems ==

The current pkglint architecture will not scale much further. What is
needed next are parsers for nested, non-context-free languages (make(1),
sh(1), sed(1)). The parsers should be able to recognize partial
structures, as well as structures containing foreign parts. This is
because most of pkgsrc is heavily based on preprocessors:

- The .if and .for directives in Makefiles are preprocessed by make(1)
  before building dependencies and shell commands out of the remaining
  text.

- make(1) assembles shell commands from literal text and variables like
  ${PKGNAME}.

- Shell commands often use dynamic evaluation of variables.

All this makes enhancing pkglint non-trivial. If you know of any
academic papers that might be of help in this case, please tell me.

Additionally, the Perl programming language is not well suited to this
kind of tool. It does not provide:

- Sufficient static checking (especially for names of methods)
- A type system (you can apply almost any operator to any kind of data)
- Object orientation (needed for the future advanced parsers)
- Narrow scope for constants (it's just ugly)
- Enumeration data types
- Structured data types

The pkglint source code is much too big for a single file.