firefox-devtools / firefox-devtools/profiler

Print more useful error messages for css lint errors

Open
#1,945 0 comments 0 reactions 0 assignees View on GitHub
code maintenance
Dominant language
TypeScript
Stars
1.5k
Forks
491
Avg merge
3d 5h
Merged PRs (30d)
30

Description

Currently we are running `yarn lint` before every push and it checks js/css lints. We started to check prettier results as well with #1940 But as Greg mentioned in the review. The output is not super useful. It may be nice to create a node script that runs lint, and then when it fails outputs a friendly error message with a suggest to run `yarn lint-fix-css` to our contributors.

Click to see an example output

RUNS src/test/components/ProfileCallTreeView.test.js
RUNS src/test/components/ZipFileTree.test.js
RUNS src/test/components/Viewport.test.js
RUNS src/test/store/receive-profile.test.js
RUNS src/test/components/MenuButtons.test.js
RUNS src/test/components/TrackMemory.test.js
RUNS src/test/unit/marker-data.test.js

Test Suites: 0 of 66 total
Tests: 0 total
Snapshots: 0 total
Time: 6s, estimated 17s
████████████████████████████████████████
src/components/shared/thread/StackGraph.css
6:15 ✖ Insert ";" prettier/prettier

npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! firefox-profiler@0.0.1 lint-css: `stylelint 'src/**/*.css' 'res/css/**/*.css'`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the firefox-profiler@0.0.1 lint-css script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/gregorytatum/.npm/_logs/2019-04-12T14_20_09_164Z-debug.log
ERROR: "lint-css" exited with 2.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! firefox-profiler@0.0.1 lint: `run-p lint-js lint-css`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the firefox-profiler@0.0.1 lint script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/gregorytatum/.npm/_logs/2019-04-12T14_20_09_335Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! firefox-profiler@0.0.1 test: `cross-env NODE_ENV=test NODE_OPTIONS=--experimental-worker jest`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the firefox-profiler@0.0.1 test script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/gregorytatum/.npm/_logs/2019-04-12T14_20_09_512Z-debug.log
ERROR: "lint" exited with 1.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! firefox-profiler@0.0.1 prepush: `yarn test-all`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the firefox-profiler@0.0.1 prepush script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/gregorytatum/.npm/_logs/2019-04-12T14_20_09_572Z-debug.log

husky - pre-push hook failed (add --no-verify to bypass)

error: failed to push some refs to 'git@github.com:gregtatum/perf.html.git'

┆Issue is synchronized with this [Jira Task](https://mozilla-hub.atlassian.net/browse/FP-144)

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.