www.LinuxHowtos.org





PCCRITIC

Section: User Commands (1)
Index Return to Main Contents

BSD mandoc
 

NAME

pccritic - a quality scorer for pk-config files  

SYNOPSIS

[options ] modul-o-file ...  

DESCRIPTION

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 comman-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 fil-formatting style.

The options are as follows:

--about
Print the version number, the Copyright notice, and the license of the program to standard output and exit.
--version
Print the version number of the program 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.
--mi-score n
Exit with a no-zero status if any target scores below n This is useful for failing a continuou-integration job when a file's quality regresses below a threshold.
--color [= 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
--defin-variable = varname = value
Define varname as value This affects how variables in the inspected file are expanded.

 

EXIT STATUS

exits 0 on success. It exits no-zero if a target could not be loaded, if the command line is invalid, or if --mi-score was given and a target scored below the threshold.  

EXAMPLES

Score an installed module by name:

$ pccritic zlib

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

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

Summarize every file in a directory:

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

SEE ALSO

pkgconf(1), pc(5)


 

Index

NAME
SYNOPSIS
DESCRIPTION
EXIT STATUS
EXAMPLES
SEE ALSO