seattlerb / debride

Analyze code for potentially uncalled / dead methods, now with auto-removal.
https://www.zenspider.com/projects/debride.html
720 stars 19 forks source link

skip parsing file when file contains non escaped no ASCII charactor. #35

Closed sizer closed 6 years ago

sizer commented 7 years ago

connected to: #34 Should rescue RegexpError while parsing file.

I resolve it.

updated log is below.

$ rake run D="./throw_regexperror_sample.rb"
WARNING: invalid multibyte character: /\【/ for "\\【" ""
WARNING: trying to recover with ENC_UTF8
WARNING: trying to recover with ENC_NONE
  skipping ./throw_regexperror_sample.rb: /.../n has a non escaped non ASCII character in non ASCII-8BIT script: /\【/
These methods MIGHT not be called:
zenspider commented 6 years ago

I caught in a slightly lower spot, since this is ruby-only. Thanks for the PR tho!