Skip to content

DSL parser does not seem to handle curly brackets balance #252

@GuillaumeTaffin

Description

@GuillaumeTaffin

Description

While using the StructurizrDslParser from "com.structurizr:structurizr-dsl:2.0.0" lib, trying out simple validation made by the parser. I noticed that there are no errors if the "{", "}" of a workspace are not balanced.

The workspace output by the parser is actually valid.

Steps to reproduce

  1. Take the simple workspace dsl example from https://structurizr.com/ (top of the page)
  2. Go to https://structurizr.com/dsl and paste the code there
  3. Remove the last "}" which closes the workspace
  4. Render the dsl
  5. No error in rendering :(

The same can be easily reproduced in a few line of code (I put a screen shot of a failing test written in kotlin where I expected the parser to fail to parse)

Screenshot

image

Code sample

No response

Configuration

No response

Severity

Minor

Priority

I have no budget and there's no rush, please fix this for free

More information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions