Skip to content

Commit

Permalink
Shellcheck SC2001 error ignoring
Browse files Browse the repository at this point in the history
  • Loading branch information
KaganCanSit committed Jun 17, 2024
1 parent 0aa913d commit 684f003
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions linkChecker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ function find_links() {
# Scan all files in the directory
while IFS= read -r -d '' file; do
if [[ -f "$file" ]]; then
# When editing the warning specified for this section, functionality is disrupted. Based on the explanation on the Shellcheck page,
# I am disabling the check for now. Description: "Utilizing some of the more complex capabilities of sed is required occasionally, and it is safe to ignore SC2001."
# shellcheck disable=SC2001
links=$(grep -soPI 'https?:\/\/[\w\/:%#\$&\?\(\)~\.=\+\-]+(?![\w\/:%#\$&\?\(\)~\.=\+\-])' "$file")
if [[ -n "$links" ]]; then
while IFS= read -r link; do
Expand Down

0 comments on commit 684f003

Please sign in to comment.