• Stars
    star
    414
  • Rank 104,550 (Top 3 %)
  • Language
    Java
  • License
    Apache License 2.0
  • Created over 1 year ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

ABAP cleaner applies 75+ cleanup rules to ABAP code at a single keystroke

ABAP Cleaner

REUSE status

ABAP cleaner is a configurable tool with the ambition to automate
whatever can be automated
with respect to ABAP code style.

What the ABAP Cleaner Tool Offers

While there is no lack of guidelines and rules on what clean ABAP code should look like...

... these guidelines leave the work of writing clean code (or cleaning existing code) entirely to you.

The ABAP cleaner tool does a lot of this work for you by automating as many of these rules as possible, while giving you full control over which rules are used and how.

ABAP cleaner - code cleanup at a keystroke

With ABAP cleaner, you can clean any amount of code from a single statement to an entire code document with one keystroke. ABAP cleaner then applies 65+ different cleanup rules to your code section, cleaning approx. 1 MB of code per second.

Please don't get us wrong: Of course, an automated tool can NOT replace all other clean code efforts. Obviously, automation is only possible for a subset of the clean code rules - but for a significant one, including formatting, alignment, replacing obsolete commands, and even reducing some nesting depth. This saves you tedious work, leaving you more time to focus on more complex requirements, such as modularization, testability, and good naming.

ABAP cleaner is installed with two profiles:

  • in the 'default' profile, most available cleanup rules are activated with what we believe are good default settings in alignment with the Clean ABAP Styleguide (and even going beyond its demands);
  • in the 'essential' profile, only those cleanup rules are active which are explicitly demanded by the Clean ABAP Styleguide; this applies to approx. 40-50% of the available cleanup rules.

Additionally, you can create your own profiles: In each profile, you can select which cleanup rules shall be active, and configure options and thresholds for these rules. Your team may align on a common configuration and create a team profile from it.

Demo of ABAP Cleaner

How to install, use, and configure The open source journey of ABAP cleaner
For a demo of what ABAP cleaner offers, how it is installed, used and configured, you can watch this Devtoberfest session on YouTube: To hear about the story behind ABAP cleaner and its journey to open source, watch this webinar hosted by the SAP Open Source Program Office (slides):

How ABAP Cleaner is Used

Automated or Interactive Cleanup from ADT

Using ABAP cleaner from ADT, the cleanup can be done

  • either automatically with a single keystroke (Ctrl + 4 or menu 'Source Code / Clean Up With Automated ABAP Cleaner'),

  • or interactively by opening the ABAP cleaner UI (Ctrl + Shift + 4 or menu 'Source Code / Clean Up With Interactive ABAP Cleaner...') which allows you to check the changes, revert those that you don't like with a single mouse click, and finally apply (or discard) the result.

  • A third option shows a read-only preview of the cleanup result without locking or changing the code, e.g. if you don't have development authorization in the current system (Ctrl + Shift + 5 or menu 'Source Code / Show Read-Only Preview With ABAP Cleaner...')

    ABAP cleaner integration into ABAP Development Tools (ADT)

Using the Stand-alone App with SAP GUI

Using the stand-alone ABAP cleaner app, you may use the clipboard to copy the code from your IDE (i.e. SAP GUI) into ABAP cleaner, and to copy the cleaned code back to your IDE.

You can also make the ABAP cleaner app watch the clipboard and directly replace it with cleaned up code, allowing you to stay in SAP GUI and do the cleanup with Ctrl + C, Ctrl + V.

Scope of the Tool

ABAP cleaner can be used to clean up both existing and new code, both product code and test code, both with a "broadband" approach (simultaneously applying 65+ different rules) and a focused approach (cleaning with a limited selection of rules).

ABAP cleaner was implemented with object-oriented ABAP in mind, but it may also be used for code in reports and functions. ABAP SQL and EML statements are not yet supported (meaning that most cleanup rules simply leave them unchanged).

Requirements and Installation

