Skip all config when use with --gen-config.

This commit is contained in:
Billy.Zheng 2023-03-08 21:35:31 +08:00
parent 3fbbe3986e
commit d45285d1c9
3 changed files with 15 additions and 3 deletions

View file

@ -82,6 +82,12 @@ module Ameba::Cli
c.colors?.should be_true
end
it "ignores --config if --gen-config flag passed" do
c = Cli.parse_args %w(--gen-config --config my_config.yml)
c.formatter.should eq :todo
c.skip_reading_config?.should be_true
end
describe "-e/--explain" do
it "configures file/line/column" do
c = Cli.parse_args %w(--explain src/file.cr:3:5)