bmw-software-engineering / lobster

Lightweight Open BMW Software Traceability Evidence Report
GNU Affero General Public License v3.0
17 stars 7 forks source link

`lobster-python` tool detects class name as duplicate method occurrence #89

Closed christophkloeffel closed 1 week ago

christophkloeffel commented 1 month ago

example nor.py file:

class Example:
    @trlc_reference(requirement="example.req_nor")
    def helper_function(a, b):
        # potato
        return a or b

    def nor(a, b):
        # lobster-trace: example.req_nor
        assert isinstance(a, bool)
        assert isinstance(b, bool)

        return not helper_function(a, b)

result in lobster.report:

...
"ref_down": [
            "req example.req_important",
            "python nor.Example",
            "python nor.Example-1"
          ],
...

expected:

...
"ref_down": [
            "req example.req_important",
            "python nor.Example.helper_function",
            "python nor.Example.nor"
          ],
...
phiwuu commented 1 month ago

Most likely this bug has been introduced with https://github.com/bmw-software-engineering/lobster/pull/39 or https://github.com/bmw-software-engineering/lobster/pull/67.