review for eclipse (r4e): code and model reviews made easy

21
Review for Eclipse (R4E): Code and Model Reviews made easy Eclipse Con 2012 – Agile ALM track Sebastien Dubois, eng. Ericsson

Upload: afi

Post on 18-Jan-2016

40 views

Category:

Documents


2 download

DESCRIPTION

Review for Eclipse (R4E): Code and Model Reviews made easy. Eclipse Con 2012 – Agile ALM track Sebastien Dubois, eng. Ericsson. Presentation Plan. R4E Presentation (10 min) R4E Demo (20 min) Q&A (5 min). ALM & Code Reviews. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Review for Eclipse (R4E): Code and Model Reviews made easy

Review for Eclipse (R4E): Code and Model Reviews made easy

Eclipse Con 2012 – Agile ALM track

Sebastien Dubois, eng.

Ericsson

Page 2: Review for Eclipse (R4E): Code and Model Reviews made easy

R4E (Review4Eclipse) Presentation | Ericsson Internal | 2012-03-27 | Page 2

Presentation Plan

› R4E Presentation (10 min)› R4E Demo (20 min)› Q&A (5 min)

Page 3: Review for Eclipse (R4E): Code and Model Reviews made easy

R4E (Review4Eclipse) Presentation | Ericsson Internal | 2012-03-27 | Page 3

ALM & Code Reviews› For maximum quality and efficiency, peer

reviews should be integrated throughout the ALM workflow e.g.:– Requirements– Project Planning– Design Documents– Code– Test cases & Automated tests– Documentation

› Code reviews are done during development phase– after feature code is written– before code is released to the main

development branch for validation

› Successful Review completion should be a hard requirement before integrating code.

› Code review process is iterative.– Design -> implementation –> review –>

defects found –> defects fixed -> review -> …

(source: wikipedia)

Page 4: Review for Eclipse (R4E): Code and Model Reviews made easy

R4E (Review4Eclipse) Presentation | Ericsson Internal | 2012-03-27 | Page 4

Agile Review Process (Example)

Page 5: Review for Eclipse (R4E): Code and Model Reviews made easy

R4E (Review4Eclipse) Presentation | Ericsson Internal | 2012-03-27 | Page 5

Code Reviews: Benefits› Improve the overall code structure, aid

maintainability. › Promotes refactoring, improves code re-use. › Improves the code to handle corner cases. › Improves test cases and test coverage. › Fixes critical and rare defects (e.g. multi-

threading, concurrent access bugs). › Improves team morale. › Spreads knowledge, reduces vulnerability of

team if one key member leaves.› On average, 60 percent of defects can be