To install and use the ABAP cleaner plug-in for ABAP Development Tools (ADT) on Windows or macOS,

  1. Install ABAP Development Tools as described in the Install ADT Tutorial (Step 1), using an Eclipse installation that is compatible with ADT.

  2. Start ADT, select menu 'Help / Install New Software...', copy the link https://sap.github.io/abap-cleaner/updatesite to the 'Work with' field, press Enter and follow the installation steps, confirming to install ABAP cleaner (content is currently unsigned). (Known issues)

    ABAP cleaner plug-in for ABAP Development Tools - installation

  3. After restarting ADT, open an ABAP code document in an editor, and use the menu 'Source Code / Clean Up With Interactive ABAP Cleaner...' (shortcuts Ctrl + 4 or Ctrl + Shift + 4), see usage.

The stand-alone version of ABAP cleaner (for Windows, macOS or Linux) requires Java 17 or 11 (e.g. SapMachine or Adoptium Temurin). To install the stand-alone version, please download and extract the latest Release and follow the installation instructions given there.

Engaging in Our Project

Reporting Issues and Ideas

If you come across any (suspected) bugs or issues, expect ABAP cleaner to behave differently than it does, miss an option to configure a cleanup rule, or have an idea for a great new cleanup rule, please create a GitHub issue, providing a small code snippet of both the original and the cleaned code, and explaining how the result differs from your expectations.

The general approach of ABAP cleaner is to only modify statements that match the expected syntax and leave statements unmodified if any unexpected syntax is found (e.g. comments in weird places inside a statement).

Contributing

You are welcome to contribute to ABAP cleaner development - implementing new cleanup rules, new UI features, bugfixes etc.!

Code of Conduct

We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone. By participating in this project, you agree to abide by its Code of Conduct at all times.

Limitations and Known Issues

The ABAP cleaner plug-in (as any other plug-in) can only be installed from extensible versions of ABAP Development Tools (ADT), in which menu 'Help / Install New Software...' is available.

Since ABAP cleaner does not perform additional backend calls, cleanup is restricted to what can be done within the current code document, without retrieving additional DDIC information, signatures, includes etc.

ABAP cleaner strives to offer cleanup rules that automatically detect what can be improved in the given ABAP code, so after some initial configuration, users shall be able to apply "everything everywhere" with just one keystroke. ABAP cleaner is therefore restricted to cleanup rules that keep functionality unchanged and can be applied without any additional user interaction, or need for subsequent inspection of changes.

At any given time, known and unresolved issues are shown as "Open" issues with label "bug" in the Issues section.

Upcoming Changes

As long as we do not run out of ideas for automatable cleanup (or contributors to implement these ideas), ABAP cleaner shall be enhanced with

  • further cleanup rules,
  • further configuration options,
  • further UI features,
  • possibly, support for code sections in other languages, esp. SQL Script.

As shown in the Profiles and Rules documentation, you can choose yourself whether or not to 'Automatically activate new features after updates' (per profile). New features will be listed in the Release notes.

Detailed Documentation

Licensing

Copyright 2023 SAP SE or an SAP affiliate company and ABAP cleaner contributors. Please see our LICENSE for copyright and license information. Detailed information including third-party components and their licensing/copyright information is available via the REUSE tool.

Continue reading: How to use ABAP cleaner

More Repositories

1

openui5

OpenUI5 lets you build enterprise-ready web applications, responsive to all devices, running on almost any browser of your choice.
JavaScript
2,770
star
2

ui5-webcomponents

UI5 Web Components - the enterprise-flavored sugar on top of native APIs! Build SAP Fiori user interfaces with the technology of your choice.
HTML
1,525
star
3

styleguides

This repository provides SAP style guides for coding and coding-related topics.
Markdown
1,301
star
4

macOS-enterprise-privileges

For Mac users in an Enterprise environment, this app gives the User control over administration of their machine by elevating their level of access to Administrator privileges on macOS. Users can set the time frame using Preferences to perform specific tasks such as install or remove an application.
Objective-C
1,039
star
5

jenkins-library

Jenkins shared library for Continuous Delivery pipelines.
Go
710
star
6

luigi

Micro frontend framework
JavaScript
697
star
7

spartacus

Spartacus is a lean, Angular-based JavaScript storefront for SAP Commerce Cloud that communicates exclusively through the Commerce REST API.
TypeScript
673
star
8

PyRFC

Asynchronous, non-blocking SAP NW RFC SDK bindings for Python
Python
441
star
9

ui5-tooling

An open and modular toolchain to develop state of the art applications based on the UI5 framework
JavaScript
421
star
10

SapMachine

An OpenJDK release maintained and supported by SAP
Java
412
star
11

openSAP-ui5-course

Repository for content related to the openSAP courses "Evolved Web Apps with SAPUI5"
JavaScript
384
star
12

ui5-webcomponents-react

A wrapper implementation for React of the UI5 Web Components that are compliant with the SAP Fiori User Experience
TypeScript
354
star
13

node-hdb

SAP HANA Database Client for Node
JavaScript
314
star
14

credential-digger

A Github scanning tool that identifies hardcoded credentials while filtering the false positive data through machine learning models 🔒
Python
312
star
15

macOS-icon-generator

Icons for macOS is the easiest way to create customized app icons in PNG format for your company’s internal app store. No graphic skills needed.
C
276
star
16

fundamental

Fiori Fundamentals is a component library and SASS toolkit for building SAP user interfaces with any technology.
Nunjucks
264
star
17

InfraBox

InfraBox is a cloud native continuous integration system
Python
261
star
18

openui5-sample-app

OpenUI5 Sample App
JavaScript
257
star
19

code-pal-for-abap

code pal for ABAP is a highly configurable engine, fully integrated into the ABAP development framework ensuring Cloud’s built-in quality.
ABAP
247
star
20

fundamental-ngx

Fundamental Library for Angular is SAP Design System Angular component library
TypeScript
232
star
21

node-rfc

Asynchronous, non-blocking SAP NW RFC SDK bindings for Node.js
C++
232
star
22

generator-easy-ui5

Meta-generator various project types within the UI5 Universe
JavaScript
200
star
23

fundamental-vue

Vue.js components implementation of Fundamental Library Styles guidelines. The library is aiming to provide a Vue.js implementation of the components designed in Fundamental Library Styles.
Vue
189
star
24

ui5-typescript

Tooling to enable TypeScript support in SAP UI5 projects
TypeScript
182
star
25

fundamental-react

React implementation of the reusable component library designed in Fundamental Library Styles
JavaScript
178
star
26

python-pyodata

Enterprise-ready Python OData client
Python
169
star
27

go-hdb

SAP HANA Database Client for Go
Go
152
star
28

fundamental-styles

SAP Fiori, theme-able, accessible component library for building SAP user interfaces with any web technology.
JavaScript
151
star
29

curated-resources-for-domain-driven-design

You want to get started with Domain-Driven Design or are looking for advanced learning resources in this topic? Then this collection of curated learning resources is a good place to check out.
149
star
30

btp-solution-diagrams

SAP Business Technology Platform solution diagram repository, based on the official SAP BTP Solution diagram guideline. This has been designed in accordance with the SAP Fiori Horizon principles and color palette which provides a holistic and pleasing aesthetic and user experience.
TypeScript
143
star
31

project-portal-for-innersource

Lists all InnerSource projects of a company in an interactive and easy to use way. Can be used as a template for implementing the "InnerSource portal" pattern by the InnerSource Commons community.
JavaScript
142
star
32

cloud-mta-build-tool

Multi-Target Application (MTA) build tool for Cloud Applications https://sap.github.io/cloud-mta-build-tool
Go
139
star
33

odata-vocabularies

SAP Vocabularies for semantic markup of structured data published via OData (www.odata.org) services.
JavaScript
135
star
34

ui5-inspector

With the UI5 Inspector, you can easily debug and support your OpenUI5/SAPUI5 based apps.
JavaScript
135
star
35

e-mobility-charging-stations-simulator

OCPP-J charging stations simulator
TypeScript
127
star
36

sap-btp-service-operator

SAP BTP service operator enables developers to connect Kubernetes clusters to SAP BTP accounts and to consume SAP BTP services within the clusters by using Kubernetes native tools.
Go
125
star
37

cloud-security-services-integration-library

Integration libraries and samples for authenticating users and clients bound to XSUAA authentication and authorization service or identity authentication service.
Java
125
star
38

cloud-sdk-js

Use the SAP Cloud SDK for JavaScript / TypeScript to reduce development effort when building applications on SAP Business Technology Platform that communicate with SAP solutions and services such as SAP S/4HANA Cloud, SAP SuccessFactors, and many others.
HTML
124
star
39

kafka-connect-sap

Kafka Connect SAP is a set of connectors, using the Apache Kafka Connect framework for reliably connecting Kafka with SAP systems
Scala
121
star
40

ui5-uiveri5

End-to-end testing framework for SAPUI5
JavaScript
120
star
41

project-kb

Home page of project "KB"
Python
112
star
42

C4CODATAAPIDEVGUIDE

The SAP Cloud for Customer OData API Developer’s Guide complements the SAP Cloud for Customer OData API Reference (a link will be provided later) with usage details and samples for SAP Cloud for Customer OData API in a format that is most convenient to developers. Furthermore, it also covers known restrictions and limitations.
Java
108
star
43

olingo-jpa-processor-v4

The JPA Processor fills the gap between Olingo V4 and the database, by providing a mapping between JPA metadata and OData metadata, generating queries and supporting the entity manipulations.
Java
108
star
44

sqlalchemy-hana

SQLAlchemy Dialect for SAP HANA
Python
107
star
45

sap-btp-reference-architectures

This repository contains "SAP BTP reference architectures" based on the official BTP solution diagrams and icons..
106
star
46

power-monitoring-tool-for-macos

Power Monitor is an application that measures and reports the power consumption of a Mac.
Objective-C
104
star
47

yeoman-ui

Provide rich user experience for Yeoman generators using VSCode extension or the browser.
TypeScript
101
star
48

script-to-package-tool-for-macos

Script2Pkg is an application for creating payload-free installer packages for macOS.
HTML
98
star
49

cloud-sdk-ios-fiori

SwiftUI implementation of the SAP Fiori for iOS Design Language.
Swift
93
star
50

ui5-cli

UI5 Tooling: CLI
JavaScript
92
star
51

gorfc

SAP NW RFC Connector for GO
Go
83
star
52

open-ux-tools

Enable community collaboration to jointly promote and facilitate best in class tooling capabilities
TypeScript
83
star
53

terraform-provider-btp

Terraform provider for SAP BTP
Go
78
star
54

cloud-active-defense

Add a layer of active defense to your cloud applications.
Go
73
star
55

Webchat

The SAP Conversational AI webchat let you deploy a bot straight to a website
JavaScript
73
star
56

project-foxhound

