From ef0b86ee6feff972de1c9870c617bf2db727aa12 Mon Sep 17 00:00:00 2001 From: Greg Grothaus Date: Tue, 14 Nov 2017 12:35:53 -0800 Subject: [PATCH] Validator Rollup (#12055) * Remove warnings for non-usage of grandfathered extensions. Retain errors for new extensions. * Revision bump for #12015 --- .../validator-amp-access.protoascii | 2 +- .../validator-amp-accordion.protoascii | 2 +- extensions/amp-ad/validator-amp-ad.protoascii | 2 +- .../validator-amp-analytics.protoascii | 2 +- .../amp-anim/validator-amp-anim.protoascii | 2 +- .../validator-amp-apester-media.protoascii | 2 +- .../amp-audio/validator-amp-audio.protoascii | 2 +- .../amp-bind/validator-amp-bind.protoascii | 2 +- .../validator-amp-brid-player.protoascii | 2 +- .../validator-amp-brightcove.protoascii | 2 +- .../validator-amp-call-tracking.protoascii | 2 +- .../validator-amp-carousel.protoascii | 2 +- .../validator-amp-dailymotion.protoascii | 2 +- .../validator-amp-experiment.protoascii | 2 +- .../validator-amp-facebook.protoascii | 2 +- .../validator-amp-fit-text.protoascii | 2 +- .../amp-font/validator-amp-font.protoascii | 2 +- .../amp-form/validator-amp-form.protoascii | 2 +- .../validator-amp-fx-flying-carpet.protoascii | 2 +- .../validator-amp-gfycat.protoascii | 2 +- .../validator-amp-iframe.protoascii | 2 +- .../validator-amp-image-lightbox.protoascii | 2 +- .../validator-amp-instagram.protoascii | 2 +- ...dator-amp-install-serviceworker.protoascii | 2 +- .../validator-amp-izlesene.protoascii | 2 +- .../validator-amp-jwplayer.protoascii | 2 +- .../validator-amp-kaltura-player.protoascii | 2 +- .../validator-amp-lightbox.protoascii | 2 +- .../amp-list/validator-amp-list.protoascii | 2 +- .../validator-amp-live-list.protoascii | 2 +- .../validator-amp-mustache.protoascii | 2 +- .../validator-amp-o2-player.protoascii | 2 +- .../validator-amp-pinterest.protoascii | 2 +- .../validator-amp-reach-player.protoascii | 2 +- .../validator-amp-selector.protoascii | 2 +- .../validator-amp-sidebar.protoascii | 2 +- .../validator-amp-social-share.protoascii | 2 +- .../validator-amp-soundcloud.protoascii | 2 +- ...alidator-amp-springboard-player.protoascii | 2 +- .../validator-amp-sticky-ad.protoascii | 2 +- .../validator-amp-twitter.protoascii | 2 +- ...validator-amp-user-notification.protoascii | 2 +- .../amp-vimeo/validator-amp-vimeo.protoascii | 2 +- .../amp-vine/validator-amp-vine.protoascii | 2 +- .../validator-amp-youtube.protoascii | 2 +- validator/engine/validator.js | 60 ++----------------- .../amp4ads_feature_tests/extensions.out | 10 ---- validator/testdata/feature_tests/ads.out | 1 - validator/testdata/feature_tests/article.out | 1 - .../feature_tests/duplicate_attribute.out | 1 - .../testdata/feature_tests/extensions.out | 1 - validator/testdata/feature_tests/regexps.out | 1 - .../testdata/feature_tests/spec_example.out | 1 - validator/validator-main.protoascii | 16 ++--- validator/validator.proto | 9 +-- 55 files changed, 58 insertions(+), 133 deletions(-) diff --git a/extensions/amp-access/validator-amp-access.protoascii b/extensions/amp-access/validator-amp-access.protoascii index 0630b62ca2de..1efb4cd22174 100644 --- a/extensions/amp-access/validator-amp-access.protoascii +++ b/extensions/amp-access/validator-amp-access.protoascii @@ -20,7 +20,7 @@ tags: { # amp-access name: "amp-access" allowed_versions: "0.1" allowed_versions: "latest" - requires_usage: DEPRECATED_WARNING + requires_usage: GRANDFATHERED deprecated_allow_duplicates: true } attr_lists: "common-extension-attrs" diff --git a/extensions/amp-accordion/validator-amp-accordion.protoascii b/extensions/amp-accordion/validator-amp-accordion.protoascii index 9b6e1e855838..c1e4f4e30959 100644 --- a/extensions/amp-accordion/validator-amp-accordion.protoascii +++ b/extensions/amp-accordion/validator-amp-accordion.protoascii @@ -19,7 +19,7 @@ tags: { # amp-accordion name: "amp-accordion" allowed_versions: "0.1" allowed_versions: "latest" - requires_usage: DEPRECATED_WARNING + requires_usage: GRANDFATHERED deprecated_allow_duplicates: true } attr_lists: "common-extension-attrs" diff --git a/extensions/amp-ad/validator-amp-ad.protoascii b/extensions/amp-ad/validator-amp-ad.protoascii index f8db662b0f38..84df94386e3d 100644 --- a/extensions/amp-ad/validator-amp-ad.protoascii +++ b/extensions/amp-ad/validator-amp-ad.protoascii @@ -38,7 +38,7 @@ tags: { # amp-ad name: "amp-ad" allowed_versions: "0.1" allowed_versions: "latest" - requires_usage: DEPRECATED_WARNING + requires_usage: GRANDFATHERED deprecated_allow_duplicates: true } attr_lists: "common-extension-attrs" diff --git a/extensions/amp-analytics/validator-amp-analytics.protoascii b/extensions/amp-analytics/validator-amp-analytics.protoascii index cc25ef332abb..1cc66e449882 100644 --- a/extensions/amp-analytics/validator-amp-analytics.protoascii +++ b/extensions/amp-analytics/validator-amp-analytics.protoascii @@ -23,7 +23,7 @@ tags: { # amp-analytics name: "amp-analytics" allowed_versions: "0.1" allowed_versions: "latest" - requires_usage: DEPRECATED_WARNING + requires_usage: GRANDFATHERED deprecated_allow_duplicates: true } attr_lists: "common-extension-attrs" diff --git a/extensions/amp-anim/validator-amp-anim.protoascii b/extensions/amp-anim/validator-amp-anim.protoascii index 05f15bfe3cc4..18ea3b871cf6 100644 --- a/extensions/amp-anim/validator-amp-anim.protoascii +++ b/extensions/amp-anim/validator-amp-anim.protoascii @@ -22,7 +22,7 @@ tags: { # amp-anim name: "amp-anim" allowed_versions: "0.1" allowed_versions: "latest" - requires_usage: DEPRECATED_WARNING + requires_usage: GRANDFATHERED deprecated_allow_duplicates: true } attr_lists: "common-extension-attrs" diff --git a/extensions/amp-apester-media/validator-amp-apester-media.protoascii b/extensions/amp-apester-media/validator-amp-apester-media.protoascii index 035655ca2332..e45b95976b3e 100644 --- a/extensions/amp-apester-media/validator-amp-apester-media.protoascii +++ b/extensions/amp-apester-media/validator-amp-apester-media.protoascii @@ -21,7 +21,7 @@ tags: { # amp-apester-media name: "amp-apester-media" allowed_versions: "0.1" allowed_versions: "latest" - requires_usage: DEPRECATED_WARNING + requires_usage: GRANDFATHERED deprecated_allow_duplicates: true } attr_lists: "common-extension-attrs" diff --git a/extensions/amp-audio/validator-amp-audio.protoascii b/extensions/amp-audio/validator-amp-audio.protoascii index 44c3230535d2..0c91e2af61db 100644 --- a/extensions/amp-audio/validator-amp-audio.protoascii +++ b/extensions/amp-audio/validator-amp-audio.protoascii @@ -20,7 +20,7 @@ tags: { # amp-audio allowed_versions: "0.1" allowed_versions: "latest" deprecated_allow_duplicates: true - requires_usage: DEPRECATED_WARNING + requires_usage: GRANDFATHERED } attr_lists: "common-extension-attrs" } diff --git a/extensions/amp-bind/validator-amp-bind.protoascii b/extensions/amp-bind/validator-amp-bind.protoascii index 262475dee83d..80ee385790bf 100644 --- a/extensions/amp-bind/validator-amp-bind.protoascii +++ b/extensions/amp-bind/validator-amp-bind.protoascii @@ -22,7 +22,7 @@ tags: { # amp-bind allowed_versions: "latest" # amp-bind has no associated tag which indicates usage of the extension. # TODO(gregable): Implement a mechanism to associate attributes with - # extension usage and then set this to DEPRECATED_WARNING or ERROR. + # extension usage and then set this to GRANDFATHERED or ERROR. requires_usage: NONE } attr_lists: "common-extension-attrs" diff --git a/extensions/amp-brid-player/validator-amp-brid-player.protoascii b/extensions/amp-brid-player/validator-amp-brid-player.protoascii index c32df36f65a6..2466f5aa8461 100644 --- a/extensions/amp-brid-player/validator-amp-brid-player.protoascii +++ b/extensions/amp-brid-player/validator-amp-brid-player.protoascii @@ -21,7 +21,7 @@ tags: { # amp-brid-player name: "amp-brid-player" allowed_versions: "0.1" allowed_versions: "latest" - requires_usage: DEPRECATED_WARNING + requires_usage: GRANDFATHERED deprecated_allow_duplicates: true } attr_lists: "common-extension-attrs" diff --git a/extensions/amp-brightcove/validator-amp-brightcove.protoascii b/extensions/amp-brightcove/validator-amp-brightcove.protoascii index 1da3ca64533c..44124e6fe343 100644 --- a/extensions/amp-brightcove/validator-amp-brightcove.protoascii +++ b/extensions/amp-brightcove/validator-amp-brightcove.protoascii @@ -21,7 +21,7 @@ tags: { # amp-brightcove name: "amp-brightcove" allowed_versions: "0.1" allowed_versions: "latest" - requires_usage: DEPRECATED_WARNING + requires_usage: GRANDFATHERED deprecated_allow_duplicates: true } attr_lists: "common-extension-attrs" diff --git a/extensions/amp-call-tracking/validator-amp-call-tracking.protoascii b/extensions/amp-call-tracking/validator-amp-call-tracking.protoascii index 7d86334aabcc..a764c789fa78 100644 --- a/extensions/amp-call-tracking/validator-amp-call-tracking.protoascii +++ b/extensions/amp-call-tracking/validator-amp-call-tracking.protoascii @@ -21,7 +21,7 @@ tags: { # amp-call-tracking name: "amp-call-tracking" allowed_versions: "0.1" allowed_versions: "latest" - requires_usage: DEPRECATED_WARNING + requires_usage: GRANDFATHERED } attr_lists: "common-extension-attrs" } diff --git a/extensions/amp-carousel/validator-amp-carousel.protoascii b/extensions/amp-carousel/validator-amp-carousel.protoascii index 328ef7151f64..e4afb5012025 100644 --- a/extensions/amp-carousel/validator-amp-carousel.protoascii +++ b/extensions/amp-carousel/validator-amp-carousel.protoascii @@ -20,7 +20,7 @@ tags: { # amp-carousel name: "amp-carousel" allowed_versions: "0.1" allowed_versions: "latest" - requires_usage: DEPRECATED_WARNING + requires_usage: GRANDFATHERED deprecated_allow_duplicates: true } attr_lists: "common-extension-attrs" diff --git a/extensions/amp-dailymotion/validator-amp-dailymotion.protoascii b/extensions/amp-dailymotion/validator-amp-dailymotion.protoascii index 8f591f1dadc8..194a371a08d8 100644 --- a/extensions/amp-dailymotion/validator-amp-dailymotion.protoascii +++ b/extensions/amp-dailymotion/validator-amp-dailymotion.protoascii @@ -20,7 +20,7 @@ tags: { # amp-dailymotion name: "amp-dailymotion" allowed_versions: "0.1" allowed_versions: "latest" - requires_usage: DEPRECATED_WARNING + requires_usage: GRANDFATHERED deprecated_allow_duplicates: true } attr_lists: "common-extension-attrs" diff --git a/extensions/amp-experiment/validator-amp-experiment.protoascii b/extensions/amp-experiment/validator-amp-experiment.protoascii index c58801a1bf5d..0395326eec21 100644 --- a/extensions/amp-experiment/validator-amp-experiment.protoascii +++ b/extensions/amp-experiment/validator-amp-experiment.protoascii @@ -22,7 +22,7 @@ tags: { # amp-experiment name: "amp-experiment" allowed_versions: "0.1" allowed_versions: "latest" - requires_usage: DEPRECATED_WARNING + requires_usage: GRANDFATHERED deprecated_allow_duplicates: true } attr_lists: "common-extension-attrs" diff --git a/extensions/amp-facebook/validator-amp-facebook.protoascii b/extensions/amp-facebook/validator-amp-facebook.protoascii index 4a5b125c43f7..2f4f49e1b16f 100644 --- a/extensions/amp-facebook/validator-amp-facebook.protoascii +++ b/extensions/amp-facebook/validator-amp-facebook.protoascii @@ -21,7 +21,7 @@ tags: { # amp-facebook name: "amp-facebook" allowed_versions: "0.1" allowed_versions: "latest" - requires_usage: DEPRECATED_WARNING + requires_usage: GRANDFATHERED deprecated_allow_duplicates: true } attr_lists: "common-extension-attrs" diff --git a/extensions/amp-fit-text/validator-amp-fit-text.protoascii b/extensions/amp-fit-text/validator-amp-fit-text.protoascii index 0a923541420c..28188577d2ae 100644 --- a/extensions/amp-fit-text/validator-amp-fit-text.protoascii +++ b/extensions/amp-fit-text/validator-amp-fit-text.protoascii @@ -20,7 +20,7 @@ tags: { # amp-fit-text name: "amp-fit-text" allowed_versions: "0.1" allowed_versions: "latest" - requires_usage: DEPRECATED_WARNING + requires_usage: GRANDFATHERED deprecated_allow_duplicates: true } attr_lists: "common-extension-attrs" diff --git a/extensions/amp-font/validator-amp-font.protoascii b/extensions/amp-font/validator-amp-font.protoascii index 373e36fd806c..e27f993d39a6 100644 --- a/extensions/amp-font/validator-amp-font.protoascii +++ b/extensions/amp-font/validator-amp-font.protoascii @@ -22,7 +22,7 @@ tags: { # amp-font name: "amp-font" allowed_versions: "0.1" allowed_versions: "latest" - requires_usage: DEPRECATED_WARNING + requires_usage: GRANDFATHERED deprecated_allow_duplicates: true } attr_lists: "common-extension-attrs" diff --git a/extensions/amp-form/validator-amp-form.protoascii b/extensions/amp-form/validator-amp-form.protoascii index 501ac0a3d691..a71835953b8c 100644 --- a/extensions/amp-form/validator-amp-form.protoascii +++ b/extensions/amp-form/validator-amp-form.protoascii @@ -22,7 +22,7 @@ tags: { # amp-form allowed_versions: "0.1" allowed_versions: "latest" deprecated_allow_duplicates: true - requires_usage: DEPRECATED_WARNING + requires_usage: GRANDFATHERED } attr_lists: "common-extension-attrs" } diff --git a/extensions/amp-fx-flying-carpet/validator-amp-fx-flying-carpet.protoascii b/extensions/amp-fx-flying-carpet/validator-amp-fx-flying-carpet.protoascii index 1767ab8c27fa..d2b8f6d0dfa7 100644 --- a/extensions/amp-fx-flying-carpet/validator-amp-fx-flying-carpet.protoascii +++ b/extensions/amp-fx-flying-carpet/validator-amp-fx-flying-carpet.protoascii @@ -20,7 +20,7 @@ tags: { #