rokucommunity / rokucommunity/brighterscript-formatter

Indention is incorrect when using colon-statement separator

Open
#92 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug help wanted
Dominant language
TypeScript
Stars
17
Forks
10
Avg merge
49m
Merged PRs (30d)
7

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the colon-statement example referenced at line 706 of the BrightScript statement-summary documentation and reproduce the formatter output shown in the issue. Trace the formatter's indentation handling for that syntax, then verify that the result matches the expected indentation and remains consistent with the if-then example.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.