Missing @enduml is not reported as error

+1 vote
asked Jan 19, 2018 in Bug by yann (200 points)

A puml input file without the trailing @enduml causes no error to be printed, and exitstatus 0, though no output file is generated:

$ cat test.puml
@startuml

node a

$ plantuml -v -tsvg -o out test.puml
(0.000 - 119 Mo) 114 Mo - PlantUML Version 1.2017.15
(0.008 - 119 Mo) 114 Mo - GraphicsEnvironment.isHeadless() false
(0.046 - 119 Mo) 113 Mo - Setting current dir: .
(0.047 - 119 Mo) 113 Mo - Setting current dir: /home/yann/redacted
(0.050 - 119 Mo) 113 Mo - Using default charset
(0.059 - 119 Mo) 113 Mo - Setting current dir: /home/yann/redacted
(0.065 - 119 Mo) 113 Mo - Setting current dir: /home/yann/redacted
(0.066 - 119 Mo) 113 Mo - Reading file: test.puml
(0.066 - 119 Mo) 113 Mo - Number of image(s): 0

$ echo $?
0

$ ls out/test.svg
ls: cannot access 'out/test.svg': No such file or directory

commented Jan 25, 2018 by Anthony-Gaudino (5,720 points)
Yes, and this can be an issue, since a user may actually have generated an image previously, and then made changes to the puml file but accidentally removed the @enduml, and then when trying to generate the image with PlantUML he will stay with the previous image since PlantUML won't change the previous image.

I think that PlantUML should show a warning message on console.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:

[Antispam2 Feature: please please wait 1 or 2 minutes (this message will disappear) before pressing the button otherwise it will fail](--------)
To avoid this verification in future, please log in or register.
...