<commit_before>#!/bin/bash

cd "$(dirname "${BASH_SOURCE[0]}")/.." \
    || exit 1

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

./.travis/is-master.sh \
    || exit 0

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

gem install awesome_bot \
    && find . -name "*.md" \
              -not -path "./node_modules/*" \
              -not -path "./dist/*" \
              -not -path "./coverage/*" \
              -exec awesome_bot \
                        --allow-dupe \
                        --allow-redirect \
                        --set-timeout 150 \
                        --white-list "example1.com,example2.com,example3.com,github.com/sonarwhal/" \
                        {} +;
exitCode=$?

node .travis/report-broken-links.js

exit $exitCode
<commit_msg>Build: Make cron job not fail because broken links<commit_after>#!/bin/bash

cd "$(dirname "${BASH_SOURCE[0]}")/.." \
    || exit 1

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

./.travis/is-master.sh \
    || exit 0

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

gem install awesome_bot \
    && find . -name "*.md" \
              -not -path "./node_modules/*" \
              -not -path "./dist/*" \
              -not -path "./coverage/*" \
              -exec awesome_bot \
                        --allow-dupe \
                        --allow-redirect \
                        --set-timeout 150 \
                        --white-list "example1.com,example2.com,example3.com,github.com/sonarwhal/" \
                        {} +;

node .travis/report-broken-links.js

{'fraction_non_alphanumeric': 0.22255912674348088, 'fraction_numerical': 0.010915706488781079, 'mean_word_length': 0.795429815016322, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '7210581', 'n_tokens_mistral': 588, 'n_tokens_neox': 560, 'n_words': 79}