abaplint icon indicating copy to clipboard operation
abaplint copied to clipboard

Allow unimplemented interface methods in test classes

Open sbcgua opened this issue 5 years ago • 6 comments

image

sbcgua avatar Apr 03 '20 19:04 sbcgua

in 702, I don't know any way to get around the syntax warnings

for abapGit I do prefer to not have syntax warnings in the source code. Its a mess and a lot of work to add empty methods, but PARTIALLY IMPLMENTED, https://syntax.abaplint.org/?filter=interface#/statement/InterfaceDef, only works from 740sp02 and up

image

image

larshp avatar Apr 04 '20 07:04 larshp

hmm, that's interesting ... in my system "Validate" does not give the warning for a test class. However SCI does. And seems that cannot be disabled by params. That's very unfortunate. I was so happy to find that test classes implicitly support "partial implemented" on 731. Otherwise all methods of the interface must be redefined as empty methods which sucks.

Hmmm, i don't know. What do you think ? The test classes works with partially implemented and at least does not show this error on Ctrl+F3. And this makes sense. Maybe create an option in the rule ?

class ltcl_da_stub definition final for testing duration short risk level harmless.
  public section.
    interfaces zif_ede_data_accessor. " HAS MANY METHODS AND JUST ONE IMPLEMENTED
    " AND NO WARNINGS FROM CTRL+F3
endclass.

sbcgua avatar Apr 04 '20 08:04 sbcgua

we can add an option no problem, but I prefer not enabling it for abapGit

long term solution is moving abapGit to 740 syntax, and then automagically downporting it

larshp avatar Apr 04 '20 08:04 larshp

hmmm, ok.

sbcgua avatar Apr 04 '20 09:04 sbcgua

After implementing 76 empty IF_HTTP... methods, I would welcome an option to disable this. I can see abaplint can ignore it for test classes but downporting fails.

pokrakam avatar Jan 13 '25 16:01 pokrakam

PARTIALLY IMPLMENTED, https://syntax.abaplint.org/?filter=interface#/statement/InterfaceDef, only works from 740sp02 and up

larshp avatar Jan 13 '25 16:01 larshp