From 5f82de2e2a6a73fca3cedac17294478647c38029 Mon Sep 17 00:00:00 2001 From: SarahAlidoost Date: Tue, 1 Oct 2024 16:14:07 +0200 Subject: [PATCH] add mh_metric to GA workflow to check for global and persistent variables --- .github/workflows/lint.yml | 2 ++ miss_hit.cfg | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 65b80ac3..22e00721 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -32,3 +32,5 @@ jobs: run: mh_lint src/ --brief - name: Check style against standards run: mh_style src/ --brief + - name: Check global and persistent variables + run: mh_metric src/ --brief --ci diff --git a/miss_hit.cfg b/miss_hit.cfg index 01f5bbe0..a8948532 100644 --- a/miss_hit.cfg +++ b/miss_hit.cfg @@ -4,3 +4,11 @@ suppress_rule: "naming_functions" suppress_rule: "naming_parameters" suppress_rule: "naming_scripts" suppress_rule: "operator_after_continuation" +metric "globals": limit 0 +metric "persistent": limit 0 +metric "file_length": disable +metric "function_length": disable +metric "npath": disable +metric "cnest": disable +metric "parameters": disable +metric "cyc": disable