Automating Code Reviews for Salesforce Apps

  • Published on
    13-Apr-2017

  • View
    145

  • Download
    0

Embed Size (px)

Transcript

<ul><li><p>AUTOMATING CODE REVIEWS FOR SALESFORCE APPS</p><p>LORENZO FRATTINI</p></li><li><p>ABOUT ME</p><p>LORENZO FRATTINI</p><p> Not very photogenic </p><p> Salesforce Certified Technical Architect </p><p> 10+ years experienced in Professional Services </p><p> Strong focus on Agile &amp; DevOps </p><p> Based in London, UK </p><p> Creator of Clayton.io</p><p>https://www.clayton.io</p></li><li><p>ON TWITTER @LOFRATTINI</p></li><li><p>AS A TECHNICAL ARCHITECT, WHATS THE #1 THING YOU DO ON ANY PROJECT?</p></li><li><p>PUT CODE REVIEWS IN PLACE.MY ANSWER NORMALLY IS</p></li><li><p>CODE REVIEWS</p><p>BENEFITS OF CODE REVIEWS</p><p> Enforce standards, promote internal consistency </p><p> Make your code better </p><p> Early issue detection </p><p> Simple, yet very effective </p><p> Slowly erode your technical debt </p><p> Promote a culture in which code quality matters</p></li><li><p>CODE REVIEWS</p><p>HOW TO DO CODE REVIEWS?</p><p> Use a checklist </p><p> Simple Git workflow </p><p> Build your feature on a branch </p><p> Pull request </p><p> Comments on the pull request diff</p><p>My code review checklist available at https://github.com/eroispaziali/force-code-review-checklists</p><p>https://github.com/eroispaziali/force-code-review-checklists</p></li><li><p>CAN CODE REVIEWS BE AUTOMATED?</p><p>IDEA</p></li><li><p>AUTOMATING CODE REVIEWS</p><p>CLAYTON: IN A NUTSHELL</p><p> Connects to GitHub or Bitbucket and acts as a gatekeeper to block bad code from slipping into your repository </p><p> 100% cloud based, nothing to install </p><p> Configure your own standards </p><p> A code review is triggered every time a pull request is created/updated </p><p> Review completed in seconds with pass-or-fail result </p><p> Inline comments on the diff</p></li><li><p>CLAYTON.IODEMO</p></li><li><p>CLAYTON</p><p>SOME RESULTS</p><p> First prototype presented at Dreamforce 16, now available to the public </p><p> 27 million lines reviewed </p><p> It works! The project on the right is an AppExchange product </p><p> ~500,000 lines of code </p><p> ~10 pull requests per day (average) </p><p> 20 active developers </p><p> From 7% to 1% defect density in 2 months</p></li><li><p>CLAYTON</p><p>SOME FEATURES</p><p> GitHub and Bitbucket </p><p> Detects and reviews Apex </p><p> Support for teams </p><p> Insights </p><p> Historic issue distribution </p><p> Track team quality of contributions, per project </p><p> On the roadmap </p><p> Visualforce </p><p> Lightning </p><p> Dynamic Code Analysis</p></li><li><p>GET INVOLVED</p><p>ARE YOU INTERESTED?</p><p> Reach out on Twitter @lofrattini </p><p> Try Clayton! Go on www.clayton.io and create an account </p><p> Share your feedback and suggestions</p><p>https://twitter.com/eroispazialihttp://www.clayton.io</p></li></ul>