A Guide to StyleCI (Extended)

A Guide to StyleCI (Extended)

8eb6f4f9cae1b7969fc3df9d4ccd5dc4?s=128

Graham Campbell

September 19, 2017
Tweet

Transcript

  1. 2.

    Graham Campbell https://github.com/GrahamCampbell https://twitter.com/GrahamJCampbell https://gjcampbell.co.uk/ Who am I? Disclaimer: The

    views and opinions expressed are my own. StyleCI and Cachet are not associated with the University of York, Cambridge Consultants, or Bugsnag. StyleCI and Cachet are the intellectual property of Alt Three Services Limited.
  2. 3.

    Who am I? Current: • Student at the University of

    York ◦ BSc Computer Science and Mathematics Graham Campbell https://github.com/GrahamCampbell https://twitter.com/GrahamJCampbell https://gjcampbell.co.uk/ Disclaimer: The views and opinions expressed are my own. StyleCI and Cachet are not associated with the University of York, Cambridge Consultants, or Bugsnag. StyleCI and Cachet are the intellectual property of Alt Three Services Limited.
  3. 4.

    Current: • Student at the University of York ◦ BSc

    Computer Science and Mathematics • Placement at Cambridge Consultants ◦ Software Technologies, ICE Who am I? Graham Campbell https://github.com/GrahamCampbell https://twitter.com/GrahamJCampbell https://gjcampbell.co.uk/ Disclaimer: The views and opinions expressed are my own. StyleCI and Cachet are not associated with the University of York, Cambridge Consultants, or Bugsnag. StyleCI and Cachet are the intellectual property of Alt Three Services Limited.
  4. 5.

    Current: • Student at the University of York ◦ BSc

    Computer Science and Mathematics • Placement at Cambridge Consultants ◦ Software Technologies, ICE • Laravel Framework Core Team ◦ Contributing since August 2013 Who am I? Graham Campbell https://github.com/GrahamCampbell https://twitter.com/GrahamJCampbell https://gjcampbell.co.uk/
  5. 6.

    Current: • Student at the University of York ◦ BSc

    Computer Science and Mathematics • Placement at Cambridge Consultants ◦ Software Technologies, ICE • Laravel Framework Core Team ◦ Contributing since August 2013 • StyleCI Founder and Cachet Core Who am I? Graham Campbell https://github.com/GrahamCampbell https://twitter.com/GrahamJCampbell https://gjcampbell.co.uk/ Disclaimer: The views and opinions expressed are my own. StyleCI and Cachet are not associated with the University of York, Cambridge Consultants, or Bugsnag. StyleCI and Cachet are the intellectual property of Alt Three Services Limited.
  6. 7.

    Current: • Student at the University of York ◦ BSc

    Computer Science and Mathematics • Placement at Cambridge Consultants ◦ Software Technologies, ICE • Laravel Framework Core Team ◦ Contributing since August 2013 • StyleCI Founder and Cachet Core Previous: • Bugsnag UK Office ◦ Primarily worked on their PHP notifiers Who am I? Graham Campbell https://github.com/GrahamCampbell https://twitter.com/GrahamJCampbell https://gjcampbell.co.uk/ Disclaimer: The views and opinions expressed are my own. StyleCI and Cachet are not associated with the University of York, Cambridge Consultants, or Bugsnag. StyleCI and Cachet are the intellectual property of Alt Three Services Limited.
  7. 9.

    The Solution Standardizing code style across your workplace or OSS

    can be hard. December 2014 StyleCI created for my personal OSS projects.
  8. 10.

    • Easy to get started. ◦ One-click enable from StyleCI.

    ◦ Configure from the browser or a .styleci.yml. The Solution
  9. 11.

    • Easy to get started. ◦ One-click enable from StyleCI.

    ◦ Configure from the browser or a .styleci.yml. • Hours are saved! ◦ No more code style reviews as part of code reviews. ◦ StyleCI can send fixes as PR on demand. ◦ StyleCI can be configured to do this automatically! ◦ StyleCI can be configured to automatically merge its own PRs. ◦ StyleCI can also be configured to directly commit the fixes! The Solution
  10. 12.

    Automate code style: Don’t let code style take over your

    code reviews. Image source: https://hscenturion.co.za/site/wp-content/uploads/2017/01/besigheidstudies.jpg.
  11. 14.

    History December 2014 StyleCI created for my personal OSS projects.

    March 2015 Opened to everyone for public repos! July 2015 Launched private repo support and new website. June 2016 Added direct push support. July 2016 New PR analysis system. Q4 2014 Q1 2015 Q2 2015 Q3 2015 Q4 2015 Q1 2016 Q2 2016 Q3 2016 Q4 2016 Q1 2017 Q2 2017 Q3 2017 December 2016 Added Slack notifications.
  12. 17.

    • StyleCI has to interface with webhooks as well as

    web users. ◦ In fact, 43% of our requests last month were from GitHub webhooks! Architectural Problems
  13. 18.

    • StyleCI has to interface with webhooks as well as

    web users. ◦ In fact, 43% of our requests last month were from GitHub webhooks! • StyleCI has process commands/events in a good order. ◦ Double hitting repo enables, double hitting plan change forms, lots of commit events. Architectural Problems
  14. 19.

    • StyleCI has to interface with webhooks as well as

    web users. ◦ In fact, 43% of our requests last month were from GitHub webhooks! • StyleCI has process commands/events in a good order. ◦ Double hitting repo enables, double hitting plan change forms, lots of commit events. • StyleCI has to be correct with it’s fixing. ◦ We don’t want to break people’s code! Architectural Problems
  15. 20.

    • StyleCI has to interface with webhooks as well as

    web users. ◦ In fact, 43% of our requests last month were from GitHub webhooks! • StyleCI has process commands/events in a good order. ◦ Double hitting repo enables, double hitting plan change forms, lots of commit events. • StyleCI has to be correct with it’s fixing. ◦ We don’t want to break people’s code! • StyleCI has to be high performance. ◦ It has to be able to cope with daily usage. ◦ It has to return the results as fast as possible. Architectural Problems
  16. 21.

    StyleCI is Built Using Laravel 5! The Laravel Framework and

    the Laravel Trademark is the intellectual property of Taylor Otwell.
  17. 29.

    • We have commands and handlers • Some commands are

    async • Commands never return data • Commands may omit events • Commands may throw exceptions Commands
  18. 30.
  19. 31.
  20. 32.

    • We have events and handlers • All handlers are

    synchronous • Some handlers are “crashable” Events
  21. 33.
  22. 34.
  23. 35.
  24. 36.
  25. 45.
  26. 46.
  27. 47.
  28. 48.
  29. 49.
  30. 50.
  31. 51.
  32. 53.

    What are you waiting for? Sign up today for free,

    and get unlimited public repos. Paid plans are also available for private repos. https://styleci.io/