alstr / todo-to-issue-action

Action that converts TODO comments to GitHub issues on push.
MIT License
630 stars 121 forks source link

Add support for ABAP language #85

Closed mbtools closed 3 years ago

mbtools commented 3 years ago

Here's an example of how code with TODOs would look like:

REPORT zfoobar.

WRITE 'Hello World'.

* TODO This is a new single-line to-do
DATA moo TYPE i VALUE 2.
WRITE moo. " TODO This is an end-of-line to-do
moo = 4.

* TODO Here is a block to-do
*  with multiple lines that
*  end here
DATA lt_foo TYPE TABLE OF string.
LOOP AT lt_foo INTO DATA(lv_foo).
  " TODO Here is a multi-line to-do
  "  with 3 lines that
  "  end here
  WRITE lv_foo.
ENDLOOP.

In ABAP, you can use * at the beginning of a line or " at other positions for comments. There is no end-of-comment marker, so I'm thinking it should be as follows:

  {
    "language": "ABAP",
    "markers": [
      {
        "type": "line",
        "pattern": "\""
      },
      {
        "type": "line",
        "pattern": "\*"
      }
    ]
  },

If you are ok with it, I will open an PR.

alstr commented 3 years ago

That looks good, feel free to open a PR. Thanks.