Statische Code-Analyse mit Python

13
Statische Code-Analyse mit Python Python Meeting Düsseldorf Timo Stollenwerk

Transcript of Statische Code-Analyse mit Python

Page 1: Statische Code-Analyse mit Python

Statische Code-Analyse mit Python

Python Meeting Düsseldorf

Timo Stollenwerk

Page 2: Statische Code-Analyse mit Python

Statische Code-Analyse

● Prüfung von Quellcode● Falsifizierendes Verfahren● White-Box Testverfahren

Page 3: Statische Code-Analyse mit Python

Was wird analysiert?

● Code Standards● Syntaktische Fehler● „Bad Smells“● Metriken (LOC, Komplexität, ...)

Page 4: Statische Code-Analyse mit Python

PEP8

● Style Check

Page 5: Statische Code-Analyse mit Python

PyFlakes

● Syntax-Checks● Bad Smells● Import-Checks

Page 6: Statische Code-Analyse mit Python

PyLint

● Style-Checks● Syntax-Checks● Bad Smells● Metriken

Page 7: Statische Code-Analyse mit Python

Flake 8

● Syntax-Checks● Bad Smells● Style-Checks● Metriken

Page 8: Statische Code-Analyse mit Python

PyChecker

● Syntax-Checks● Bad Smells● Import-Checks

Page 9: Statische Code-Analyse mit Python

Wo prüfen?

Page 10: Statische Code-Analyse mit Python

IDE (ST2)

Page 11: Statische Code-Analyse mit Python

VCS: Git pre-commit hook

Page 12: Statische Code-Analyse mit Python

Continuous Integration (Jenkins)

https://jenkins.plone.org/job/plone-4.3-code-analysis/

Page 13: Statische Code-Analyse mit Python

Fragen?