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

Fix YAML configuration file 'formats' processing #316

Merged
merged 1 commit into from
Oct 13, 2019

Conversation

cvoltz
Copy link
Contributor

@cvoltz cvoltz commented Aug 2, 2019

Fixes: Ignores .rubycritic.yml file #303

See #303 for details of the problem and why each of the changes were made.

Fixes: Ignores .rubycritic.yml file whitesmith#303
whitesmith#303.

Update the documentation to indicate that the key in the
.rubycritic.yml configuration file which controls the output
format is 'formats' rather than 'format'.

Fix a bug in RubyCritic::Cli::Options#to_h which prevents a
setting in the YAML configuration file from being used when the
setting is an Array (as is the case for the output formats).

Modify RubyCritic::CLI::Options::File#formats to return an array
of symbols instead of an array of strings, to be consistent with
how RubyCritic::CLI::Options::Argv#parse returns the array. Also
modify it so it can accept a single output format or a list of
formats. The documentation indicates that either is acceptable
but the code assumed the input was always an array.

Signed-off-by: Christopher Voltz <[email protected]>
Copy link
Collaborator

@etagwerker etagwerker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cvoltz Looks good! 👍

Copy link
Collaborator

@nunosilva800 nunosilva800 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is awesome! Nice work digging into it and figuring it out 🚀

@nunosilva800 nunosilva800 merged commit c38db34 into whitesmith:master Oct 13, 2019
@nunosilva800 nunosilva800 added the Hacktoberfest https://hacktoberfest.digitalocean.com label Oct 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Hacktoberfest https://hacktoberfest.digitalocean.com
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants