reuse.lint module - reuse 6.1.2 documentation

Skip to content
Back to top
View this page

# 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

  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

  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

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

  Parameters:

    report – A populated report.

  Returns:

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

reuse.lint.format_lines(report: ProjectReport) → str

  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