@@ -13,16 +13,16 @@ source "${SCRIPT_DIR}/../utils/colors.sh"
1313
1414# Base linters
1515LINTERS=(
16- " Commits|conform|${LINTERS_DIR} / commits.sh "
17- " Secrets|gitleaks|${LINTERS_DIR} / secrets.sh "
18- " YAML|yamlfmt|${LINTERS_DIR} /yaml.sh check "
19- " Markdown|rumdl|${LINTERS_DIR} /markdown.sh check "
20- " Shell Scripts|shellcheck|${LINTERS_DIR} / shell.sh "
21- " Shell Format|shfmt|${LINTERS_DIR} / shell-fmt.sh check "
22- " GitHub Actions|actionlint|${LINTERS_DIR} /github -actions.sh "
23- " License|reuse|${LINTERS_DIR} / license.sh "
24- " Containers|hadolint|${LINTERS_DIR} / container.sh "
25- " XML|xmllint|${LINTERS_DIR} / xml.sh "
16+ " Commits|conform|just lint- commits"
17+ " Secrets|gitleaks|just lint- secrets"
18+ " YAML|yamlfmt|just lint-yaml "
19+ " Markdown|rumdl|just lint-markdown "
20+ " Shell Scripts|shellcheck|just lint- shell"
21+ " Shell Format|shfmt|just lint- shell-fmt"
22+ " GitHub Actions|actionlint|just lint -actions"
23+ " License|reuse|just lint- license"
24+ " Containers|hadolint|just lint- container"
25+ " XML|xmllint|just lint- xml"
2626)
2727
2828declare -A RESULTS
@@ -31,48 +31,26 @@ detect_language_linters() {
3131 local recipes
3232 recipes=$( just --list 2>&1 || true)
3333
34- # Java linters - if lint-java exists, use it (calls scripts directly to show each row)
35- # Otherwise use individual recipes if they exist
36- if grep -qE " ^\s+lint-java\s" <<< " $recipes" ; then
37- local java_lint_dir=" $( dirname " ${SCRIPT_DIR} " ) /linters/java"
38- if [[ -d " $java_lint_dir " ]]; then
39- LINTERS+=(" Java Checkstyle|checkstyle|${java_lint_dir} /checkstyle.sh" )
40- LINTERS+=(" Java PMD|pmd|${java_lint_dir} /pmd.sh" )
41- LINTERS+=(" Java SpotBugs|spotbugs|${java_lint_dir} /spotbugs.sh" )
42- fi
43- else
44- # No lint-java, check for individual recipes
45- if grep -qE " ^\s+lint-java-checkstyle\s" <<< " $recipes" ; then
46- LINTERS+=(" Java Checkstyle|checkstyle|just lint-java-checkstyle" )
47- fi
48- if grep -qE " ^\s+lint-java-pmd\s" <<< " $recipes" ; then
49- LINTERS+=(" Java PMD|pmd|just lint-java-pmd" )
50- fi
51- if grep -qE " ^\s+lint-java-spotbugs\s" <<< " $recipes" ; then
52- LINTERS+=(" Java SpotBugs|spotbugs|just lint-java-spotbugs" )
53- fi
34+ # Java linters - check for individual recipes
35+ if grep -qE " ^\s+lint-java-checkstyle(\s|#|$)" <<< " $recipes" ; then
36+ LINTERS+=(" Java Checkstyle|checkstyle|just lint-java-checkstyle" )
37+ fi
38+ if grep -qE " ^\s+lint-java-pmd(\s|#|$)" <<< " $recipes" ; then
39+ LINTERS+=(" Java PMD|pmd|just lint-java-pmd" )
40+ fi
41+ if grep -qE " ^\s+lint-java-spotbugs(\s|#|$)" <<< " $recipes" ; then
42+ LINTERS+=(" Java SpotBugs|spotbugs|just lint-java-spotbugs" )
5443 fi
5544
56- # Node linters - if lint-node exists, use it (calls scripts directly to show each row)
57- # Otherwise use individual recipes if they exist
58- if grep -qE " ^\s+lint-node\s" <<< " $recipes" ; then
59- local node_lint_dir=" $( dirname " ${SCRIPT_DIR} " ) /linters/node"
60- if [[ -d " $node_lint_dir " ]]; then
61- LINTERS+=(" Node ESLint|eslint|${node_lint_dir} /eslint.sh" )
62- LINTERS+=(" Node Format|prettier|${node_lint_dir} /format.sh check" )
63- LINTERS+=(" Node Types|tsc|${node_lint_dir} /types.sh" )
64- fi
65- else
66- # No lint-node, check for individual recipes
67- if grep -qE " ^\s+lint-node-eslint\s" <<< " $recipes" ; then
68- LINTERS+=(" Node ESLint|eslint|just lint-node-eslint" )
69- fi
70- if grep -qE " ^\s+lint-node-format\s" <<< " $recipes" ; then
71- LINTERS+=(" Node Format|prettier|just lint-node-format" )
72- fi
73- if grep -qE " ^\s+lint-node-ts-types\s" <<< " $recipes" ; then
74- LINTERS+=(" Node Types|tsc|just lint-node-ts-types" )
75- fi
45+ # Node linters - check for individual recipes
46+ if grep -qE " ^\s+lint-node-eslint(\s|#|$)" <<< " $recipes" ; then
47+ LINTERS+=(" Node ESLint|eslint|just lint-node-eslint" )
48+ fi
49+ if grep -qE " ^\s+lint-node-format(\s|#|$)" <<< " $recipes" ; then
50+ LINTERS+=(" Node Format|prettier|just lint-node-format" )
51+ fi
52+ if grep -qE " ^\s+lint-node-ts-types(\s|#|$)" <<< " $recipes" ; then
53+ LINTERS+=(" Node Types|tsc|just lint-node-ts-types" )
7654 fi
7755}
7856
0 commit comments