Skip to content

Marc-Bernard-Tools/abaplint-Ext-for-abapGit

Repository files navigation

Version

License Contributor Covenant REUSE Status ClearlyDefined Score

abaplint Extension for abapGit

View abaplint results and detailed findings directly in abapGit.

Made by Marc Bernard Tools giving back to the SAP Community

NO WARRANTIES, MIT License

The Problem

After committing changes from abapGit to your repository and running abaplint there, you have to switch to GitHub or another tool to view the abaplint results. If the abaplint check fails, the detailed findings are hard to process since they don't link back to your SAP system where you want to fix the issues.

github2

Note: VSCode with abaplint extension is an exception showing lint results within your ABAP code. But then you are not using abapGit in the first place.

The Solution

This repository provides an extension for abapGit integrating the abaplint results (as user exits). A summary of the results is displayed in the abapGit repository view and details are shown on a separate page with a code preview and an option to jump directly to the code in question.

Repository View

Under the name of the repository, the status and summary of the last abaplint check will be displayed.

check1

check2

check3

You can click on the status icon to open the corresponding page on GitHub. If you click on the result summary, the detailed issues will be shown.

Issue View

The issues are listed similarly to syntax and ATC checks in abapGit. For each finding, the view shows the object type, name, and line number. Below, it prints the abaplint message. A link on the error code opens the corresponding definition on rules.abaplint.org.

findings1

Optionally, you can sort the results by object, location, or error code. You can also hide the source code preview.

findings1

Installation

Prerequisites

  1. SAP Basis 7.02 or higher

  2. abapGit needs to be installed

  3. abaplint must be installed and given access to your GitHub repository.

Repository

You can install the repository using abapGit creating a new online repository for https://github.com/Marc-Bernard-Tools/ABAP-Lint-Ext-for-abapGit. We recommend using package $ABAPGIT-EXT-ABAPLINT.

User Exits

Implement abapGit user exits wall_message_repo and on_event as follows:

  METHOD zif_abapgit_exit~wall_message_repo.

    zcl_abaplint_abapgit_ext_exit=>get_instance( )->wall_message_repo(
      is_repo_meta = is_repo_meta
      ii_html      = ii_html ).

  ENDMETHOD.
  METHOD zif_abapgit_exit~on_event.

    IF rs_handled IS INITIAL.
      rs_handled = zcl_abaplint_abapgit_ext_exit=>get_instance( )->on_event( ii_event ).
    ENDIF.

  ENDMETHOD.

SSL and Certificates

The abaplint status is retrieved via https://api.github.com/. Therefore, a proper SSL configuration and certificates for api.github.com are required. See SSL setup for details.

Contributions

All contributions are welcome! Read our Contribution Guidelines, fork this repo, and create a pull request.

About

Made with ❤️ in Canada

Copyright 2021 Marc Bernard https://marcbernardtools.com/

Follow @marcfbe on Twitter

MBT Logo