Skip to content

Commit

Permalink
recommend avoiding manual versioning through comments
Browse files Browse the repository at this point in the history
#278, no vetos, 7 approvals
  • Loading branch information
AlexandreHT committed Sep 5, 2022
1 parent ff8cd39 commit 81e2d9e
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions clean-abap/CleanABAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ The [Cheat Sheet](cheat-sheet/CheatSheet.md) is a print-optimized version.
- [Comment with ", not with *](#comment-with--not-with-)
- [Put comments before the statement they relate to](#put-comments-before-the-statement-they-relate-to)
- [Delete code instead of commenting it](#delete-code-instead-of-commenting-it)
- [Don't do manual versioning](#manual-versioning)
- [Use FIXME, TODO, and XXX and add your ID](#use-fixme-todo-and-xxx-and-add-your-id)
- [Don't add method signature and end-of comments](#dont-add-method-signature-and-end-of-comments)
- [Don't duplicate message texts as comments](#dont-duplicate-message-texts-as-comments)
Expand Down Expand Up @@ -3652,6 +3653,18 @@ The code is obviously not needed because your application works and all tests ar
Deleted code can be reproduced from the version history later on.
If you need to preserve a piece of code permanently, copy it to a file or a `$TMP` or `HOME` object.

### Don't do manual versioning

> [Clean ABAP](#clean-abap) > [Content](#content) > [Comments](#comments) > [This section](#manual-versioning)
```ABAP
" anti-pattern
* ticket 800034775 ABC ++ Start
output = calculate_result( input ).
* ticket 800034775 ABC ++ End
```
Attribution comments tend to pollute the code and don't provide big benefits as versioning is already done by source code management. Transport order texts are much more suitable for describing why something was adapted.

### Use FIXME, TODO, and XXX and add your ID

> [Clean ABAP](#clean-abap) > [Content](#content) > [Comments](#comments) > [This section](#use-fixme-todo-and-xxx-and-add-your-id)
Expand Down

0 comments on commit 81e2d9e

Please sign in to comment.