Skip to content

Commit

Permalink
Move METADATA validator to cobalt/tools
Browse files Browse the repository at this point in the history
This belongs to Cobalt; tools belongs to Chromium.

Issue: 150775273
Reviewed-on: #2732
  • Loading branch information
dahlstrom-g committed Mar 27, 2024
1 parent c854eb6 commit bcf1f77
Show file tree
Hide file tree
Showing 10 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ repos:
files: '.*\.gni?$'
- id: meta-validate
name: Validate METADATA files
entry: python -m tools.metadata.validate
entry: python -m cobalt.tools.metadata.validate
language: python
additional_dependencies:
- "protobuf"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def validate_content(textproto_content,
metadata_file_path='',
warn_deprecations=False):
# pylint: disable=import-outside-toplevel
from tools.metadata.gen import metadata_file_pb2
from cobalt.tools.metadata.gen import metadata_file_pb2
metadata = metadata_file_pb2.Metadata()
text_format.Parse(textproto_content, metadata)
if not metadata.name:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
""" Cobalt Metadata tests."""
import unittest
import os
from tools.metadata.validate import validate_content, validate_file
from cobalt.tools.metadata.validate import validate_content, validate_file


class TestMetadata(unittest.TestCase):
Expand Down

0 comments on commit bcf1f77

Please sign in to comment.