terryyin / lizard

A simple code complexity analyser without caring about the C/C++ header files or Java imports, supports most of the popular languages.
Other
1.82k stars 248 forks source link

Failed to detect abstract methods without method body in Java. #308

Closed cg122 closed 3 years ago

cg122 commented 3 years ago

Code metrics do not make much sense for abstract methods without method body. Is it an intentional design to not return results for any abstract methods in Java? But it should be taken into consideration for file level metrics.

Failed following test added in testJava.py:

    def test_abstract_function_without_body(self):
        result = get_java_function_list("abstract void fun();")
        self.assertEqual(1, len(result))
terryyin commented 3 years ago

Hi @cg122 , do you mean an abstract method should be counted as 1 function?