Skip to content

refactor: parse shell commands with AST - #28

Open
fcying wants to merge 1 commit into
mainfrom
dev
Open

refactor: parse shell commands with AST#28
fcying wants to merge 1 commit into
mainfrom
dev

Conversation

@fcying

@fcying fcying commented Aug 12, 2026

Copy link
Copy Markdown
Owner

No description provided.

@fcying fcying changed the title dev refactor: parse shell commands with AST Aug 12, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5429fb139d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread internal/shell_parse.go

func supportedShellStatement(statement *syntax.Stmt) bool {
if statement == nil || statement.Negated || statement.Background || statement.Coprocess || statement.Disown ||
len(statement.Redirs) != 0 {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Continue past unrelated redirected commands

When a build-log line contains an unrelated redirected command before an independently sequenced compilation, such as printf 'status' >&2; gcc -c a.c, this condition makes supportedShellCommandList reject the entire AST, so Parse never reaches the compiler command and silently omits a real database entry. This commit even removes equivalent printf ... 1>&2; prefixes from tests/build.log; reject or conservatively summarize only the redirected statement instead of discarding independent statements on the same line.

AGENTS.md reference: AGENTS.md:L14-L14

Useful? React with 👍 / 👎.

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