Skip to content

Commit

Permalink
Remove superfluous function
Browse files Browse the repository at this point in the history
Signed-off-by: Carmen Bianca BAKKER <carmenbianca@fsfe.org>
  • Loading branch information
carmenbianca committed May 11, 2023
1 parent 62e7b99 commit 3bd95bb
Showing 1 changed file with 2 additions and 17 deletions.
19 changes: 2 additions & 17 deletions src/reuse/lint.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,21 +246,6 @@ def custom_serializer(obj):
)


def lint(report: ProjectReport, formatter=format_plain, out=sys.stdout) -> bool:
"""Lints the entire project
:param report: Dictionary holding formatted ProjectReport data
:param formatter: Callable that formats the data dictionary
:param out: Where to output
"""

out.write(formatter(report))

data = report.to_dict_lint()
result = data["summary"]["compliant"]
return result


def run(args, project: Project, out=sys.stdout, formatter=format_plain):
"""List all non-compliant files."""
report = ProjectReport.generate(
Expand All @@ -278,6 +263,6 @@ def run(args, project: Project, out=sys.stdout, formatter=format_plain):
else:
formatter = format_plain

result = lint(report, formatter=formatter, out=out)
out.write(formatter(report))

return 0 if result else 1
return 0 if report.is_compliant else 1

0 comments on commit 3bd95bb

Please sign in to comment.