GoogleChrome/lighthouse

runWarnings format difficult for pragmatic usage

Open

#11,352 建立於 2020年9月1日

在 GitHub 查看
 (4 留言) (0 反應) (0 負責人)JavaScript (9,278 fork)batch import
P3breakinggood first issue

倉庫指標

Star
 (27,768 star)
PR 合併指標
 (平均合併 18天 18小時) (30 天內合併 40 個 PR)

描述

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.

貢獻者指南