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

Indention is incorrect when using colon-statement separator #92

Open
shortad opened this issue May 10, 2024 · 5 comments
Open

Indention is incorrect when using colon-statement separator #92

shortad opened this issue May 10, 2024 · 5 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@shortad
Copy link

shortad commented May 10, 2024

Roku Documentation: https://developer.roku.com/en-ca/docs/references/brightscript/language/statement-summary.md

Actual Indentation for Colon-Statement Syntax

See line 706, incorrectly knocking the indent back when using colon-statement syntax

image

Expected Indentation for Colon-Statement Syntax

This example is taken before the BS code formatter modified the indentation.

image

Correct Indentation Shown With If-Then Syntax

See line 706, correctly indented when using "if then" syntax

image

@shortad
Copy link
Author

shortad commented May 10, 2024

Here's another example taken from this file where several colon-separated if-statements are used consecutively. Indentation is funky.

Correct Indentation with If-End syntax
image

Actual Indentation with Colon-Separated Syntax
image

@shortad
Copy link
Author

shortad commented May 10, 2024

Side Note:
This is overall I think a pretty minor issue. It does muck up the formatting but I just used find/replace to change this file from colon-separators to traditional if-else formatting to work around it

Side-Side Note:
I feel so bad raising issues on here when there's so many already 😅

@TwitchBronBron TwitchBronBron transferred this issue from rokucommunity/brighterscript May 10, 2024
@TwitchBronBron
Copy link
Member

Yeah, this is one of the deficiencies in the formatter. Thanks for raising this. And also, don't hold back on raising the issues. There's only a few of us to work on all this stuff, but it's still way more valuable to know about the issues, so keep 'em coming!

@TwitchBronBron TwitchBronBron added bug Something isn't working help wanted Extra attention is needed labels May 10, 2024
@shortad
Copy link
Author

shortad commented May 10, 2024

After things settle a bit for me (so close to being finished with this giant work project) I'll see if I can get these repos set up on my local so I can make actionable suggestions/PRs 🫡

@TwitchBronBron
Copy link
Member

That would be great! Here's a small writeup on how to get started contributing to the vscode extension and several of its associated packages:

https://rokucommunity.github.io/vscode-brightscript-language/contributing.html#the-easy-way

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants