jbenden / vscode-c-cpp-flylint

A VS Code extension for advanced, modern, static analysis of C/C++ that supports a number of back-end analyzer programs.
MIT License
153 stars 29 forks source link

Duplicate code detector - Lizard #175

Open binarymaker opened 2 years ago

binarymaker commented 2 years ago

Can integrate code duplication detect feature from lizard tool.

Ex below

lizard -Eduplicate <path to your code>
jbenden commented 1 year ago

Hi,

There exists an extra argument parameter to Lizard, which would support this use-case:

{
  "c-cpp-flylint.lizard.extraArgs": ["-Eduplicate"]
}

Best regards, -Joe

binarymaker commented 1 year ago

Proper parsing of duplicate message not happening

Error popup in vscode

'Line could not be parsed: Duplicates' while validating: c:\Users\arungo1\Documents\Training\ceedling\led\src\io.c. Please analyze the 'C/C++ FlyLint' Output console. Stacktrace: Error: Line could not be parsed: Duplicates
    at c:\Users\arungo1\.vscode\extensions\jbenden.c-cpp-flylint-1.12.1\server\out\server.js:2:39162
    at Array.forEach (<anonymous>)
    at o.parseLines (c:\Users\arungo1\.vscode\extensions\jbenden.c-cpp-flylint-1.12.1\server\out\server.js:2:38911)
    at o.lint (c:\Users\arungo1\.vscode\extensions\jbenden.c-cpp-flylint-1.12.1\server\out\server.js:2:38814)
    at c:\Users\arungo1\.vscode\extensions\jbenden.c-cpp-flylint-1.12.1\server\out\server.js:2:48254
    at Array.forEach (<anonymous>)
    at L (c:\Users\arungo1\.vscode\extensions\jbenden.c-cpp-flylint-1.12.1\server\out\server.js:2:48229)
    at async c:\Users\arungo1\.vscode\extensions\jbenden.c-cpp-flylint-1.12.1\server\out\server.js:2:51293