Skip to Content
Author's profile photo Lars Hvam

Open Source ABAP tools – abaplint and abapCov

abaplint

Continuous Integration is a hot topic, but it has always been difficult to do anything for ABAP open source projects, as it would require a dedicated SAP system to run the tests on.

So I’ve started writing abaplint which is a linter written in TypeScript for checking ABAP code. abaplint compiles to javascript, which can be executed on various platforms. It will only do the “Code Inspector” part of checking the code, unit tests will not be run and is not in scope for this project.

abaplint will work for objects that have been serialized using abapGit, or files containing the raw abap code.

Currently different 17 rules have been implemented, see https://github.com/larshp/abaplint/wiki. The checks can be enabled or disabled plus configured via a abaplint.json file. The project is open source and is work in progress, so expect some problems, but pull requests and suggestions are also welcome.

abaplint can be setup to run on Travis CI(see example at https://travis-ci.org/larshp/abapGit), each time a push is done to the ABAP git repository, Travis will download the latest abaplint via npm and run the linter on the committed code.

It also works in the Atom editor,

/wp-content/uploads/2016/03/atom_912114.png

And in Eclipse(update site to be created),

/wp-content/uploads/2016/03/eclipse_912115.png

Plus on the web

/wp-content/uploads/2016/03/web_912116.png

abapCov

abapCov takes a step towards visualizing the coverage of the unit tests run on the ABAP server.

Run abapCov on the ABAP server, it will run the unit tests with coverage enabled, and the  coverage result is then uploaded to https://codecov.io where anyone can check it out.

See example at https://codecov.io/github/larshp/abapOpenChecks

https://github.com/larshp/abaplint or via npm

https://github.com/larshp/abapCov

Assigned Tags

      4 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Florian Henninger
      Florian Henninger

      Hi lars,

      nice one. For me it is a step to early to publish it at a "real" system. But for playing around and see the ongoing process I will take my time and feel into it:-)

      ~Florian

      Author's profile photo Lars Hvam
      Lars Hvam
      Blog Post Author

      Yea, for real systems the Code Inspector works a lot better than abaplint.

      You can install the Atom package(linter-abaplint) to try it out locally, alternatively it also runs nicely on https://c9.io/ (one free private workspace)

      Author's profile photo Former Member
      Former Member

      Very nice information but a quick question here, can we add new rules in Abaplint or turn off some rules. Because after installing through npm i am not able to see any config file where i can do the same.

       

      Thanks in advance.

      Author's profile photo Lars Hvam
      Lars Hvam
      Blog Post Author

      Turn off rules

      yes, run

      abaplint -d

      to get the default config

       

      put the file in your root folder as “abaplint.json”, it should be picked up automatically by abaplint. See example repository https://github.com/sbcgua/abap_data_parser

       

      Add new rules

      Yes, pull requests welcome on github, https://github.com/larshp/abaplint

       

      Feel free to create an issue on github if you have any ideas or find any bugs