GoogleChrome/lighthouse

runWarnings format difficult for pragmatic usage

Open

#11 352 ouverte le 1 sept. 2020

Voir sur GitHub
 (4 commentaires) (0 réactions) (0 assignés)JavaScript (9 278 forks)batch import
P3breakinggood first issue

Métriques du dépôt

Stars
 (27 768 stars)
Métriques de merge PR
 (Merge moyen 18j 18h) (40 PRs mergées en 30 j)

Description

I have two concerns with runWarnings specifically around pragmatic usage:

  • runWarnings contains both errors (eg, page hung / non-successful request on main document resource) and warnings (eg, CPU throttling might be bad)
  • The errors and warnings contained within runWarnings are strings. There's no handle to be able to identify one warning/error from another, without searching the string.

Feature request summary

runWarnings to be changed to an object. It should contain code and message. Just like runtimeError.

What is the motivation or use case for changing this?

Node.js/API/PageSpeed users of Lighthouse will be able to handle errors/warnings reliably.

Guide contributeur