Fixed: Else Indentation; Dropping Unindented Directives - v0.5.0 #11
TekWizely
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Bash-TPL
A Smart, Lightweight shell script templating engine, written in Bash.
Release - v0.5.0
chore: GitHub workflow to run tests against various Bash versions
Added a github worfkflow to execute the bats tests against multiple versions of Bash
I even wrote a blog post about it.
chore: Apply newly reported shellcheck recommendations
I updated
shellcheck
at some point after my last release and it started reporting a new error:Although this SC has been around for a long time, I'm certain that seeing it in my shellcheck report is new.
fix: Track indentation after all statement lines, not just between logical "open"/"close"
I was writing a template with an if/else/fi block and realized that bash-tpl wasn't correctly tracking indentation on the else section.
Previously, section 2 was not being correctly tracked.
I was treating the first encountered statement line as an maybe-open and any subsequent line as a cose, when in fact they should always be seen as a maybe-open and a maybe-close
Breaking Change
Due to the possible changes in leading whitespace in template output, this is considered a breaking change.
fix: Stop ignoring unindented directives in text blocks
There was a real bug that was dropping directive statements when were part of a text block, but did not exist at the same (or deeper) indentation of the text block.
I only discovered this by accident while writing a test for the indentation fix above.
Full ChangeLog
Full Changelog: v0.4.0...v0.5.0
This discussion was created from the release Fixed: Else Indentation; Dropping Unindented Directives - v0.5.0.
Beta Was this translation helpful? Give feedback.
All reactions