Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

annotate --delete doesn't respect ignore_unknown_models #964

Open
alexeyr-ci1 opened this issue Jul 29, 2022 · 0 comments
Open

annotate --delete doesn't respect ignore_unknown_models #964

alexeyr-ci1 opened this issue Jul 29, 2022 · 0 comments

Comments

@alexeyr-ci1
Copy link

alexeyr-ci1 commented Jul 29, 2022

I have a project where many files in app/models are not actually models. With 'ignore_unknown_models' => 'true' they are skipped by bin/annotate as expected, but

alexey@DESKTOP-41AVESA:~/shaka/blade$ bin/annotate -d
Traceback (most recent call last):
        6: from bin/annotate:29:in `<main>'
        5: from bin/annotate:29:in `load'
        4: from /home/alexey/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/annotate-3.2.0/bin/annotate:31:in `<top (required)>'
        3: from /home/alexey/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/annotate-3.2.0/lib/annotate/annotate_models.rb:699:in `remove_annotations'
        2: from /home/alexey/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/annotate-3.2.0/lib/annotate/annotate_models.rb:699:in `each'
        1: from /home/alexey/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/annotate-3.2.0/lib/annotate/annotate_models.rb:702:in `block in remove_annotations'
/home/alexey/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/annotate-3.2.0/lib/annotate/annotate_models.rb:585:in `get_model_class': file doesn't contain a valid model class (AnnotateModels::BadModelFileError)

Version

  • annotate version: 3.2.0
  • rails version: 6.1.5.1
  • ruby version: 2.7.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant