- 
                Notifications
    You must be signed in to change notification settings 
- Fork 484
Remove recommendation for ABAP Formatter #343
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
          
     Draft
      
      
            sautermi0
  wants to merge
  4
  commits into
  SAP:main
  
    
      
        
          
  
    
      Choose a base branch
      
     
    
      
        
      
      
        
          
          
        
        
          
            
              
              
              
  
           
        
        
          
            
              
              
           
        
       
     
  
        
          
            
          
            
          
        
       
    
      
from
sautermi0:remove-abap-formatter
  
      
      
   
  
    
  
  
  
 
  
      
    base: main
Could not load branches
            
              
  
    Branch not found: {{ refName }}
  
            
                
      Loading
              
            Could not load tags
            
            
              Nothing to show
            
              
  
            
                
      Loading
              
            Are you sure you want to change the base?
            Some commits from the old base branch may be removed from the timeline,
            and old review comments may become outdated.
          
          
  
     Draft
                    Changes from all commits
      Commits
    
    
  File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
|  | @@ -187,8 +187,8 @@ The [Cheat Sheet](cheat-sheet/CheatSheet.md) is a print-optimized version. | |
| - [Formatting](#formatting) | ||
| - [Be consistent](#be-consistent) | ||
| - [Optimize for reading, not for writing](#optimize-for-reading-not-for-writing) | ||
| - [Use the ABAP Formatter before activating](#use-the-abap-formatter-before-activating) | ||
| - [Use your team's ABAP Formatter settings](#use-your-teams-abap-formatter-settings) | ||
| - [Use an Automated Code Formatting Tool](#use-an-automated-code-formatting-tool) | ||
| - [Use the ABAPCleaner](#use-the-abap-cleaner) | ||
| - [No more than one statement per line](#no-more-than-one-statement-per-line) | ||
| - [Stick to a reasonable line length](#stick-to-a-reasonable-line-length) | ||
| - [Condense your code](#condense-your-code) | ||
|  | @@ -3876,9 +3876,8 @@ have replaced them. | |
| > [Clean ABAP](#clean-abap) > [Content](#content) > [This section](#formatting) | ||
|  | ||
| The suggestions below are [optimized for reading, not for writing](#optimize-for-reading-not-for-writing). | ||
| As the ABAP Formatter doesn't cover them, some of them produce additional manual work to reformat statements | ||
| when name lengths etc. change; if you want to avoid this, consider dropping rules like | ||
| [Align assignments to the same object, but not to different ones](#align-assignments-to-the-same-object-but-not-to-different-ones). | ||
|  | ||
| Some of them might not be covered by automated code formatting tools, such as ABAP Formatter or ABAPCleaner, so manual effort to reformat statements might be necessary, but we recommend sticking with automated formatting as dar a s possible for the sake of consistency. | ||
|  | ||
| ### Be consistent | ||
|  | ||
|  | @@ -3922,38 +3921,19 @@ DATA: | |
| ,e TYPE f. | ||
| ``` | ||
|  | ||
| ### Use the ABAP Formatter before activating | ||
|  | ||
| > [Clean ABAP](#clean-abap) > [Content](#content) > [Formatting](#formatting) > [This section](#use-the-abap-formatter-before-activating) | ||
| ### Use an Automated Code Formatting Tool | ||
|  | ||
| Apply the ABAP Formatter - Shift+F1 in SE80, SE24, and ADT - before activating an object. | ||
| Note: ABAP Formatter is known as Pretty Printer in SAP GUI. | ||
| > [Clean ABAP](#clean-abap) > [Content](#content) > [Formatting](#formatting) > [This section](#use-an-automated-code-formatting-tool) | ||
|  | ||
| If you modify a larger unformatted legacy code base, | ||
| you may want to apply the ABAP Formatter only to selected lines | ||
| to avoid huge change lists and transport dependencies. | ||
| Consider formatting the complete development object | ||
| in a separate Transport Request or Note. | ||
| Use an automated code formatting tool with a consistent setting in your team. | ||
|  | ||
| > Read more in _Chapter 5: Formatting: Team Rules_ of [Robert C. Martin's _Clean Code_]. | ||
|  | ||
| ### Use your team's ABAP Formatter settings | ||
|  | ||
| > [Clean ABAP](#clean-abap) > [Content](#content) > [Formatting](#formatting) > [This section](#use-your-teams-abap-formatter-settings) | ||
| ### Use the ABAPCleaner | ||
|  | ||
| Always use your team's ABAP Formatter settings. | ||
| Specify them under | ||
| * Eclipse: Right-click on the project in the Project Explorer > _Properties_ > _ABAP Development_ > _Editors_ > _Source Code Editors_ > _ABAP Formatter_ | ||
| * Eclipse (alternative navigation): _Menu_ > _Window_ > _Preferences_ > _ABAP Development_ > _Editors_ > _Source Code Editors_ > Click on the _ABAP Formatter_ link on the right-hand side > Select project in pop-up | ||
| * SAP GUI: _Menu_ > _Utilities_ > _Settings ..._ > _ABAP Editor_ > _Pretty Printer_. | ||
| > [Clean ABAP](#clean-abap) > [Content](#content) > [Formatting](#formatting) > [This section](#use-the-abap-cleaner) | ||
|  | ||
| Set _Indent_ and _Convert Uppercase/Lowercase_ > _Uppercase Keyword_ | ||
| as agreed in your team. | ||
|  | ||
| > [Upper vs. Lower Case](sub-sections/UpperVsLowerCase.md) explains | ||
| > why we do not give clear guidance for the type case of keywords. | ||
| > | ||
| > Read more in _Chapter 5: Formatting: Team Rules_ of [Robert C. Martin's _Clean Code_]. | ||
| Always use the [ABAPCleaner](https://github.com/SAP/abap-cleaner), ideally with the default configuration. | ||
| There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this should be the same as before: Always use your team's formatter settings. 😉 | ||
|  | ||
| ### No more than one statement per line | ||
|  | ||
|  | ||
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.