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: panic when using tm_hcl_expression() on invalid contexts #731

Merged
merged 8 commits into from
Nov 25, 2022

Conversation

katcipis
Copy link
Contributor

@katcipis katcipis commented Nov 24, 2022

Reason for This Change

It was not documented clearly and handled gracefully the fact that the function tm_hcl_expression is not available on all contexts where other tm_ functions are available.

Closes #724

@katcipis katcipis self-assigned this Nov 24, 2022
@codecov
Copy link

codecov bot commented Nov 24, 2022

Codecov Report

Base: 71.56% // Head: 71.71% // Increases project coverage by +0.14% 🎉

Coverage data is based on head (420be88) compared to base (46f6324).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #731      +/-   ##
==========================================
+ Coverage   71.56%   71.71%   +0.14%     
==========================================
  Files          73       73              
  Lines       12015    12018       +3     
==========================================
+ Hits         8599     8619      +20     
+ Misses       3071     3059      -12     
+ Partials      345      340       -5     
Flag Coverage Δ
tests 71.71% <100.00%> (+0.14%) ⬆️

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

Impacted Files Coverage Δ
generate/genfile/genfile.go 95.45% <100.00%> (ø)
generate/genhcl/genhcl.go 91.48% <100.00%> (+0.04%) ⬆️
hcl/eval/eval.go 85.32% <100.00%> (+0.27%) ⬆️
hcl/eval/functions.go 87.41% <100.00%> (-0.09%) ⬇️
generate/generate.go 85.03% <0.00%> (+0.73%) ⬆️
stack/clone.go 75.22% <0.00%> (+1.76%) ⬆️
lets/lets.go 77.86% <0.00%> (+6.55%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@katcipis katcipis marked this pull request as ready for review November 24, 2022 13:57
@katcipis katcipis requested a review from i4ki November 24, 2022 13:57
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 051a335 into main Nov 25, 2022
@katcipis katcipis deleted the katcipis-fix-panic-tm-hcl-expression branch November 25, 2022 15:25
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.

[BUG] Terramate panics when using ternary expression with tm_hcl_expression() function
2 participants