reuse.lint module

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

reuse.lint.add_arguments(parser: ArgumentParser) None[source]

Add arguments to parser.

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(report: ProjectReport) str[source]

Formats data dictionary as plaintext strings to be printed to sys.stdout Sorting of output is not guaranteed. Symbolic links can result in multiple entries per file.

Parameters:

report – ProjectReport data

Returns:

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

reuse.lint.run(args: ~argparse.Namespace, project: ~reuse.project.Project, out: ~typing.IO[str] = <_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>) int[source]

List all non-compliant files.