LGTM (split from 'Code quality checker' thread)

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
User avatar
PrzemoF
Posts: 2649
Joined: Fri Jul 25, 2014 4:52 pm
Contact:

Re: Code quality checker

Postby PrzemoF » Wed Jun 12, 2019 3:49 pm

I did a spot check and it looks really good!

@bernd: you might be interested to take a look at it. (<-- does that @ work as expected?)
Jee-Bee
Posts: 1950
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: Code quality checker

Postby Jee-Bee » Wed Jun 12, 2019 5:28 pm

Not that i know of

Code: Select all

[quote=bernd user_id=2069]
ping
[/quote]
Works (Don't forgot the user ID).
bernd wrote: ping
User avatar
bernd
Posts: 8336
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: Code quality checker

Postby bernd » Fri Jun 21, 2019 11:45 am

Had a look at this, it finds some problems which are not found by pep8. It's great

https://lgtm.com/projects/g/FreeCAD/Fre ... de=heatmap
User avatar
bernd
Posts: 8336
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: Code quality checker

Postby bernd » Fri Jul 05, 2019 4:08 pm

It seams possible to exclude files from analysis ... https://lgtm.com/help/lgtm/customizing- ... sification

Zhis would make sense for the following file: https://github.com/FreeCAD/FreeCAD/blob ... sign.py#L1

It s autogenerated and has 881 allerts !!! https://lgtm.com/projects/g/FreeCAD/Fre ... de=heatmap
User avatar
saso
Posts: 1313
Joined: Fri May 16, 2014 1:14 pm
Contact:

Re: Code quality checker

Postby saso » Sat Jul 06, 2019 12:36 pm

I will look in to it when I will try to make it work for C++
User avatar
bernd
Posts: 8336
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: Code quality checker

Postby bernd » Mon Jul 08, 2019 7:51 am

saso wrote:
Sat Jul 06, 2019 12:36 pm
I will look in to it when I will try to make it work for C++
That would be great!

BTW: Path and Fem really reduced lgtm alerts. I found some surprising bugs I would never ever have found without ...
User avatar
bernd
Posts: 8336
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: Code quality checker

Postby bernd » Mon Jul 08, 2019 7:54 am

somehow lgtm is missing files in FEM ...


screen1.png
screen1.png (95.78 KiB) Viewed 215 times

screen2.png
screen2.png (52.99 KiB) Viewed 215 times
User avatar
saso
Posts: 1313
Joined: Fri May 16, 2014 1:14 pm
Contact:

Re: Code quality checker

Postby saso » Mon Jul 08, 2019 9:10 am

bernd wrote:
Mon Jul 08, 2019 7:51 am
I found some surprising bugs I would never ever have found without ...
Great, this is what this tools are for... There are a few FEM related issues reported also in Coverity, if you maybe want to kill some more bugs ;)
Check the three posts I made here for some basic help on how to use it https://forum.freecadweb.org/viewtopic. ... 30#p210644
bernd wrote:
Mon Jul 08, 2019 7:54 am
somehow lgtm is missing files in FEM ...
There is an "show excluded files" checkbox at the top with some more information about this.
User avatar
bernd
Posts: 8336
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: Code quality checker

Postby bernd » Mon Jul 08, 2019 11:04 am

ahh, ok. Would you move these files out of excluded files? They should be analysed as any other file in FEM.