A web browser with dynamic data-flow tracking enabled in the Javascript engine and DOM, based on Mozilla Firefox (https://github.com/mozilla/gecko-dev). It can be used to identify insecure data flows or data privacy leaks in client-side web applications.
73
star
57

cf-java-logging-support

The Java Logging Support for Cloud Foundry supports the creation of structured log messages and the collection of request metrics
Java
71
star
58

risk-explorer-for-software-supply-chains

A taxonomy of attacks on software supply chains in the form of an attack tree, based on and linked to numerous real-world incidents and other resources. The taxonomy as well as related safeguards can be explored using an interactive visualization tool.
JavaScript
71
star
59

openui5-docs

OpenUI5 Markdown Documentation
69
star
60

abap-atc-cr-cv-s4hc

ABAP test cockpit cloud readiness check variants for SAP S/4HANA Cloud
TypeScript
69
star
61

fundamental-tools

Web applications with ABAP, done simple.
JavaScript
68
star
62

devops-docker-images

A collection of Dockerfiles for images that can be used to implement Continuous Delivery pipelines for SAP development projects with project "Piper" or any other CD tool.
JavaScript
68
star
63

ui5-builder

UI5 Tooling: Builder
JavaScript
67
star
64

machine-learning-lab

ML Lab enables teams to be more productive in delivering machine learning solutions for their products and datasets.
JavaScript
67
star
65

karma-ui5

A Karma plugin for UI5
JavaScript
66
star
66

cloud-s4-sdk-examples

Runnable example applications that showcase the usage of the SAP Cloud SDK.
Java
65
star
67

apibusinesshub-integration-recipes

Accelerate integration projects using SAP Cloud Platform Integration with crowdsourced best practices, curated by experts, designed for developers.
Java
62
star
68

fosstars-rating-core

A framework for defining ratings for open source projects. In particular, the framework offers a security rating for open source projects that may be used to assess the security risk that comes with open source components.
Java
59
star
69

abap-file-formats

File formats that define and specify the file representation for ABAP development objects
ABAP
55
star
70

apibusinesshub-api-recipes

Accelerate integration projects using SAP Cloud Platform API Management with crowdsourced best practices, curated by experts, designed for developers.
JavaScript
54
star
71

ui5-language-assistant

VSCode Extension and Editor Tooling for SAPUI5
TypeScript
51
star
72

open-ux-odata

Enable community collaboration to jointly promote and facilitate best in class framework and tooling capabilities when working with OData services.
TypeScript
51
star
73

ui5-server

UI5 Tooling: Server
JavaScript
46
star
74

cloud-sdk

The SAP Cloud SDK documentation and support repository.
HTML
44
star
75

odata-library

Javascript library for processing OData protocol and developing OData clients.
JavaScript
43
star
76

ui5-linter

A static code analysis tool for UI5
TypeScript
43
star
77

openui5-worklist-app

OpenUI5 worklist template app
JavaScript
40
star
78

cf-nodejs-logging-support

Node.js Logging Support for Cloud Foundry provides the creation of structured log messages and the collection of request metrics
JavaScript
39
star
79

neonbee

A reactive dataflow engine, a data stream processing framework using Vert.x
Java
39
star
80

xml-tools

A Set of libraries for working with XML in JavaScript, mainly focused on Editor Tooling Scenarios.
JavaScript
38
star
81

cf-html5-apps-repo-cli-plugin

Cloud Foundry CLI plugin to work with SAP Cloud HTML5 Applications Repository
Go
38
star
82

code-pal-for-abap-cloud

Code Pal for ABAP - Cloud Edition helps ABAP developers adhere to clean code standards
ABAP
38
star
83

ui5-migration

A tool to support the migration of UI5 projects by adapting code for new UI5 framework versions.
JavaScript
37
star
84

odbc-cpp-wrapper

An object-oriented C++-wrapper of the ODBC API
C++
37
star
85

ui5-project

UI5 Tooling: Project Handling
JavaScript
37
star
86

devops-cm-client

Simple command line interface to handle basic change management related actions via ODATA requests.
Java
36
star
87

theming-base-content

Color, font and metric definitions of SAP themes to be used by application UIs and UI frameworks.
Less
35
star
88

hybris-commerce-eclipse-plugin

A plugin for Eclipse IDE that makes developers more efficient when developing on SAP Hybris Commerce.
Java
34
star
89

abap-to-json

ABAP to JSON serializer and deserializer
ABAP
33
star
90

emobility-smart-charging

Smart charging algorithms with REST API for electric vehicle fleets
Java
33
star
91

backgrounds

Backgrounds is an application that allows users to create their own custom background (wallpaper) for their Mac desktop. They can choose between two gradient types - linear and radial - and embed a logo. Each pixel of the background is calculated and optimized for the size of the connected screens.
Objective-C
33
star
92

project-piper-action

CI/CD tooling for the SAP Ecosystem, integrated with GitHub Actions
JavaScript
31
star
93

openui5-fhir

The openui5-fhir project connects the worlds of UI5 and FHIR®. Build beautiful and enterprise-ready web applications based on the FHIR® specification.
JavaScript
31
star
94

less-openui5

Build OpenUI5 themes with Less.js.
JavaScript
29
star
95

vscode-webview-rpc-lib

Provides a conventient way to communicate between VSCode extension and his Webviews. Use RPC calls to invoke functions on the webview and receive callbacks.
TypeScript
29
star
96

openui5-website

The OpenUI5 website.
JavaScript
27
star
97

ewm-cloud-robotics

Source code, containers & Helm charts enabling users to leverage the core of Google Cloud Robotics to automate fulfilment warehouse orders & tasks commissioned by SAP EWM
Python
27
star
98

ui5-webcomponents-ngx

UI5 Web Components for Angular provides directives for each UI5 Web Component. The directives allow to easily build your Angular application following the SAP Design System.
TypeScript
27
star
99

sap-commerce-db-sync

SAP Commerce extensions to perform table-to-table replication in single-directionally manner between two SAP Commerce instances or between SAP Commerce and an external database.
Java
26
star
100

ui5-manifest

This project contains the flattend json schema for the ui5 manifest.
26
star