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

refactor start script and add option for custom coverage result path #158

Merged
merged 1 commit into from
Nov 30, 2016

Conversation

repomaa
Copy link
Contributor

@repomaa repomaa commented Nov 24, 2016

Fixes #143

@repomaa repomaa force-pushed the topic/custom_coverage_dir branch 2 times, most recently from 69d2a41 to 9d9c7ec Compare November 24, 2016 09:35

COVERAGE_FILE = "coverage/.resultset.json".freeze
Copy link
Contributor

Choose a reason for hiding this comment

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

I do like the improvements in this PR and am happy to continue reviewing it as-is, but before I do so, what would you think of solving this issue with a smaller, and perhaps even more flexible change of:

COVERAGE_FILE = ARGV.first || "coverage/.resultset.json".freeze

?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, no problem. Using option parser is maybe premature at this point. I'll update the pr.

@repomaa repomaa force-pushed the topic/custom_coverage_dir branch 2 times, most recently from 16849d1 to 6ebbf50 Compare November 30, 2016 15:43
@repomaa repomaa changed the title refactor start script and add option for custom coverage directory refactor start script and add option for custom coverage result path Nov 30, 2016
$stderr.puts "Error encountered while parsing #{COVERAGE_FILE}: #{e}"
exit(1)
end
abort "Coverage results not found" unless File.exist?(COVERAGE_FILE)
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you either user parens here, or don't use them at L18?

Our in-house style is to use parens except in special cases (e.g. puts). I think I'd consider abort a special case (so no parens needed), but since it's not clear in our style guide, you can decide.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

alright. I'd argue that abort is similar to puts and shouldn't be wrapped in parens, so i'll remove them in L18

@repomaa repomaa force-pushed the topic/custom_coverage_dir branch from 4c6e92d to cb6a305 Compare November 30, 2016 16:54
@pbrisbin pbrisbin merged commit 58e7158 into codeclimate:master Nov 30, 2016
@repomaa repomaa deleted the topic/custom_coverage_dir branch December 1, 2016 09:17
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

Successfully merging this pull request may close these issues.

2 participants