s2fft icon indicating copy to clipboard operation
s2fft copied to clipboard

Set up linting checks

Open matt-graham opened this issue 1 year ago • 0 comments

Alongside setting up automated formatting (#205) we should also decide on a linter and set up a workflow to automate checks on pull-requests and pushes to main. I would recommend ruff as the linter given its performance. We will need to decide on which linting rules to select - ruff's default configuration is probably a reasonable starting point though we may want to enable some additional rules and/or disable any which we decide we are going to take a different convention. Depending on how many changes are needed to the codebase to get the checks passing initially, we may also want to take a staged approach of initially enabling a smaller subset of rules, getting the code to pass these and adding in additional rules later.

As with autoformatting, I would say having the linting set up as a pre-commit hook would have the advantage of catching any changes which fail the checks early (when committing) and we can also re-use the pre-commit checks within a GitHub Actions workflow to ensure consistency / avoid redundancy in set up.

matt-graham avatar Sep 20 '24 12:09 matt-graham