Skip to content

Commit

Permalink
Add ignore SC2002 for IMHO stylistic concern -- here it is useful sin…
Browse files Browse the repository at this point in the history
…ce long line

shellcheck was complaining

	In contrib/messages_json_parsing/jq/find_matches_print_dates_and_text.sh line 5:
	cat "${SAMPLE}" | jq '.messages[] | select(( .text != null) and (.text | test("JoInEd";"i"))) | (.ts |= (tonumber|todate)) | .ts, .text' | tr -d '"'
		^---------^ SC2002 (style): Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead.

	In contrib/messages_json_parsing/jq/print_messages.sh line 5:
	cat "${SAMPLE}" | jq '.messages[]|.user +": "+.text' | tr -d '"'
		^---------^ SC2002 (style): Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead.
  • Loading branch information
yarikoptic committed Mar 1, 2024
1 parent 59e8e32 commit 37e2a05
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@

SAMPLE=../../sample.json

# shellcheck disable=SC2002
cat "${SAMPLE}" | jq '.messages[] | select(( .text != null) and (.text | test("JoInEd";"i"))) | (.ts |= (tonumber|todate)) | .ts, .text' | tr -d '"'
1 change: 1 addition & 0 deletions contrib/messages_json_parsing/jq/print_messages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@

SAMPLE=../../sample.json

# shellcheck disable=SC2002
cat "${SAMPLE}" | jq '.messages[]|.user +": "+.text' | tr -d '"'

0 comments on commit 37e2a05

Please sign in to comment.