tsabend / fus

Find unused Swift classes
MIT License
319 stars 14 forks source link

Argument error during `fus find` #23

Open filletofish opened 6 years ago

filletofish commented 6 years ago

Thank you for your tool!

Unfortunately I have received this error after launching fus find in root directory of my project.

/Library/Ruby/Gems/2.3.0/gems/fus-0.0.3/lib/fus/swift_class.rb:26:in `match': invalid byte sequence in UTF-8 (ArgumentError)
    from /Library/Ruby/Gems/2.3.0/gems/fus-0.0.3/lib/fus/swift_class.rb:26:in `match'
    from /Library/Ruby/Gems/2.3.0/gems/fus-0.0.3/lib/fus/swift_class.rb:26:in `used_in_obj_c?'
    from /Library/Ruby/Gems/2.3.0/gems/fus-0.0.3/lib/fus/finder.rb:69:in `block in used_in_obj_c?'
    from /Library/Ruby/Gems/2.3.0/gems/fus-0.0.3/lib/fus/finder.rb:69:in `any?'
    from /Library/Ruby/Gems/2.3.0/gems/fus-0.0.3/lib/fus/finder.rb:69:in `used_in_obj_c?'
    from /Library/Ruby/Gems/2.3.0/gems/fus-0.0.3/lib/fus/finder.rb:48:in `block in unused_classes'
    from /Library/Ruby/Gems/2.3.0/gems/fus-0.0.3/lib/fus/finder.rb:44:in `reject'
    from /Library/Ruby/Gems/2.3.0/gems/fus-0.0.3/lib/fus/finder.rb:44:in `unused_classes'
    from /Library/Ruby/Gems/2.3.0/gems/fus-0.0.3/lib/fus/finder.rb:21:in `unused_classnames'
    from /Library/Ruby/Gems/2.3.0/gems/fus-0.0.3/bin/fus:14:in `find'
    from /Library/Ruby/Gems/2.3.0/gems/thor-0.20.0/lib/thor/command.rb:27:in `run'
    from /Library/Ruby/Gems/2.3.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command'
    from /Library/Ruby/Gems/2.3.0/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch'
    from /Library/Ruby/Gems/2.3.0/gems/thor-0.20.0/lib/thor/base.rb:466:in `start'
    from /Library/Ruby/Gems/2.3.0/gems/fus-0.0.3/bin/fus:34:in `<top (required)>'
    from /usr/local/bin/fus:22:in `load'
    from /usr/local/bin/fus:22:in `<main>'