Automating Code Reviews for Salesforce Apps

  • Published on
    13-Apr-2017

  • View
    145

  • Download
    0

Transcript

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