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: codegen should generate empty files #491

Merged
merged 3 commits into from
Jul 22, 2022

Conversation

katcipis
Copy link
Contributor

Reason for This Change

We want both generate_hcl and generate_file to generate empty files when content is empty, instead of the current behavior of not generating any file.

Description of Changes

Both code generation and outdated code detection are fixed to handle empty files.

@katcipis katcipis requested a review from i4ki July 21, 2022 15:49
@katcipis katcipis self-assigned this Jul 21, 2022
@codecov
Copy link

codecov bot commented Jul 21, 2022

Codecov Report

Merging #491 (af3c89c) into main (85b23da) will increase coverage by 0.00%.
The diff coverage is 88.88%.

@@           Coverage Diff           @@
##             main     #491   +/-   ##
=======================================
  Coverage   70.16%   70.16%           
=======================================
  Files          49       49           
  Lines        8644     8645    +1     
=======================================
+ Hits         6065     6066    +1     
  Misses       2290     2290           
  Partials      289      289           
Flag Coverage Δ
tests 70.16% <88.88%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
generate/generate.go 82.80% <88.88%> (+0.03%) ⬆️

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 85b23da...af3c89c. Read the comment docs.

Copy link
Contributor

@i4ki i4ki left a comment

Choose a reason for hiding this comment

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

lgtm

@katcipis katcipis merged commit 6a8536e into main Jul 22, 2022
@katcipis katcipis deleted the katcipis-fix-generate-empty-files branch July 22, 2022 09:48
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