sds / overcommit

A fully configurable and extendable Git hook manager
MIT License
3.92k stars 280 forks source link

FYI: unable to determine line number or type of error/warning for output: lockfile.rb #846

Open bmulholland opened 6 months ago

bmulholland commented 6 months ago

https://github.com/rubocop/rubocop/issues/12823 seems to cause an obscure error:

Unexpected output: unable to determine line number or type of error/warning for output:
/Users/bmulholland/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/rubocop-1.63.0/lib/rubocop/lockfile.rb:66:in `rescue in parser'
/Users/bmulholland/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/rubocop-1.63.0/lib/rubocop/lockfile.rb:60:in `parser'

Looks like they intend to fix that, but this error only happened on pre-commit hooks in overcommit, so posting here as an FYI.

bmulholland commented 6 months ago

As a workaround I made rubocop run using bundle exec with the config at https://github.com/sds/overcommit?tab=readme-ov-file#configuration