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

Upgrade to go 1.16, use go:embed for loading default rules #60

Merged
merged 10 commits into from
Mar 27, 2021

Conversation

caitlinelfring
Copy link
Member

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Feature / internal update

What is the current behavior? (You can also link to an open issue here)
Go 1.16 introduced the embed package to embed files directly into a go problem. I've wanted to use this since I started woke for defining and configuring the default rules. Now that go 1.16 is out, I've switched the loading of the default rules from a pre-compile go generate to the embed package. Read more here and here

What is the new behavior (if this is a feature change)?
No new behavior on the user side, but you only need to update the default.yaml file to update default rules now.

Does this PR introduce a breaking change? (What changes might users need to make due to this PR?)
No

Other information:

@codecov
Copy link

codecov bot commented Mar 24, 2021

Codecov Report

Merging #60 (32c93e1) into main (67219f0) will decrease coverage by 0.39%.
The diff coverage is 50.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #60      +/-   ##
==========================================
- Coverage   95.87%   95.48%   -0.40%     
==========================================
  Files          19       21       +2     
  Lines         461      465       +4     
==========================================
+ Hits          442      444       +2     
- Misses         11       12       +1     
- Partials        8        9       +1     
Impacted Files Coverage Δ
pkg/rule/default.go 33.33% <33.33%> (ø)
pkg/rule/testrule.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 67219f0...32c93e1. Read the comment docs.

@caitlinelfring caitlinelfring marked this pull request as ready for review March 24, 2021 13:21
@caitlinelfring caitlinelfring changed the title Use go:embed package for loading default rules from yaml Upgrade to go 1.16, use go:embed for loading default rules Mar 27, 2021
@caitlinelfring caitlinelfring merged commit 391fce2 into main Mar 27, 2021
@caitlinelfring caitlinelfring deleted the go-embed-default-rules branch March 27, 2021 13:22
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.

1 participant