pkgcheck.reporters module

Basic result reporters.

class pkgcheck.reporters.CsvReporter(out)[source]

Bases: Reporter

Comma-separated value reporter, convenient for shell processing.

Example:

,,,"global USE flag 'big-endian' is a potential local, used by 1 package: dev-java/icedtea-bin"
sys-apps,portage,2.1-r2,sys-apps/portage-2.1-r2.ebuild has whitespace in indentation on line 169
sys-apps,portage,2.1-r2,"rdepend  ppc-macos: unsolvable default-darwin/macos/10.4, solutions: [ >=app-misc/pax-utils-0.1.13 ]"
sys-apps,portage,2.1-r2,"no change in 75 days, keywords [ ~x86-fbsd ]"
priority = -1001
exception pkgcheck.reporters.DeserializationError[source]

Bases: Exception

Exception occurred while deserializing a data stream.

class pkgcheck.reporters.FancyReporter(out)[source]

Bases: Reporter

Colored output grouped by result scope.

Example:

sys-apps/portage
  WrongIndentFound: sys-apps/portage-2.1-r2.ebuild has whitespace in indentation on line 169
  NonsolvableDeps: sys-apps/portage-2.1-r2: rdepend  ppc-macos: unsolvable default-darwin/macos/10.4, solutions: [ >=app-misc/pax-utils-0.1.13 ]
  StableRequest: sys-apps/portage-2.1-r2: no change in 75 days, keywords [ ~x86 ]
priority = 1
class pkgcheck.reporters.FlycheckReporter(out)[source]

Bases: Reporter

Simple line reporter done for easier integration with flycheck [1] .

priority = -1001
class pkgcheck.reporters.FormatReporter(format_str, *args, **kwargs)[source]

Bases: Reporter

Custom format string reporter.

This formatter uses custom format string passed using the --format command line argument.

priority = -1001
class pkgcheck.reporters.JsonReporter(out)[source]

Bases: Reporter

Feed of newline-delimited JSON records.

Note that the format is newline-delimited JSON with each line being related to a separate report. To merge the objects together a tool such as jq can be leveraged similar to the following:

jq -c -s 'reduce.[]as$x({};.*$x)' orig.json > new.json
priority = -1000
class pkgcheck.reporters.JsonStream(out)[source]

Bases: Reporter

Generate a stream of result objects serialized in JSON.

static from_iter(iterable)[source]

Deserialize results from a given iterable.

priority = -1001
static to_json(obj)[source]

Serialize results and other objects to JSON.

class pkgcheck.reporters.Reporter(out)[source]

Bases: object

Generic result reporter.

class pkgcheck.reporters.StrReporter(out)[source]

Bases: Reporter

Simple string reporter, pkgcheck-0.1 behaviour.

Example:

sys-apps/portage-2.1-r2: sys-apps/portage-2.1-r2.ebuild has whitespace in indentation on line 169
sys-apps/portage-2.1-r2: rdepend  ppc-macos: unsolvable default-darwin/macos/10.4, solutions: [ >=app-misc/pax-utils-0.1.13 ]
sys-apps/portage-2.1-r2: no change in 75 days, keywords [ ~x86-fbsd ]
priority = 0
class pkgcheck.reporters.XmlReporter(out)[source]

Bases: Reporter

Feed of newline-delimited XML reports.

priority = -1000