djezzzl/database_consistency

Misleading commandline help message

la-magra opened this issue · 3 comments

$ bundle exec database_consistency -h
  Usage: database_consistency install - run installation
         database_consistency [options]
    -c, --config=FILE                Use additional configuration file.
    -g, --generate-todo              Generate TODO file with every failing check disabled. You can pass existing configurations so the generated file will have only new failures.
    -f, --autofixix                  Automatically fixes issues by adjusting the code or generating missing migrations.
    -h, --help                       Prints this help.
$ bundle exec database_consistency -f
bundler: failed to load command: database_consistency (/home/***/.gem/ruby/3.1.3/bin/database_consistency)
/home/***/.gem/ruby/3.1.3/gems/database_consistency-1.5.1/bin/database_consistency:52:in `<top (required)>': missing argument: -f (OptionParser::MissingArgument)
...
$ bundle exec database_consistency --autofixix
bundler: failed to load command: database_consistency (/home/***/.gem/ruby/3.1.3/bin/database_consistency)
/home/***/.gem/ruby/3.1.3/gems/database_consistency-1.5.1/bin/database_consistency:52:in `<top (required)>': invalid option: --autofixix (OptionParser::InvalidOption)
Did you mean?  autofix
...

probably due to

opts.on('-fix', '--autofix', 'Automatically fixes issues by adjusting the code or generating missing migrations.') do
first parameter having two extra characters.

Hi @la-magra,

Thank you for using the gem and reporting the issue! Here is the fix: #165

It will be released by the end of today.

Released in 1.5.2. Thank you again! Have a great day!

Thank you, I wish you the same.