removed via code reviews. (source: Bulletproofing C++ Code, Dr Dobb's Journal, January 09, 2007)

Page 6: Review for Eclipse (R4E): Code and Model Reviews made easy

R4E (Review4Eclipse) Presentation | Ericsson Internal | 2012-03-27 | Page 6

Mylyn Reviews Subproject

Task Based Reviews

Review for EclipseEricsson

The research of Industrial software (INSO)

Sony Ericsson, Tasktop, SAP, RedHat

Gerrit Connector

INSO, Ericsson, RedHat, SAP, Tasktop

INSO, Ericsson, Tasktop

Reviews Framework

Mylyn Versions

Page 7: Review for Eclipse (R4E): Code and Model Reviews made easy

R4E (Review4Eclipse) Presentation | Ericsson Internal | 2012-03-27 | Page 7

Mylyn Reviews Subproject components› R4E (now a Mylyn sub-

subproject)› Gerrit Connector:

– Integrates Gerrit reviews with the Mylyn Task List

–Provides a rich editor for reviews–Supports offline access–Provides inline-commenting for

source code reviews– Integrates with EGit/JGit

› TBR (task-based reviews)– Lightweight review tool that

integrates with Mylyn

Page 8: Review for Eclipse (R4E): Code and Model Reviews made easy

R4E (Review4Eclipse) Presentation | Ericsson Internal | 2012-03-27 | Page 8

Mylyn Versions Subproject› Eclipse integration for source

code and configuration management tools and bi-directional linking to change management tools.

› Built on top of the existing Eclipse "Team" APIs.

› Generic API extendable to implement handling of various source code management tools as dynamic connectors

› Connectors currently implemented and available: CVS, Git, SVN (Subclipse).

Page 9: Review for Eclipse (R4E): Code and Model Reviews made easy

R4E (Review4Eclipse) Presentation | Ericsson Internal | 2012-03-27 | Page 9

R4E, a bit of history› 2005-2009: In-house tool

– Ericsson in-house Eclipse-based review tool. – Clearcase/Subversion support only.

› 2010: Mylyn Reviews– Ericsson, Tasktop, INSO (Vienna University) – Mylyn Reviews subproject: provide common framework for eclipse-

based review tools. – Other organizations (SAP, Red-Hat) also contributed.

› 2010-2011: Open Source R4E development– re-designed from the ground up.– leveraging on experience from first in-house version– decoupling the Review Engine from the Serialization, SCM,

Notification interfaces.

› 2012: Now and Future – Modeling support– First stable release– Join Eclipse Release Train

2005

2010

2012

Page 10: Review for Eclipse (R4E): Code and Model Reviews made easy

R4E (Review4Eclipse) Presentation | Ericsson Internal | 2012-03-27 | Page 10

R4E Features› Provides a reviewing environment fully

integrated with Eclipse to do peer and code reviews.

› Features:– Code Navigatability in Editors (JDT, CDT).– Review Commit/Change Sets– Review Manual selections (free form).– 3 types of reviews possible:

› Basic (Stateless)› Informal (Agile)› Formal (IEEE std. 1028-2008 compliant).

– Integrated Email client (Communication and Notifications)

– LDAP database (e.g. employee database info) support.

– Reviews can be grouped together by project, feature, team etc.

– Collaborative environment for team reviews– Design Rules definition and enforcement.– Time logging.– Review Item assignments to specific users.– Anomalies can be postponed and tracked

across multiple reviews.– Inspection and summary reports generation.– Flexible, Intuitive UI interface for efficient

Reviews.

Page 11: Review for Eclipse (R4E): Code and Model Reviews made easy

R4E (Review4Eclipse) Presentation | Ericsson Internal | 2012-03-27 | Page 11

R4E Editor Integration› Mainly targeted at Java (JDT)

and C/C++ (CDT) developers.› JDT/CDT:

– full code navigability within review files when they are synchronized with the Reviewer Workspace.

– Partial Navigability (best-effort) for external (unsynchronized) files

› Arbitrary Textual content can also be reviewed

› R4E code is extensible. Other specialized types of contents could eventually be integrated (e.g. EMF, UML, XML etc.)

Page 12: Review for Eclipse (R4E): Code and Model Reviews made easy

R4E (Review4Eclipse) Presentation | Ericsson Internal | 2012-03-27 | Page 12

R4E and Mylyn Integration

› Currently R4E only uses Mylyn Versions Interfaces to support Git/Subversion (Subclipse)

› Features planned or in development for increased Mylyn integration:– Review Group and Rule Sets as

repositories in Mylyn Team Repositories View

– Reviews as Mylyn Tasks– Anomalies as Mylyn Tasks– Integration of Reviews with Mylyn

Editor View

Page 13: Review for Eclipse (R4E): Code and Model Reviews made easy

R4E (Review4Eclipse) Presentation | Ericsson Internal | 2012-03-27 | Page 13

R4E and Model Reviews› Work to integrate

EMF Model Reviews with R4E/Mylyn is currently ongoing in 3 areas:–Papyrus/EMF compare–Egit Logical Model sup

port–Mylyn Context Bridge f

or EMF based models

› Work is done in collaboration with Obeo & Tasktop

Page 14: Review for Eclipse (R4E): Code and Model Reviews made easy

R4E (Review4Eclipse) Presentation | Ericsson Internal | 2012-03-27 | Page 14

R4E: Current status› Incubation Eclipse Project.› R4E is evolving quickly, but is stable

enough for immediate use.› Builds currently available for download at:

– http://download.eclipse.org/r4e/updates/ (stable)

– http://download.eclipse.org/r4e/snapshots/nightly/ (Nightly)

› Current version 0.9.0. 0.10.0 coming soon (April).

› Dependencies on Mylyn 3.7 (Mylyn Versions).

› SCMs supported: Git, Subversion (via Subclipse)

Page 15: Review for Eclipse (R4E): Code and Model Reviews made easy

R4E (Review4Eclipse) Presentation | Ericsson Internal | 2012-03-27 | Page 15

R4E Roadmap

› EMF Model reviews support› Mylyn Integration (tasks &

repositories)› Inline commenting markers› Workspace reviews› Workspace/Review contents

synchronization› Offline support› SVN (Subversive)› Central repository support

Page 16: Review for Eclipse (R4E): Code and Model Reviews made easy

R4E (Review4Eclipse) Presentation | Ericsson Internal | 2012-03-27 | Page 16

R4E Summary

Page 17: Review for Eclipse (R4E): Code and Model Reviews made easy

R4E (Review4Eclipse) Presentation | Ericsson Internal | 2012-03-27 | Page 17

R4E Demo Plan

› Environment:–Platform/OS: PC/Windows Vista–Eclipse Version: Indigo 3.7.2 incl. Mylyn 3.7–R4E Version: 0.9.0–Project setup: Java project on Git

› Setting Up R4E› Performing an Quick Informal Review› Model Reviews (sneak peek!)

Page 18: Review for Eclipse (R4E): Code and Model Reviews made easy

R4E (Review4Eclipse) Presentation | Ericsson Internal | 2012-03-27 | Page 18

For More information…

› Mylyn Reviews subproject page: – http://www.eclipse.org/reviews/

› Mylyn Reviews wiki page: – http://wiki.eclipse.org/Reviews

› Mylyn Reviews mailing list: – mailto:[email protected]

› R4E sub-subproject new home page (under construction):– http://www.eclipse.org/projects/project.php?id=mylyn.reviews.r4e

› R4E Builds: – http://download.eclipse.org/r4e/updates/ (stable)– http://download.eclipse.org/r4e/snapshots/nightly/ (Nightly)

Page 19: Review for Eclipse (R4E): Code and Model Reviews made easy

R4E (Review4Eclipse) Presentation | Ericsson Internal | 2012-03-27 | Page 19

Q & A

Page 20: Review for Eclipse (R4E): Code and Model Reviews made easy

R4E (Review4Eclipse) Presentation | Ericsson Internal | 2012-03-27 | Page 20

Give Feedback on the Sessions

1 Sign In: www.eclipsecon.org

2 Select Session Evaluate

3 Vote

Page 21: Review for Eclipse (R4E): Code and Model Reviews made easy