Skip to content

Support d2 validate file.d2 ... #2703

@acxz

Description

@acxz

d2 validate (#2410) is a nice qol feature! @melsonic thanks for implementing this.

Considering that d2 fmt supports multiple files, it makes sense (and would support my usecase) that d2 validate also supports the same input syntax of multiple files.

Would be great if I could glob and just do d2 validate **/*.d2.

Due to the lack of this functionality, I'm currently using the following workaround:

for file in *.d2; do
  if [ -f "$file" ]; then
    d2 validate "$file"
  fi
done

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions