Skip to content

plugin: remove subshell and pipeline from EXECUTABLE_NODE_TYPES - #49

Merged
lackhove merged 4 commits into
lackhove:mainfrom
cdleonard:feature/fix-subshell-open-paren
Apr 28, 2026
Merged

lackhove merged 4 commits into
lackhove:mainfrom
cdleonard:feature/fix-subshell-open-paren

Conversation

@cdleonard

@cdleonard cdleonard commented Apr 20, 2026

Copy link
Copy Markdown
Contributor

A "subshell" is a container for executable commands but is not by itself executable. Treat it just like "compound_statement".

Same logic applies to "pipeline". Removing this fixes incorrectly reported uncovered first line in following example:

{
    echo aaa
    # comment
    echo bbb
} | grep a

Fixes #48

A subshell open parenthesis is never reported as "executed" by bash so
we shouldn't mark at as "executable". It should be treated the same as a
"compound_statement".
The pipeline not is a container for multiple "command" children, it does
it need to be marked executable by itself.

This fixes empty braces at the start of a pipeline being reported as
uncovered.
An empty brace part of a pipeline is not reported as "executed" by bash
and should not be marked as "executable", otherwise it will incorrectly
end up as "uncovered".
@cdleonard
cdleonard force-pushed the feature/fix-subshell-open-paren branch from 45c2869 to 32607fb Compare April 21, 2026 12:36
@cdleonard cdleonard changed the title plugin: remove subshell from EXECUTABLE_NODE_TYPES plugin: remove subshell and pipeline from EXECUTABLE_NODE_TYPES Apr 21, 2026
@lackhove
lackhove merged commit 9a0f51c into lackhove:main Apr 28, 2026
7 checks passed
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.

Opening line of function with parenthesis (subshell) body reported as "uncovered"

2 participants