diff --git a/.rubocop.yml b/.rubocop.yml index 93ef4249..7880245e 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -14,15 +14,16 @@ AllCops: - "examples/**/*.rb" - "*.rb" Exclude: - - "*.erb" - - "*.lua" + - "**/*.erb" + - "**/.DS_Store" + - "**/*.lua" - "assets/**/*" - "bin/**/*" - "doc/**/*" - "docs/**/*" - - "lib/tasks/**/*" - "lib/sidekiq_unique_jobs/lua/**/*" - "lib/sidekiq_unique_jobs/web/views/**/*" + - "lib/tasks/**/*" - "myapp/**/*" - "Sidekiq/**/*" - "vendor/**/*" diff --git a/testutf8.sh b/testutf8.sh new file mode 100644 index 00000000..bbe2796d --- /dev/null +++ b/testutf8.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +# Loop through all files in the repository +find ./lib -type f | while read file; do + # if ! rubocop $file > /dev/null 2>&1; then + # echo "Invalid UTF-8 in file: $file" + # fi + + # Attempt to convert the file encoding from UTF-8 to UTF-8, checking for invalid sequences + if ! iconv -f UTF-8 -t UTF-8 "$file" > /dev/null 2>&1; then + # If iconv exits with a non-zero status, the file contains invalid UTF-8 sequences + echo "Invalid UTF-8 in file: $file" + fi +done