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 Options for MetricValidator #99

Merged
merged 5 commits into from
May 6, 2021
Merged

Add Options for MetricValidator #99

merged 5 commits into from
May 6, 2021

Conversation

kristinapathak
Copy link
Contributor

@kristinapathak kristinapathak commented May 6, 2021

fixes #87

Did some other stuff too:

  • Changed some hardcoded strings for metric values to be consts declared in metrics.go.
  • Removed Partner from ParsedValues since no one is using it. I kept the struct, even though it has only one value, to make it easier to add values in a backwards-compatible way in the future.
  • Moved some code to new files so metricvalidator.go doesn't get too big (it's still pretty big 👀).
  • Updated metricValidator's prepMetrics() function to return a struct instead of a bunch of individual strings.
  • Fixed up ProvideMetricValidator() so it actually kind of works.

@kristinapathak kristinapathak added enhancement New feature or request validator labels May 6, 2021
@kristinapathak kristinapathak added this to the Unreleased milestone May 6, 2021
@kristinapathak kristinapathak requested a review from joe94 May 6, 2021 17:35
@codecov
Copy link

codecov bot commented May 6, 2021

Codecov Report

Merging #99 (e0ec01b) into main (21f7b47) will increase coverage by 1.03%.
The diff coverage is 91.42%.

❗ Current head e0ec01b differs from pull request most recent head 0e36e95. Consider uploading reports for the commit 0e36e95 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##             main      #99      +/-   ##
==========================================
+ Coverage   67.77%   68.81%   +1.03%     
==========================================
  Files          35       38       +3     
  Lines         962      978      +16     
==========================================
+ Hits          652      673      +21     
+ Misses        291      286       -5     
  Partials       19       19              
Impacted Files Coverage Δ
basculechecks/errors.go 100.00% <ø> (ø)
basculechecks/metrics.go 0.00% <ø> (ø)
basculechecks/provide.go 0.00% <0.00%> (ø)
basculechecks/metricoptions.go 100.00% <100.00%> (ø)
basculechecks/metricvalidator.go 100.00% <100.00%> (+10.89%) ⬆️
basculechecks/parse.go 100.00% <100.00%> (ø)

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 21f7b47...0e36e95. Read the comment docs.

Copy link
Member

@joe94 joe94 left a comment

Choose a reason for hiding this comment

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

Looks great! 🚀

@sonarcloud
Copy link

sonarcloud bot commented May 6, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

91.9% 91.9% Coverage
0.0% 0.0% Duplication

@kristinapathak kristinapathak merged commit 4df8762 into main May 6, 2021
@kristinapathak kristinapathak deleted the options branch May 6, 2021 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request validator
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Options for MetricValidator
2 participants