Skip to content

core: score of 1 for informative audits - #15689

Merged
adamraine merged 8 commits into
mainfrom
informative-score
Jan 18, 2024
Merged

adamraine merged 8 commits into
mainfrom
informative-score

Conversation

@adamraine

@adamraine adamraine commented Dec 12, 2023 •

Copy link
Copy Markdown
Contributor

Closes #15686

Nothing should change from the report perspective. This is for the benefit of JSON consumers that expect the score to change from 0 to 1 under passing conditions rather than 0 to null.

? 100
: Number(b.auditRef.result.score);
const scoreA = a.auditRef.result.score || 0;
const scoreB = b.auditRef.result.score || 0;

@adamraine adamraine Dec 12, 2023 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I kinda like this solution because it means the informative score accurately represents where informative audits should be in the sort order. Without this change we need a special exception for informative audits.

@adamraine adamraine changed the title WIP: score of 1 for informative audits core: score of 1 for informative audits Dec 20, 2023
@adamraine
adamraine marked this pull request as ready for review December 20, 2023 19:08
@adamraine
adamraine requested a review from a team as a code owner December 20, 2023 19:08
@adamraine
adamraine requested review from connorjclark and removed request for a team December 20, 2023 19:08

This branch was successfully deployed

1 active deployment
Preview — 088aa6ad Deployed Jan 18, 2024 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve informative audit scoring

3 participants