| PCCRITIC(1) | General Commands Manual | PCCRITIC(1) |
NAME
pccritic — a
quality scorer for pkg-config files
SYNOPSIS
pccritic |
[options] module-or-file ... |
DESCRIPTION
pccritic inspects
pc(5) files and reports quality
findings, assigning each file a score from 0 to 100 and a letter grade from
A to F. It is intended both as an interactive aid for package authors and as
a check that can be run in continuous integration.
Each command-line argument is treated as a target. If an argument contains a slash or ends in .pc it is interpreted as a path to a file; otherwise it is resolved as a module name from the search path, exactly as pkgconf(1) would resolve it. A file that pkgconf(1) refuses to load because it omits a required field is still scanned directly so that the most broken files can be scored.
Findings are classified by severity. The score begins at 100 and each finding subtracts a fixed penalty: 25 for a critical finding, 10 for a major finding, 4 for a minor finding, and 1 for an info finding. The result is clamped to the range 0 to 100. Grades are assigned as A for 90 and above, B for 80, C for 70, D for 60, and F below 60.
The checks cover required and recommended metadata, version
sanity, relocatability of the libdir and
includedir variables, hygiene of the
Cflags and Libs fields, the
Requires and
Requires.private relationship, and basic
file-formatting style.
The options are as follows:
--about- Print the version number, the Copyright notice, and the license of the
pccriticprogram to standard output and exit. --version- Print the version number of the
pccriticprogram to standard output and exit. --help- Print a short usage summary to standard output and exit.
--quiet- Print only the score and grade for each target, one per line, instead of the full list of findings.
--min-scoren- Exit with a non-zero status if any target scores below n. This is useful for failing a continuous-integration job when a file's quality regresses below a threshold.
--color[=when]- Control colorized output. when may be
auto(the default),always, ornever. Whenauto, color is enabled only when standard output is a terminal and theNO_COLORenvironment variable is not set. Giving--colorwithout a value is equivalent toalways. --define-variable=varname=value- Define varname as value. This affects how variables in the inspected file are expanded.
EXIT STATUS
pccritic exits 0 on success. It exits
non-zero if a target could not be loaded, if the command line is invalid, or
if --min-score was given and a target scored below
the threshold.
EXAMPLES
Score an installed module by name:
$ pccritic zlibScore a file before installation and fail if it grades below a C:
$ pccritic --min-score 70
./mylib.pcSummarize every file in a directory:
$ pccritic --quiet
/usr/lib/pkgconfig/*.pcSEE ALSO
| June 28, 2026 | Linux 7.1.4-arch1-1 |