summaryrefslogtreecommitdiff
path: root/Meta/lint-ci.sh
diff options
context:
space:
mode:
authorBen Wiederhake <BenWiederhake.GitHub@gmx.de>2021-10-26 23:49:28 +0200
committerBrian Gianforcaro <b.gianfo@gmail.com>2021-10-27 11:35:47 -0700
commita6ccf6659a706eb985cf5e62cd8e8db05ab18ab9 (patch)
treea10e10db7af1ab76097c6c76bbb3819ccd14173e /Meta/lint-ci.sh
parent074ce35b3707e23bb02ad4e14694a3113d1a2e4f (diff)
downloadserenity-a6ccf6659a706eb985cf5e62cd8e8db05ab18ab9.zip
Meta: Reimplement license checker in python
On my machine, this script took about 3.4 seconds, and was responsible for essentially all of the time taken by the precommit hook. The script is a faithful 1:1 reimplementation, even the regexes are identical. And yet, it takes about 0.02 seconds, making the pre-commit hook lightning fast again. Apparently python is just faster in this case. Fun fact: - Just reading all ~4000 files took bash about 1.2 seconds - Checking the license took another 1.8 seconds in total - Checking for math.h took another 0.4 seconds in total - Checking for '#pragma once' took another 0.4 seconds in total The timing is highly load-dependent, so they don't exactly add up to 3.4 seconds. However, it's good enough to determine that bash is no longer fit for the purpose of this script.
Diffstat (limited to 'Meta/lint-ci.sh')
-rwxr-xr-xMeta/lint-ci.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/Meta/lint-ci.sh b/Meta/lint-ci.sh
index 452db6902b..785be689d8 100755
--- a/Meta/lint-ci.sh
+++ b/Meta/lint-ci.sh
@@ -24,7 +24,7 @@ for cmd in \
Meta/check-debug-flags.sh \
Meta/check-markdown.sh \
Meta/check-newlines-at-eof.py \
- Meta/check-style.sh \
+ Meta/check-style.py \
Meta/lint-executable-resources.sh \
Meta/lint-ipc-ids.sh \
Meta/lint-keymaps.py \