From d7302236417e3e88a715583f286e218493199dd3 Mon Sep 17 00:00:00 2001 From: lucasskvn Date: Mon, 7 Jul 2025 14:49:21 +0200 Subject: init --- cs | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100755 cs (limited to 'cs') diff --git a/cs b/cs new file mode 100755 index 0000000..4e9cc95 --- /dev/null +++ b/cs @@ -0,0 +1,40 @@ +#!/usr/bin/env bash + +ruleset_dir="$HOME/scripts/banana-coding-style-checker/vera" + +start_time=$(date +%s) +if [ -z "$1" ]; then + project_dir=$(pwd) +else + project_dir="$1" +fi +echo "Running norm in $project_dir" + +count=$(find "$project_dir" \ + -type f \ + -not -path "*/.git/*" \ + -not -path "*/.idea/*" \ + -not -path "*/.vscode/*" \ + -not -path "bonus/*" \ + -not -path "tests/*" \ + -not -path "/*build/*" \ + -not -path "\#*\#" \ + -not -path "*\~" \ + | vera++ \ + --profile epitech \ + --root $ruleset_dir \ + --error \ + 2>&1 \ + | sed "s|$project_dir/||" \ + | tee /dev/tty | wc -l +) + +end_time=$(date +%s) + +echo "Found $count issues" +echo "Ran in $((end_time - start_time))s" + +if [ $count -gt 0 ]; then + exit 1 +fi +exit 0 -- cgit v1.2.3