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)[source]

Add arguments to parser.

reuse.lint.lint(report, out=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'>)[source]

Lint the entire project.

Return type:bool
reuse.lint.lint_bad_licenses(report, out=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'>)[source]

Lint for bad licenses. Bad licenses are licenses that are not in the SPDX License List or do not start with LicenseRef-.

Return type:Iterable[str]

Lint for files that do not have copyright or licensing information.

Return type:Iterable[str]
reuse.lint.lint_missing_licenses(report, out=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'>)[source]

Lint for missing licenses. A license is missing when it is referenced in a file, but cannot be found.

Return type:Iterable[str]
reuse.lint.lint_read_errors(report, out=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'>)[source]

Lint for read errors.

Return type:Iterable[str]
reuse.lint.lint_summary(report, out=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'>)[source]

Print a summary for linting.

Return type:None
reuse.lint.run(args, out=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'>)[source]

List all non-compliant files.