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.

Specific indentations

See original GitHub issue

arguable, just an opinion

case 1, try-catch. catch should not be indented

    try.
      call_a_method( ).
    catch cx_static_check into lx. " <<<<<
      process_error( lx ).
    endtry.

case 2, indentation right after class definition/implementation when created with se80 2nd level code is not indented. no problem to indent the definition. But indenting the implementation will add starting spaces when editing a specific method - which looks ugly imho.

class ZCL_MY_CLASS definition
  public
  final
  create private .

public section. " <<<<<
  ...
class ZCL_MY_CLASS implementation.
method CONSTRUCTOR. " <<<<<
  data ...

I know the above is the matter of taste of course. Could it be a good idea to add some params to indentation rule to exclude specific cases like above? (one by one of course). E.g:

    "indentation":{  
      "enabled": true,
      "try-catch-indent": false,
      "class-def-indent": false,
    }

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:14 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
sbcguacommented, Jan 18, 2019

if you hint where to look and an examples, i can try to PR if you don’t mind 😃

pretty printer: yes, almost never 😃 Why? Mmmm: don’t know … historically so, maybe I don’t trust them as they sometimes ruin non-standartly formatted but well readable parts of code … 😃

0reactions
sbcguacommented, Apr 5, 2019

Hi @DHEWC001, public section kind of belong to class so it should be

class lcl_class definition.
  public section. <<< indent it too !
    methods xxx.
    data yyyy type i.
endclass.

However in the context of this particular issue you can also specify globalClassSkipFirst = true in indentation rule of the abaplint.json to suppress particulary first class line indentation.

class ZCL_MY_CLASS implementation.
method CONSTRUCTOR. " <<<<<
  data ...
Read more comments on GitHub >

github_iconTop Results From Across the Web

Indent the first line of a paragraph - Microsoft Support
On the Indents and Spacing tab, under Indentation, select First line. The First Line Indent option is highlighted in the Paragraph dialog box....
Read more >
Examples of Indentation in Compositions - ThoughtCo
In a composition, an indentation is a blank space between a margin and the beginning of a line of text. The beginning of...
Read more >
Word: Indents and Tabs - GCF Global
In Word indents and tabs add structure to documents. Use the MS Word indent ruler and tabs to help make documents clearer.
Read more >
How do I indent a paragraph in Word? - University of Sussex
Microsoft Word 2016 One method is: Select the paragraph to be indented; From the Home tab, Paragraph group, click on the Increase Indent...
Read more >
How to indent paragraphs in a Word document—the right way
Spaces and tabs might be the quickest way to indent a paragraph in Word, ... Each one means something specific to indents, which...
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