summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorHervé Beraud <hberaud@redhat.com>2020-07-21 13:39:30 +0200
committerHervé Beraud <hberaud@redhat.com>2020-09-15 17:10:31 +0200
commit2f4cb354f773d1236289bd7e0e00cdc5cea30020 (patch)
tree40c8c49350479edbec58c12c0f7563a60004e8cd /tools
parentaaf3a726ba8a941ee1c834e4be7acd68516b4362 (diff)
downloadoslotest-2f4cb354f773d1236289bd7e0e00cdc5cea30020.tar.gz
Adding pre-commit
Introduced changes: - pre-commit config and rules - Add pre-commit to pep8 gate, Flake8 is covered in the pre-commit hooks. - Applying fixes for pre-commit compliance in all code. Also commit hash will be used instead of version tags in pre-commit to prevend arbitrary code from running in developer's machines. pre-commit will be used to: - trailing whitespace; - Replaces or checks mixed line ending (mixed-line-ending); - Forbid files which have a UTF-8 byte-order marker (check-byte-order-marker); - Checks that non-binary executables have a proper shebang (check-executables-have-shebangs); - Check for files that contain merge conflict strings (check-merge-conflict); - Check for debugger imports and py37+ breakpoint() calls in python source (debug-statements); - Attempts to load all yaml files to verify syntax (check-yaml); - Run flake8 checks (flake8) (local) For further details about tests please refer to: https://github.com/pre-commit/pre-commit-hooks Change-Id: Icd2a9bded756b2bcba1fb7da6abe48503fd9b2d6 Signed-off-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/oslo_run_pre_release_tests7
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/oslo_run_pre_release_tests b/tools/oslo_run_pre_release_tests
index 4fc0d5c..378a0db 100755
--- a/tools/oslo_run_pre_release_tests
+++ b/tools/oslo_run_pre_release_tests
@@ -26,8 +26,7 @@ import pkg_resources
def find_all_projects(repo_root):
- """Scan the checked out repositories for all available projects.
- """
+ """Scan the checked out repositories for all available projects."""
pattern = os.path.join(repo_root, 'openstack/*')
candidates = glob.glob(pattern)
prefix_len = len(repo_root)
@@ -39,7 +38,9 @@ def find_all_projects(repo_root):
def find_consuming_projects(lib_name, repo_root, projects):
- """Filter the list of projects to only include entries that use the library.
+ """Filter the list of projects
+
+ Filter the list of projects to only include entries that use the library.
"""
for p in projects:
consumer = False