16
Automated Code Review Process By Sandesh Sharma

Automated code review process

Embed Size (px)

Citation preview

Page 1: Automated code review process

Automated Code Review Process

By Sandesh Sharma

Page 2: Automated code review process

Contents

Problem Statement Available Tools

Gerrit SONAR

Page 3: Automated code review process

Problem Statement Should Cover Following Requirements

Architecture & Design Comments Coding Rules Potential Bugs Complexity Unit Tests Duplications

Can Integrate with Continuous Integration Environment (CI Integration with SVN, Maven and Ant Build)

Create task using the JIRA on bugs Running locally Collaboration and Manual Code review Process Maintenance

Page 4: Automated code review process

Gerrit

A Basic Commit-to-Deploy Pipeline Collaborative Approach (Peer to Peer Code

Review) Developer Notifications Dashboard & Reports Sharing across Multiple branches with Gerrit + Jenkins The Human Factor Pro-tips/best practices

Page 5: Automated code review process

Gerrit

Page 6: Automated code review process

Gerrit

Page 7: Automated code review process

The Gerrit Flow

gerrit upstream

dev-adev-b

Page 8: Automated code review process

Flow of changes

Create Local

Branch% git checkout -b topic-branch

work

Push to

Gerrit% git push gerrit HEAD:refs/for/master

Page 9: Automated code review process

Flow of changes

Create Local

Branch

work

Push to

GerritReview

Fix commit

Upstream repo

rejected

approved/submitted

rebased!

Page 10: Automated code review process

rejected

Your development work-flow in commands

git checkout -b local-topic-branch

work work work git rebase -i upstream/master # fix up commits git push gerrit HEAD:refs/for/master

Create new commits based on reviews git rebase -i upstream/master # squash up git push gerrit HEAD:refs/for/master

Page 11: Automated code review process

SONAR

Community based free software distribution Under the license LGPL v3.

Bigger Code Quality Matrix with wide range of plug-ins. Integration with

Maven JIRA SVN Eclipse Ant

Interactive Reports API Doc’s creation

Page 12: Automated code review process

SONAR

Page 13: Automated code review process

SONAR Project Dashboard

Page 14: Automated code review process

SONAR Defect Detection

Page 15: Automated code review process

SONAR Design Analysis: Package Cycles

Page 16: Automated code review process

thAnks

ersandeshsharma [at] gmail.com