Disable annotations of factories and specs in the entire project
Opened this issue · 1 comments
jedrekdomanski commented
The docs says
To annotate just your models:
annotate --models
but in fact this commands annotates models AND factories and specs unless you specify -exclude... option which is confusing.
I'd like to be able to disable annotations of factories and specs in the entire project in an initializer (not with an env var) so that running annotate --models
annotates just models as it should.
Commands
$ annotate --models
Version
- annotate (3.1.1)
- rails version 6.1.4
- ruby version 2.6.5
alexeyr-ci1 commented
In lib/tasks/auto_annotate_models.rake
, you can put
Annotate.set_defaults(
...,
'exclude_tests' => 'true',
'exclude_fixtures' => 'true',
'exclude_factories' => 'true',
'exclude_serializers' => 'true',
...
)
(all of them are false
by default).