Can I get an error Validating Plantuml Syntax from plantuml?

0 votes
asked Oct 17, 2017 in Wanted features by anonymous
Hello,
 
I wondered if it's possible to use plantuml in a mode that validates the syntax - clearly this happens internally as you get an error output, but ideally can I get some kind of return code that I can parse so that I know programmtically if the syntax was wrong
 
For example the following would cause an error - can I check if the syntax in the below is correct or not before going on to create an image?
 
title Blah
left to right direction
 
skinparam class {
BackgroundColor PaleGreen
}
hide members
hide circle
class Blah sdasds #LightBlue
 
Blah --|> Joe
Blah --|> Bloggs
Blah --|> Friends
 
 
 
Many thanks,
Jon

1 Answer

0 votes
answered Oct 17, 2017 by plantuml (198,360 points)

You can use the -syntax flag (see http://plantuml.com/command-line )

For example:

type somefile.txt | java -jar plantuml.jar -syntax

Is this what you need ?

commented Oct 19, 2017 by anonymous
Hi,

Thanks for the info, that is useful.
Is there also a way to do this on the server version?

Thanks,
Jon
...