style: Refactor the style checker as a Python package
authorAndreas Sandberg <andreas.sandberg@arm.com>
Wed, 30 Mar 2016 14:30:32 +0000 (15:30 +0100)
committerAndreas Sandberg <andreas.sandberg@arm.com>
Wed, 30 Mar 2016 14:30:32 +0000 (15:30 +0100)
commit2580fcd9d79e2be5933c2575ce1a6eb26380f8a5
treeaf2a53678e963c06f63972ddd77363d5ea55f8c0
parent062b6c4c9db83c91ef475b09425a1b844d93c72a
style: Refactor the style checker as a Python package

Refactor the style checker into a Python module that can be reused by
command line tools that integrate with git. In particular:

  * Create a style package in util
  * Move style validators from style.py to the style/validators.py.
  * Move style verifiers from style.py to the style/verifiers.py.
  * Move utility functions (sort_includes, region handling,
    file_types) into the style package
  * Move generic code from style.py to style/style.py.

Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Curtis Dunham <curtis.dunham@arm.com>
Reviewed-by: Steve Reinhardt <steve.reinhardt@amd.com>
--HG--
rename : util/style.py => util/hgstyle.py
rename : util/sort_includes.py => util/style/sort_includes.py
extra : rebase_source : ad6cf9b9a18c48350dfc7b7c77bea6c5344fb53c
12 files changed:
src/python/m5/util/__init__.py
src/python/m5/util/region.py [deleted file]
util/file_types.py
util/hgstyle.py
util/sort_includes.py [deleted file]
util/style/__init__.py [new file with mode: 0644]
util/style/file_types.py [new file with mode: 0644]
util/style/region.py [new file with mode: 0644]
util/style/sort_includes.py [new file with mode: 0644]
util/style/style.py [new file with mode: 0644]
util/style/validators.py [new file with mode: 0644]
util/style/verifiers.py [new file with mode: 0644]