processing / processing/p5.js

Lint issues don't break CI

Open
#9,070 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Discussion
Dominant language
JavaScript
Stars
24k
Forks
3.8k
Avg merge
3d 16h
Merged PRs (30d)
25

Description

Topic

I was checking the CI workflows to understand how linting works. It seems we have https://github.com/processing/p5.js/blob/02475938bb2c7d27eb2680bd8067a0f14eb15a5b/.github/workflows/ci-lint.yml and it wraps lint from package.json: https://github.com/processing/p5.js/blob/02475938bb2c7d27eb2680bd8067a0f14eb15a5b/package.json#L14

While checking the logs, I realized that the pipeline almost never fails. https://github.com/processing/p5.js/actions/runs/31380223421 for example, the page shows multiple warnings but because the overall status is "passed", I don't think there is no communication of these issues on commit / PR checks:

Image

Running yarn run lint locally results with

Found 143 warnings and 0 errors.

`yarn run lint --fix:

Found 137 warnings and 0 errors.

yarn lint --fix-suggestions:

Found 93 warnings and 0 errors.

and with yarn lint --fix-dangerously:

Found 45 warnings and 0 errors

My question is, is this something we are aware of? It seems the workflow is hiding the new issues.


After cleaning the existing issues and configuring CI to fail loudly for new issues, a follow up would be moving the lint checks to git hooks so they can run automatically during contribution.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with .github/workflows/ci-lint.yml and the lint script in package.json, then reproduce the behavior with yarn run lint and inspect the referenced CI run. Determine how existing warnings are cleaned and how CI should fail for new lint issues; the git-hooks idea is described as a later follow-up.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
ci-cd, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.