Ensuring that a codebase is consistent in style is both hard and costly, yet it is extremely important for maintainability and to reduce technical debt. This problem is one of the many pain points we are currently tackling with source{d} Lookout, our brand new assisted code review framework.
The purpose of source{d} Lookout is to bring assisted code review to anyone in an easy-to-setup, easy-to-use, easy-to-extend fashion. To achieve that, source{d} Lookout watches Github repos and triggers a set of analyzers when new code is sent for review or pushed.
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Assisted code review with source{d} lookout
1. 2/4/2019 Assisted Code Review with source{d} Lookout
http://vmarkovtsev.github.io/mloncode-meetup-2019-webinar/ 1/52
Assisted Code Review with
source{d} Lookout
Vadim Markovtsev
Machine Learning for
Large Scale Code Analysis
2. 2/4/2019 Assisted Code Review with source{d} Lookout
http://vmarkovtsev.github.io/mloncode-meetup-2019-webinar/ 2/52
Plan
Origins
What is Lookout?
SDK
From scratch: typo correction
1.
2.
3.
4.
14. 2/4/2019 Assisted Code Review with source{d} Lookout
http://vmarkovtsev.github.io/mloncode-meetup-2019-webinar/ 14/52
When to help?
While you type = IDE
While you check = CI
While you review = PR
Periodically, asynchronously = cron
•
•
•
•
15. 2/4/2019 Assisted Code Review with source{d} Lookout
http://vmarkovtsev.github.io/mloncode-meetup-2019-webinar/ 15/52
IDE
Instant feedback
Rich information
Rich UI
Instant feedback
Many different IDEs and languages
+
+
+
–
–
16. 2/4/2019 Assisted Code Review with source{d} Lookout
http://vmarkovtsev.github.io/mloncode-meetup-2019-webinar/ 16/52
CI
Part of the workflow
More time to run
No UI
Must not be wrong
Longer feedback loop
+
+
–
–
–
17. 2/4/2019 Assisted Code Review with source{d} Lookout
http://vmarkovtsev.github.io/mloncode-meetup-2019-webinar/ 17/52
PR reviews
Part of the workflow
More time to run
UI
Should not be wrong
Longer feedback loop
+
+
+
–
–
18. 2/4/2019 Assisted Code Review with source{d} Lookout
http://vmarkovtsev.github.io/mloncode-meetup-2019-webinar/ 18/52
cron
Plenty of time to run
Outside of the workflow
No UI
Longest feedback loop
+
–
–
–
20. 2/4/2019 Assisted Code Review with source{d} Lookout
http://vmarkovtsev.github.io/mloncode-meetup-2019-webinar/ 20/52
When to help?
While you type = IDE
While you check = CI
While you review = PR ←
Periodically, asynchronously
•
•
→
•
21. 2/4/2019 Assisted Code Review with source{d} Lookout
http://vmarkovtsev.github.io/mloncode-meetup-2019-webinar/ 21/52
Welcome to the Codacy Blog
Insights for software builders
Subscribe
22. 2/4/2019 Assisted Code Review with source{d} Lookout
http://vmarkovtsev.github.io/mloncode-meetup-2019-webinar/ 22/52
What is
Lookout?
23. 2/4/2019 Assisted Code Review with source{d} Lookout
http://vmarkovtsev.github.io/mloncode-meetup-2019-webinar/ 23/52
Goals
Assisted code review platform
Tight git/GitHub integration
Analyzed language agnostic
Implementation language agnostic
Batteries included
•
•
•
•
•
49. 2/4/2019 Assisted Code Review with source{d} Lookout
http://vmarkovtsev.github.io/mloncode-meetup-2019-webinar/ 49/52
Steps
Install lookout-sdk-ml and autocorrect
Write typos.py
Fork a repo, create a PR
Generate a new GitHub Personal Access Token
Run our analyzer
1.
2.
3.
4.
5.
51. 2/4/2019 Assisted Code Review with source{d} Lookout
http://vmarkovtsev.github.io/mloncode-meetup-2019-webinar/ 51/52
Summary
source{d} decided to build products for assisted code review
Lookout is a great platform for assisted code review
Writing new analyzers is easy and fun
•
•
•