Skip to content

Commit

Permalink
ignore inline comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jvnipers committed Feb 5, 2025
1 parent 681eb01 commit 88887a2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/check-quotes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ check_file() {

[[ -z "$line" || "$line" =~ ^[[:space:]]*([{}]|//) ]] && continue

local cleaned_line=$(echo "$line" | sed 's/\\"/X/g')
local line_without_comment=$(echo "$line" | sed 's/\/\/.*$//')
local cleaned_line=$(echo "$line_without_comment" | sed 's/\\"/X/g')
local quote_count=$(echo "$cleaned_line" | tr -cd '"' | wc -c)

if [[ $quote_count -eq 2 ]]; then
Expand Down

0 comments on commit 88887a2

Please sign in to comment.