Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Wanted feature] Handle @start/@end syntax error better #1521

Closed
The-Lum opened this issue Aug 27, 2023 · 5 comments · Fixed by #1522
Closed

[Wanted feature] Handle @start/@end syntax error better #1521

The-Lum opened this issue Aug 27, 2023 · 5 comments · Fixed by #1522
Labels

Comments

@The-Lum
Copy link
Collaborator

The-Lum commented Aug 27, 2023

[Inspired by #1519]

Now that @startuml/@enduml is not the only one possible @startX/@endX.

  • Could you handle @start/@end syntax error better?

Hints of possible code change:

I can help on that, by proposing a PR...
Regards,
Th.

@The-Lum
Copy link
Collaborator Author

The-Lum commented Aug 27, 2023

Open question @arnaudroques, and PlantUML team:

  • It seems that checkSyntax function is never use?:

    public static SyntaxResult checkSyntax(String source) {

  • Could you confirm? [I get lost with dead code]
    [maybe we could just keep dead code in the making, by tagging 'for future use'..., or just 'old [dead] code, just for archive']

Reagrds,
Th.

@arnaudroques
Copy link
Contributor

  • [maybe we could just keep dead code in the making, by tagging 'for future use'..., or just 'old [dead] code, just for archive']

Yes sorry about that.
So there is now a new DeadCode annotation to clearly show unused code.

Theoretically, we could remove this dead code. However, we could like to keep a trace of it, because it could be used back in some future.

I hope it will help you to find your way :-)
If you have some ideas for other annotations, do not hesitate to post suggestions!
Thanks!

@The-Lum
Copy link
Collaborator Author

The-Lum commented Aug 27, 2023

Hi @arnaudroques, and all.

Thanks for the annotations, that is a good beginning.
But how to search/detect all the dead code and adding automatically or not this annotation.
Do you know some tools or GitHub action for that?

Regards,
Th.

@The-Lum
Copy link
Collaborator Author

The-Lum commented Aug 28, 2023

Hi @arnaudroques, and all.

In order to propose a PR;
If I change the error message No @startuml/@enduml found by No valid @start/@end found, please check the version

  • Do you agree?

Regards,
Th.

@arnaudroques
Copy link
Contributor

In order to propose a PR; If I change the error message No @startuml/@enduml found by No valid @start/@end found, please check the version

* Do you agree?

Yes, sure, you can go ahead.
Thanks for the idea!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants