Skip to content
Permalink
Browse files

new check: remove descriptions (#688)

* remove descriptions

* Create 88.md
  • Loading branch information...
larshp committed Apr 9, 2019
1 parent 23e4741 commit 3eeed02ba6509d3d0613713f0681047a89902ef4
@@ -0,0 +1,8 @@
---
title: Remove method and attribute descriptions
cNumber: CHECK_88
rfc: false
---

### Remove method and attribute descriptions
todo
@@ -0,0 +1,80 @@
CLASS zcl_aoc_check_88 DEFINITION
PUBLIC
INHERITING FROM zcl_aoc_super_root
CREATE PUBLIC .

PUBLIC SECTION.

METHODS constructor .

METHODS get_message_text
REDEFINITION .
METHODS run
REDEFINITION .
PROTECTED SECTION.
PRIVATE SECTION.
ENDCLASS.



CLASS ZCL_AOC_CHECK_88 IMPLEMENTATION.


METHOD constructor.

super->constructor( ).

version = '001'.
position = '088'.

has_documentation = c_true.
has_attributes = abap_true.
attributes_ok = abap_true.

mv_errty = c_error.

add_obj_type( 'INTF' ).
add_obj_type( 'CLAS' ).

ENDMETHOD.


METHOD get_message_text.

CLEAR p_text.

CASE p_code.
WHEN '001'.
p_text = 'Remove description, &1'. "#EC NOTEXT
WHEN OTHERS.
super->get_message_text( EXPORTING p_test = p_test
p_code = p_code
IMPORTING p_text = p_text ).
ENDCASE.

ENDMETHOD.


METHOD run.

* abapOpenChecks
* https://github.com/larshp/abapOpenChecks
* MIT License

DATA: lt_texts TYPE STANDARD TABLE OF seocompotx WITH DEFAULT KEY,
ls_text LIKE LINE OF lt_texts.


SELECT * FROM seocompotx INTO TABLE lt_texts
WHERE clsname = object_name
AND langu = sy-langu.

LOOP AT lt_texts INTO ls_text.
inform( p_test = myname
p_kind = mv_errty
p_code = '001'
p_param_1 = ls_text-cmpname ).
ENDLOOP.

ENDMETHOD.
ENDCLASS.
@@ -0,0 +1,29 @@

CLASS ltcl_test DEFINITION FOR TESTING
DURATION SHORT
RISK LEVEL HARMLESS
FINAL.

PRIVATE SECTION.
* ================

DATA: mo_check TYPE REF TO zcl_aoc_check_88.

METHODS:
setup,
export_import FOR TESTING.

ENDCLASS.

CLASS ltcl_test IMPLEMENTATION.
* ==============================

METHOD setup.
CREATE OBJECT mo_check.
ENDMETHOD.

METHOD export_import.
zcl_aoc_unit_test=>export_import( mo_check ).
ENDMETHOD.

ENDCLASS.
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<abapGit version="v1.0.0" serializer="LCL_OBJECT_CLAS" serializer_version="v1.0.0">
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
<asx:values>
<VSEOCLASS>
<CLSNAME>ZCL_AOC_CHECK_88</CLSNAME>
<LANGU>E</LANGU>
<DESCRIPT>Remove method and attribute descriptions</DESCRIPT>
<STATE>1</STATE>
<CLSCCINCL>X</CLSCCINCL>
<FIXPT>X</FIXPT>
<UNICODE>X</UNICODE>
<RSTAT>P</RSTAT>
<WITH_UNIT_TESTS>X</WITH_UNIT_TESTS>
</VSEOCLASS>
<LINES>
<TLINE>
<TDFORMAT>*</TDFORMAT>
<TDLINE>abapOpenChecks</TDLINE>
</TLINE>
<TLINE>
<TDFORMAT>*</TDFORMAT>
<TDLINE>https://github.com/larshp/abapOpenChecks</TDLINE>
</TLINE>
<TLINE>
<TDFORMAT>*</TDFORMAT>
<TDLINE>MIT License</TDLINE>
</TLINE>
</LINES>
</asx:values>
</asx:abap>
</abapGit>

0 comments on commit 3eeed02

Please sign in to comment.
You can’t perform that action at this time.