ampproject / ampproject/amp-toolbox

Linter: don't duplicate warning message

Open
#414 0 comments 1 reaction 1 assignee Claimed by @ithinkihaveacat View on GitHub
enhancement toolbox-linter
Dominant language
HTML
Stars
459
Forks
242
PR merge metrics
No merged PRs in 30d

Description

Currently, the same warning message is repeated for each error:

```
[I] ~/P/a/p/linter (master↑1|✚11) $ amp lint https://amp.dev
PASS 1x1 images are specified by

WARN All have reasonable width and height
> [https://blog.amp.dev/wp-content/uploads/2019/06/cf_hero.png]: actual ratio [1999/1140 = 1.75] does not match specified [16/9 = 1.77]

WARN All have reasonable width and height
> [https://blog.amp.dev/wp-content/uploads/2018/10/img_20180926_163001-01.jpeg]: actual ratio [3680/2314 = 1.59] does not match specified [16/9 = 1.77]
```

It'd be better to show it only once for each error:

```
[I] ~/P/a/p/linter (master↑1|✚11) $ amp lint https://amp.dev
PASS 1x1 images are specified by

WARN All have reasonable width and height
> [https://blog.amp.dev/wp-content/uploads/2019/06/cf_hero.png]: actual ratio [1999/1140 = 1.75] does not match specified [16/9 = 1.77]
> [https://blog.amp.dev/wp-content/uploads/2018/10/img_20180926_163001-01.jpeg]: actual ratio [3680/2314 = 1.59] does not match specified [16/9 = 1.77]
```

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.