PCCRITIC(1) General Commands Manual PCCRITIC(1)

pccritica quality scorer for pkg-config files

pccritic [options] module-or-file ...

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 finding, 10 for a finding, 4 for a finding, and 1 for an 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:

Print the version number, the Copyright notice, and the license of the pccritic program to standard output and exit.
Print the version number of the pccritic program to standard output and exit.
Print a short usage summary to standard output and exit.
Print only the score and grade for each target, one per line, instead of the full list of findings.
n
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.
[=when]
Control colorized output. when may be auto (the default), always, or never. When auto, color is enabled only when standard output is a terminal and the NO_COLOR environment variable is not set. Giving --color without a value is equivalent to always.
=varname=value
Define varname as value. This affects how variables in the inspected file are expanded.

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.

Score an installed module by name:

$ pccritic zlib

Score a file before installation and fail if it grades below a C:

$ pccritic --min-score 70 ./mylib.pc

Summarize every file in a directory:

$ pccritic --quiet /usr/lib/pkgconfig/*.pc

pkgconf(1), pc(5)

June 28, 2026 Linux 7.1.4-arch1-1