Matched signals
- SyntaxError:
- unexpected token
- parse error
- syntax error near
- unterminated string literal
- expected ';' before
- error: expected expression
- invalid syntax
Syntax error in source code
What this failure means
The compiler or interpreter hit invalid source syntax and stopped before the build could continue.
Symptoms
Faultline looks for one or more of these log fragments:
SyntaxError:
unexpected token
parse error
syntax error near
unterminated string literal
expected ';' before
error: expected expression
invalid syntax
Diagnosis
The failing source file contains a parse error such as an unclosed delimiter, invalid token, missing separator, or unresolved merge marker.
This is a hard failure: the code must be corrected before the build can pass.
Fix steps
- Look at the file and line number from the error message.
- Run the compiler or linter locally to reproduce the exact parse failure.
- Check for unclosed brackets, missing separators, or merge conflict
markers such as
<<<<<<<,=======, and>>>>>>>. - If the file was generated or transformed, rebuild the generated output from source rather than patching the artifact by hand.
Validation
- Re-run the parser, compiler, or linter locally.
- Confirm the build step completes without the syntax error.
Why it matters
Syntax failures are immediate and deterministic. They usually indicate code that was never successfully parsed in the same shape now running in CI.
Prevention
- Run a linter or type-checker as a pre-commit hook.
- Enable editor integration that highlights syntax errors in real time.
- Require all CI jobs to pass before merging.
- Keep generated code and hand-written source separate so parse errors are easier to trace to the real source of change.
Try it locally
go build ./...
go build ./...
How Faultline detects it
Use faultline explain syntax-error to see the full playbook.
faultline analyze build.log
faultline explain syntax-error
Generated from playbooks/bundled/log/build/syntax-error.yaml. Do not edit directly.