arthepsy / sonar-tools

useful SonarQube tools for running analysis
MIT License
2 stars 0 forks source link

Not fetching flawfinder report data into xml report in Windows. #1

Open HassanQayyum1993 opened 4 years ago

HassanQayyum1993 commented 4 years ago

Hi, When I ran the following command on Windows. ~/bin/flawfinder -DQS /path/to/source | ./ar.flawfinder.build_report.py > /path/to/flawfinder.report.xml

It does not fetch data to flawfinder.report.xml. However the flawfinder.report.xml when created does have the tag

<results></results>

in it.

I further verified by running ~/bin/flawfinder -DQS /path/to/source > flawfinder.txt. That it reports error in flawfinder.txt.

I think that first command is not successfully transferring information to the second command after pipe while running on Windows. Please provide a solution.

XNinety9 commented 4 years ago

Had the same issue, changed the regex on line 43 from ^([^:]+):([0-9]+):[0-9]* +\[([0-9]+)\] +\(([^(]*)\) +([^:]+): +(.*)$ to ^([^:]+):([0-9]+): +\[([0-9]+)\] +\(([^(]*)\) +([^:]+):(.*)$

Now works like a charm.