reuse.lint module

All linting happens here. The linting here is nothing more than reading the reports and printing some conclusions.

reuse.lint.format_plain(report: ProjectReport) str[source]

Formats data dictionary as plaintext string to be printed to sys.stdout

Parameters:

report – ProjectReport data

Returns:

String (in plaintext) that can be output to sys.stdout

reuse.lint.format_json(report: ProjectReport) str[source]

Formats data dictionary as JSON string ready to be printed to sys.stdout

Parameters:

report – Dictionary containing formatted ProjectReport data

Returns:

String (representing JSON) that can be output to sys.stdout

reuse.lint.format_lines_subset(report: ProjectReportSubsetProtocol) str[source]

Formats a subset of a report, namely missing licenses, read errors, files without licenses, and files without copyright.

Parameters:

report – A populated report.

reuse.lint.format_lines(report: ProjectReport) str[source]

Formats report as plaintext strings to be printed to sys.stdout. Sorting of output is not guaranteed.

Parameters:

report – A populated report.

Returns:

String (in plaintext) that can be output to sys.stdout