<commit_before>#!/bin/bash

cd "$(dirname "${BASH_SOURCE[0]}")" \
    && source "../src/os/utils.sh"

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

main() {

    # Install "ShellCheck" if needed

    if ! cmd_exists "shellcheck"; then
        brew install shellcheck &> /dev/null
        print_result $? "Install ShellCheck"
    fi

    # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    find \
        ../test \
        ../src/os \
        ../src/shell \
        ../src/os \
        -type f \
        ! -path '../src/shell/curlrc' \
        ! -path '../src/shell/inputrc' \
        ! -path '../src/shell/screenrc' \
        ! -path '../src/shell/tmux.conf' \
        ! -path '../src/os/os_x/preferences/set_custom_terminal_theme.scpt' \
        ! -path '../src/os/os_x/preferences/solarized_dark.terminal' \
        -exec shellcheck \
                -x \
                -e SC1090 \
                -e SC1091 \
                -e SC2155 \
        {} + &> /dev/null

    print_result $? "Run code through ShellCheck"

}

main<commit_msg>✅ Don't suppress output from ShellCheck<commit_after>#!/bin/bash

cd "$(dirname "${BASH_SOURCE[0]}")" \
    && source "../src/os/utils.sh"

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

main() {

    # Install "ShellCheck" if needed

    if ! cmd_exists "shellcheck"; then
        brew install shellcheck &> /dev/null
        print_result $? "Install ShellCheck"
    fi

    # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    # ' At first you're like "shellcheck is awesome" but then you're
    #   like "wtf are we still using bash" '
    #
    #  (from: https://twitter.com/astarasikov/status/568825996532707330)

    find \
        ../test \
        ../src/os \
        ../src/shell \
        ../src/os \
        -type f \
        ! -path '../src/shell/curlrc' \
        ! -path '../src/shell/inputrc' \
        ! -path '../src/shell/screenrc' \
        ! -path '../src/shell/tmux.conf' \
        ! -path '../src/os/os_x/preferences/set_custom_terminal_theme.scpt' \
        ! -path '../src/os/os_x/preferences/solarized_dark.terminal' \
        -exec shellcheck \
                -x \
                -e SC1090 \
                -e SC1091 \
                -e SC2155 \
        {} +

    print_result $? "Run code through ShellCheck"

}

main
{'fraction_non_alphanumeric': 0.20075598488030238, 'fraction_numerical': 0.018479630407391853, 'mean_word_length': 1.080349344978166, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 16, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7212086', 'n_tokens_mistral': 896, 'n_tokens_neox': 839, 'n_words': 138}