carpentries-incubator / carpentries-incubator/python-intermediate-development

Adjust the advice given for running linter on CI

Open
#214 2 comments 0 reactions 1 assignee Claimed by @bielsnohr View on GitHub
Dominant language
TeX
Stars
63
Forks
77
Avg merge
20h 8m
Merged PRs (30d)
3

Description

Currently the course recommends using a `--fail-under` score for the linting:

> Note we need to add `--fail-under=0` otherwise the builds will fail if we don’t get a ‘perfect’ score of 10! This seems unlikely, so let’s be more pessimistic.

I would instead recommend having a file with pre-existing linting errors, and then adopting a zero tolerance approach to new warnings.

This would also require adding instructions for how to suppress specific warnings (`# noqa`) as sometimes it is legitimate to ignore a warning.

This is better than having a score as:
* the score allows new things to fall in, which reduces how useful the linter is
* it actually _discourages_ removing code since you can get into a situation where you want to delete some redundant code, but that actually increases the fraction of code that has a warning, and so your "delete only" PR will fail CI.

(I intend to address this, raising issue for visibility and in case anyone disagrees).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.