Skip to content

CodeQuality: Doxygen regex doesn't work for a warning that's on two lines #135

@lit-af

Description

@lit-af

Hi,

I found a small bug with the Doxygen regex, the code-quality report generated description field is incomplete when there a warning message that's on two lines.

DoxygenWarningsLog.txt

C:/DEV/kog-ipc-common/src/kog_ipc.c:485: warning: The following parameter of Ipc_handleReceivedMessage(KogIpc_t *pIpc, IpcMessageEnvelope_t *pMessage, bool *pDisposeEnvelope) is not documented:
  parameter 'pDisposeEnvelope'

Doxygen_quality.json

    {
        "severity": "major",
        "location": {
            "path": "kog-ipc-common\\src\\kog_ipc.c",
            "lines": {
                "begin": 485
            }
        },
        "description": "The following parameter of Ipc_handleReceivedMessage(KogIpc_t *pIpc, IpcMessageEnvelope_t *pMessage, bool *pDisposeEnvelope) is not documented:",
        "fingerprint": "504e0ad956f6bf387431e0737ce0708a"
    },

I'm wondering if the issue comes from my doxygen configuration or from the regex.

EDIT:
I figured out what the regex should be!

r"(?:(?P<path1>(?:[/.]|[A-Za-z]).+?):(?P<line1>-?\d+):\s*(?P<severity1>[Ww]arning|[Ee]rror)|<.+>:(?P<line2>-?\d+)(?::\s*(?P<severity2>[Ww]arning|[Ee]rror))?): (?P<description1>.+(?:(?!\s*([Nn]otice|[Ww]arning|[Ee]rror): )[^/<\n][^:\n][^/\n].+)*[\s\n]*[^/<\n][^:\n][^/\n].+)|\s*\b(?P<severity3>[Nn]otice|[Ww]arning|[Ee]rror): (?!notes)(?P<description2>.+)\n?"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions