Repository navigation
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Before:
INTERFACE zabc_file_system PUBLIC.
TYPES:
file_info_tab TYPE STANDARD TABLE OF file_info WITH KEY filename,
separator TYPE c LENGTH 1,
BEGIN OF connection_info,
user TYPE string,
host TYPE string,
protocol TYPE string,
END OF connection_info.
METHODS:
get_supported_methods RETURNING VALUE(result) TYPE zabc_fs_method_enum=>instances,
get_description RETURNING VALUE(result) TYPE string,
file_exists IMPORTING path TYPE csequence
RETURNING VALUE(result) TYPE abap_bool
RAISING zabc_fs_unsupp_operation
zabc_file_system_exception,
read_file_bin IMPORTING path TYPE csequence
RETURNING VALUE(result) TYPE xstring
RAISING zabc_fs_unsupp_operation
zabc_file_system_exception,
read_file_text IMPORTING path TYPE csequence
codepage TYPE cpcodepage
RETURNING VALUE(result) TYPE string
RAISING zabc_fs_unsupp_operation
zabc_file_system_exception,
write_file_bin IMPORTING path TYPE csequence
content TYPE xsequence
RAISING zabc_fs_unsupp_operation
zabc_file_system_exception,
get_directory_contents IMPORTING path TYPE csequence
RETURNING VALUE(result) TYPE file_info_tab
RAISING zabc_fs_unsupp_operation
zabc_file_system_exception,
create_directory IMPORTING path TYPE csequence
RAISING zabc_fs_unsupp_operation
zabc_file_system_exception,
delete_directory IMPORTING path TYPE csequence
RAISING zabc_fs_unsupp_operation
zabc_file_system_exception,
get_default_codepage RETURNING VALUE(result) TYPE cpcodepage
RAISING zabc_fs_unsupp_operation
zabc_file_system_exception,
get_separator RETURNING VALUE(result) TYPE separator
RAISING zabc_fs_unsupp_operation
zabc_file_system_exception,
get_connection_info RETURNING VALUE(result) TYPE connection_info
RAISING zabc_fs_unsupp_operation
zabc_file_system_exception.
ENDINTERFACE.After:
INTERFACE zabc_file_system PUBLIC.
TYPES:
file_info_tab TYPE STANDARD TABLE OF file_info WITH KEY filename,
separator TYPE c LENGTH 1,
BEGIN OF connection_info,
user TYPE string,
host TYPE string,
protocol TYPE string,
END OF connection_info.
METHODS: get_supported_methods RETURNING VALUE(result) TYPE zabc_fs_method_enum=>instances,
get_description RETURNING VALUE(result) TYPE string,
file_exists IMPORTING !path TYPE csequence
RETURNING VALUE(result) TYPE abap_bool
RAISING zabc_fs_unsupp_operation
zabc_file_system_exception,
read_file_bin IMPORTING !path TYPE csequence
RETURNING VALUE(result) TYPE xstring
RAISING zabc_fs_unsupp_operation
zabc_file_system_exception,
read_file_text IMPORTING !path TYPE csequence
codepage TYPE cpcodepage
RETURNING VALUE(result) TYPE string
RAISING zabc_fs_unsupp_operation
zabc_file_system_exception,
write_file_bin IMPORTING !path TYPE csequence
content TYPE xsequence
RAISING zabc_fs_unsupp_operation
zabc_file_system_exception,
get_directory_contents IMPORTING !path TYPE csequence
RETURNING VALUE(result) TYPE file_info_tab
RAISING zabc_fs_unsupp_operation
zabc_file_system_exception,
create_directory IMPORTING !path TYPE csequence
RAISING zabc_fs_unsupp_operation
zabc_file_system_exception,
delete_directory IMPORTING !path TYPE csequence
RAISING zabc_fs_unsupp_operation
zabc_file_system_exception,
get_default_codepage RETURNING VALUE(result) TYPE cpcodepage
RAISING zabc_fs_unsupp_operation
zabc_file_system_exception,
get_separator RETURNING VALUE(result) TYPE separator
RAISING zabc_fs_unsupp_operation
zabc_file_system_exception,
get_connection_info RETURNING VALUE(result) TYPE connection_info
RAISING zabc_fs_unsupp_operation
zabc_file_system_exception.
ENDINTERFACE.This might resolve itself if the method definition are broken up into multiple statements, which doesn't seem to work currently for interfaces (#12).
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Activity
jmgrassau commentedon May 21, 2023
Hi Fabian,
not sure what you mean with "unaligns method declarations" here: As far as I can see, the main difference between "Before" and "After" is that empty lines were introduced. This is done intentionally (to improve readability) by the following option in the "Align METHODS declarations" rule (and this one already works on interfaces, too :-)
If you prefer the "Before" state, you could of course deactivate this option. So, unless I misunderstood your point, I think this issue can be closed, otherwise please let me know, then we can reopen it!
Kind regards,
Jörg-Michael
fabianlupa commentedon May 21, 2023
Sorry I could have simplified the example a bit. I am talking about this part:
Before
After
Before all method definitions were at the same indentation level, after the first two are separated. Though I have no use for any changes as this will not apply anymore to me after #12.
jmgrassau commentedon May 21, 2023
Hi Fabian,
ah, now I see! Hm, yes, this seems to be a bit of a conflict between ABAP cleaner trying to create one-liners, and on the other hand breaking after METHODS: Will have to look into this!
Kind regards,
Jörg-Michael
fix AlignMethodsDeclarationRule for mixed chains (SAP#13)
jmgrassau commentedon May 21, 2023
Hi Fabian,
with the above commit, this should be fixed in the next release (version 1.2)!
Kind regards,
Jörg-Michael
fabianlupa commentedon May 22, 2023
By the way: Love the responsiveness to the issues! I would recommend to pick a different approach to closing them though. Having the fixes on a main branch in a fork that is presumeably merged some time in the future discourages people from contributing as the code base in the base repo is outdated and you cannot see pending changes directly either.
fix AlignMethodsDeclarationRule for mixed chains (#13)