Skip to content

Use a linter (for logic issues) #1525

@jeanas

Description

@jeanas

One reason I'm a bit uncomfortable modifying Frescobaldi's code base is that if I remove a function or change its behavior, I need to be really sure I spotted all occurrences where it is used, as there are no tests at all, and Python does not detect unbound variables statically.

In many Python projects, such issues are mitigated by the use of a linter which can detect such issues.

Now, linters will also complain a lot about style issues, which doesn't have a lot of value to me, but style checks can typically be turned off.

Thus, I'd like to hear opinions about

a) picking a linter like ruff or flake8

b) adding a config file for it so that it only checks logic issues and doesn't bother us with style issues

c) running it in a CI job. Initially, warnings in CI would not prevent merging a PR; we could consider doing this later, if the experiment is successful.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions