Bug 1452164 [wpt PR 10020] - Revert "Add a lint to catch adding files that would otherwise be ignored by git.", a=testonly
authorGeoffrey Sneddon <me@gsnedders.com>
Mon, 09 Apr 2018 16:40:30 +0000
changeset 467027 ed108ac6a823038b72ec5dfbe273716b2f4eda37
parent 467026 08b23964bdcba9085f954be2e61e87f796f1d5c8
child 467028 ca14ea060d91eb6477e381890af638ec80269ec3
push id9165
push userasasaki@mozilla.com
push dateThu, 26 Apr 2018 21:04:54 +0000
treeherdermozilla-beta@064c3804de2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1452164, 10020, 10012
milestone61.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1452164 [wpt PR 10020] - Revert "Add a lint to catch adding files that would otherwise be ignored by git.", a=testonly Automatic update from web-platform-testsRevert "Add a lint to catch adding files that would otherwise be ignored by git." (#10020) This reverts commit b3b4332e7aaf7b027c11be8a0750b9136bb90a70. See #10012. wpt-commits: 4f4793ba4d0e6b7d798928cfae9a949ca3c25886 wpt-pr: 10020 wpt-commits: 4f4793ba4d0e6b7d798928cfae9a949ca3c25886 wpt-pr: 10020
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/tools/lint/lint.py
testing/web-platform/tests/webvr/idlharness.https.html
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -604055,17 +604055,17 @@
    "f08a98a927d57cda8b780a8304a0fa6cf727cc81",
    "testharness"
   ],
   "webvr/OWNERS": [
    "adb04954bffbb33f29864668db95f5c5367d6a05",
    "support"
   ],
   "webvr/idlharness.https.html": [
-   "3505e27e1b2668010bf61f05f6b8a759cf42cece",
+   "ae515edc7c77c87caff8fa096a0682a12a254e83",
    "testharness"
   ],
   "webvr/webvr-disabled-by-feature-policy.https.sub.html": [
    "324e77ca73617cf34b3d7b8fac9844c67cae5e61",
    "testharness"
   ],
   "webvr/webvr-disabled-by-feature-policy.https.sub.html.headers": [
    "0938d2df0283e585613610216f2be36fe77471af",
--- a/testing/web-platform/tests/tools/lint/lint.py
+++ b/testing/web-platform/tests/tools/lint/lint.py
@@ -4,17 +4,16 @@ import abc
 import argparse
 import ast
 import itertools
 import json
 import os
 import re
 import subprocess
 import sys
-import tempfile
 
 from collections import defaultdict
 
 from . import fnmatch
 from .. import localpaths
 from ..gitignore.gitignore import PathFilter
 from ..wpt import testfiles
 
@@ -130,38 +129,16 @@ def check_worker_collision(repo_root, pa
 
 def check_ahem_copy(repo_root, path):
     lpath = path.lower()
     if "ahem" in lpath and lpath.endswith(".ttf"):
         return [("AHEM COPY", "Don't add extra copies of Ahem, use /fonts/Ahem.ttf", path, None)]
     return []
 
 
-def check_git_ignore(repo_root, paths):
-    errors = []
-    with tempfile.TemporaryFile('w+') as f:
-        f.write('\n'.join(paths))
-        f.seek(0)
-        try:
-            matches = subprocess.check_output(
-                ["git", "check-ignore", "--verbose", "--no-index", "--stdin"], stdin=f)
-            for match in matches.strip().split('\n'):
-                match_filter, path = match.split()
-                _, _, filter_string = match_filter.split(':')
-                # If the matching filter reported by check-ignore is a special-case exception,
-                # that's fine. Otherwise, it requires a new special-case exception.
-                if filter_string != '!' + path:
-                    errors += [("IGNORED PATH", "%s matches an ignore filter in .gitignore - "
-                                "please add a .gitignore exception" % path, path, None)]
-        except subprocess.CalledProcessError as e:
-            # Nonzero return code means that no match exists.
-            pass
-    return errors
-
-
 drafts_csswg_re = re.compile(r"https?\:\/\/drafts\.csswg\.org\/([^/?#]+)")
 w3c_tr_re = re.compile(r"https?\:\/\/www\.w3c?\.org\/TR\/([^/?#]+)")
 w3c_dev_re = re.compile(r"https?\:\/\/dev\.w3c?\.org\/[^/?#]+\/([^/?#]+)")
 
 
 def check_css_globally_unique(repo_root, paths):
     """
     Checks that CSS filenames are sufficiently unique
@@ -296,19 +273,17 @@ def filter_whitelist_errors(data, errors
 
     if not errors:
         return []
 
     whitelisted = [False for item in range(len(errors))]
 
     for i, (error_type, msg, path, line) in enumerate(errors):
         normpath = os.path.normcase(path)
-        # Allow whitelisting all lint errors except the IGNORED PATH lint,
-        # which explains how to fix it correctly and shouldn't be ignored.
-        if error_type in data and error_type != "IGNORED PATH":
+        if error_type in data:
             wl_files = data[error_type]
             for file_match, allowed_lines in iteritems(wl_files):
                 if None in allowed_lines or line in allowed_lines:
                     if fnmatch.fnmatchcase(normpath, file_match):
                         whitelisted[i] = True
 
     return [item for i, item in enumerate(errors) if not whitelisted[i]]
 
@@ -860,20 +835,13 @@ def lint(repo_root, paths, output_format
             for line in (ERROR_MSG % (last[0], last[1], last[0], last[1])).split("\n"):
                 logger.info(line)
     return sum(itervalues(error_count))
 
 path_lints = [check_path_length, check_worker_collision, check_ahem_copy]
 all_paths_lints = [check_css_globally_unique]
 file_lints = [check_regexp_line, check_parsed, check_python_ast, check_script_metadata]
 
-# Don't break users of the lint that don't have git installed.
-try:
-    subprocess.check_output(["git", "--version"])
-    all_paths_lints += [check_git_ignore]
-except subprocess.CalledProcessError:
-    print('No git present; skipping .gitignore lint.')
-
 if __name__ == "__main__":
     args = create_parser().parse_args()
     error_count = main(**vars(args))
     if error_count > 0:
         sys.exit(1)
--- a/testing/web-platform/tests/webvr/idlharness.https.html
+++ b/testing/web-platform/tests/webvr/idlharness.https.html
@@ -198,20 +198,16 @@ partial interface Window {
   attribute EventHandler onvrdisplaydisconnect;
   attribute EventHandler onvrdisplayactivate;
   attribute EventHandler onvrdisplaydeactivate;
   attribute EventHandler onvrdisplayblur;
   attribute EventHandler onvrdisplayfocus;
   attribute EventHandler onvrdisplaypresentchange;
 };
 
-partial interface HTMLIFrameElement {
-  attribute boolean allowvr;
-};
-
 partial interface Gamepad {
   readonly attribute unsigned long displayId;
 };
 </script>
   </head>
   <body>
     <h1 class="instructions">Description</h1>
     <p class="instructions">