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

add ignore flag #80

Merged
merged 1 commit into from
Jun 27, 2018
Merged

add ignore flag #80

merged 1 commit into from
Jun 27, 2018

Conversation

ruseinov
Copy link
Contributor

a quick fix needed to sort pod restarts

@ruseinov ruseinov requested a review from ethanfrey June 27, 2018 11:18
@ruseinov
Copy link
Contributor Author

This is to propagate these changes to bov.

@ruseinov ruseinov requested a review from alpe June 27, 2018 11:19
@codecov
Copy link

codecov bot commented Jun 27, 2018

Codecov Report

Merging #80 into master will increase coverage by 0.4%.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           master     #80     +/-   ##
========================================
+ Coverage    77.6%   78.1%   +0.4%     
========================================
  Files          56      56             
  Lines        2449    2398     -51     
========================================
- Hits         1902    1874     -28     
+ Misses        444     425     -19     
+ Partials      103      99      -4
Impacted Files Coverage Δ
x/errors.go 50% <0%> (-12.5%) ⬇️
app/genesis.go 0% <0%> (ø) ⬆️
tx.go 0% <0%> (ø) ⬆️
orm/index.go 75.2% <0%> (+0.5%) ⬆️
app/commit.go 79.3% <0%> (+2.8%) ⬆️
x/persistent.go 91.3% <0%> (+3.8%) ⬆️
x/sigs/errors.go 83.3% <0%> (+8.3%) ⬆️
app/results.go 64.2% <0%> (+12.5%) ⬆️
x/sigs/context.go 45.4% <0%> (+16.8%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b0d1bc2...4e1c1a6. Read the comment docs.

Copy link
Contributor

@alpe alpe left a comment

Choose a reason for hiding this comment

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

🌷 thanks, very much appreciated!
Please add tests for a quick feedback cycle in the future

Copy link
Contributor

@ethanfrey ethanfrey left a comment

Choose a reason for hiding this comment

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

Looks good and sensible change.
This file starts to need some cleanup and better comments on the growing flags, but that can be a later PR, just mentioned it now to think about.

@@ -33,14 +34,16 @@ Usage:
xxx init -all=f // no index
xxx init -tags=foo,bar // index only foo and bar
*/
func parseIndex(args []string) (bool, bool, string, []string, error) {
func parseIndex(args []string) (bool, bool, string, bool, []string, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

As the number of return values go, let's consider returning a struct with named fields, eg.

type flags struct {
  indexAll bool
  force bool
  tags string
  ignore bool
  args []string
}

or maybe keep args separate, but at least the flags together

// parse flagIndexAll, flagIndexTags and return the result
indexFlags := flag.NewFlagSet("init", flag.ExitOnError)
tags := indexFlags.String(flagIndexTags, "", "comma-separated list of tags to index")
all := indexFlags.Bool(flagIndexAll, true, "")
force := indexFlags.Bool(FlagForce, false, "")
ignore := indexFlags.Bool(FlagIgnore, false, "")
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe add an explanation here?

@ethanfrey ethanfrey merged commit af40199 into master Jun 27, 2018
@ethanfrey ethanfrey deleted the feature/ignore-reinit branch June 27, 2018 12:23
@ruseinov ruseinov mentioned this pull request Jun 27, 2018
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.

3 participants