From fa3ee76946dd22670eefd144463f356d123aeab4 Mon Sep 17 00:00:00 2001 From: Jarek Potiuk Date: Sat, 18 Jan 2020 09:38:28 +0100 Subject: [PATCH] [AIRFLOW-XXXX] Increease verbosity of static checks in CI The latest version of pre-commit supports showing execution times for particular checks. This was a feature requested in https://github.com/pre-commit/pre-commit/issues/1144 and they finally implemented it after long time saying "no" :). This commit enables it with --verbose flag - which is also useful as it shows hook ids and some extra information printed by some plugins. --- .rat-excludes | 1 + scripts/ci/ci_run_all_static_tests.sh | 2 +- scripts/ci/pre_commit_check_license.sh | 4 +++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.rat-excludes b/.rat-excludes index 08c17506eeeaa..7b66e5144b4f5 100644 --- a/.rat-excludes +++ b/.rat-excludes @@ -4,6 +4,7 @@ .github/* .gitignore .gitattributes +.airflow_db_initialised .airflowignore .coverage .coveragerc diff --git a/scripts/ci/ci_run_all_static_tests.sh b/scripts/ci/ci_run_all_static_tests.sh index 5b59feb6acec1..3a27951e93cc2 100755 --- a/scripts/ci/ci_run_all_static_tests.sh +++ b/scripts/ci/ci_run_all_static_tests.sh @@ -44,6 +44,6 @@ rebuild_ci_image_if_needed IMAGES_TO_CHECK=("CI") export IMAGES_TO_CHECK -pre-commit run --all-files --show-diff-on-failure +pre-commit run --all-files --show-diff-on-failure --verbose script_end diff --git a/scripts/ci/pre_commit_check_license.sh b/scripts/ci/pre_commit_check_license.sh index bf63c18d1c2fd..8b3c1529d2349 100755 --- a/scripts/ci/pre_commit_check_license.sh +++ b/scripts/ci/pre_commit_check_license.sh @@ -22,4 +22,6 @@ MY_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" export FORCE_ANSWER_TO_QUESTIONS=${FORCE_ANSWER_TO_QUESTIONS:="quit"} export REMEMBER_LAST_ANSWER="true" -"${MY_DIR}/ci_check_license.sh" +# Hide lines between ****/**** (detailed list of files) +"${MY_DIR}/ci_check_license.sh" 2>&1 | \ + sed "/Files with Apache License headers will be marked AL.*$/,/^\**$/d"