question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Incorrect indentation of block params '}}'

See original GitHub issue

Example:

1|{{#if foo}}
2|  {{#paper-toast 
3|    duration=1000 
4|    position="bottom left"
5|    onClose=(action "bar") 
6|  as |toast|}}
7|    {{#toast.text}}baz{{/toast.text}}
8|  {{/paper-toast}}
9|{{/if}} 

Incorrect indentation of close curly braces ‘}}’ for the component ‘{{paper-toast}}’ beginning at L6:C12. Expected ‘{{paper-toast}}’ to be at L7:C2

1  |{{#if foo}}
2  |  {{#paper-toast 
3  |    duration=1000 
4  |    position="bottom left"
5  |    onClose=(action "bar") 
6  |    as |toast|
7  |  }}
8  |    {{#toast.text}}baz{{/toast.text}}
9  |  {{/paper-toast}}
10 |{{/if}} 

Incorrect indentation of block params ‘}}’ beginning at L7:C2. Expecting the block params to be at L6:C2

No matter where you put the braces it shows an error.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:8
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
rwjbluecommented, Oct 7, 2018

Sorry for the delays, I just released v1.0.0-beta.6 which should fix this.

Closing for now, but happy to reopen if I’ve made a mistake…

2reactions
kpfefferlecommented, Oct 12, 2018

@rwjblue Thanks for fixing this for curly braces! Right after updating and confirming this worked, I switched some of these cases over to angle-bracket components and ran into the same issue:

1  |{{#if foo}}
2  |  <PaperToast 
3  |    @duration={{1000}} 
4  |    @position="bottom left"
5  |    @onClose={{action "bar"}} 
6  |  as |toast|
7  |  >
8  |    <toast.text>baz</toast.text>
9  |  </PaperToast>
10 |{{/if}} 

Incorrect indentation of close bracket ‘>’ for the element ‘<PaperToast>’ beginning at L7:C2. Expected ‘<FormFor>’ to be at L6:C2. attribute-indentation

Again, moving the > and as |toast| around to various places seems to result in a similar errors no matter how they are arranged. Since this seems to be the same pattern of errors that we saw above with curly-brace invocation, I’m guessing they are closely related and thus may merit mention on this issue. If you’d prefer to track this in a new issue, let me know and I can open one.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Indentation on annotation parameters is wrong #1349 - GitHub
When using , during build checkstyle 6.8.1 complains about: @Cascade( org.hibernate.annotations.CascadeType.
Read more >
'public' have incorrect indentation level 4, expected level ...
I am getting an checkstyle sonar violation on indendation rule (com.puppycrawl.tools.checkstyle.checks.indentation).
Read more >
How does Indentation Error Work in Python? - eduCBA
A block of code should start with indentation, and the ending of the code should be first-line which is not indented.
Read more >
IndentationCheck (checkstyle 10.5.0 API)
Checks correct indentation of Java code. The idea behind this is that while pretty printers are sometimes convenient for bulk reformats of legacy...
Read more >
Indentation style | JetBrains Rider Documentation
Indentation is one of the most important aspects of formatting style — properly indented code will be readable even if other formatting is ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found