diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9a2b256a5c22..1c4929a41609 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -206,9 +206,9 @@ repos: files: '.*\.gni?$' - id: meta-validate name: Validate METADATA files - entry: python tools/metadata/validate.py + entry: python -m tools.metadata.validate language: python additional_dependencies: - "protobuf" always_run: true - pass_filenames: true + pass_filenames: false diff --git a/base/METADATA b/base/METADATA index 6a30c572c567..1b6392c0d6c1 100644 --- a/base/METADATA +++ b/base/METADATA @@ -18,3 +18,4 @@ third_party { day: 23 } } +break this this too diff --git a/tools/metadata/validate.py b/tools/metadata/validate.py index f2e181a8d5a3..f8679a2de4f3 100644 --- a/tools/metadata/validate.py +++ b/tools/metadata/validate.py @@ -70,11 +70,11 @@ def update_proto(): def filter_files(path): - if not path.endswith('/METADATA'): + if not path.endswith(os.path.sep + 'METADATA'): return False - if '.dist-info/' in path: + if '.dist-info' in path: return False # Python packaging files - if 'skia/site' in path: + if os.path.join('skia', 'site') in path: return False # Different upstream files return True