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: ~reuse.report.ProjectReport, out=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>) bool[source]

Lint the entire project.

reuse.lint.lint_bad_licenses(report: ~reuse.report.ProjectReport, out=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>) Iterable[str][source]

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

reuse.lint.lint_deprecated_licenses(report: ~reuse.report.ProjectReport, out=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>) Iterable[str][source]

Lint for deprecated licenses.

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

reuse.lint.lint_licenses_without_extension(report: ~reuse.report.ProjectReport, out=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>) Iterable[str][source]

Lint for licenses without extensions.

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

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

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

Lint for read errors.

reuse.lint.lint_summary(report: ~reuse.report.ProjectReport, out=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>) None[source]

Print a summary for linting.

reuse.lint.lint_unused_licenses(report: ~reuse.report.ProjectReport, out=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>) Iterable[str][source]

Lint for unused licenses.

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

List all non-compliant files.