readium / architecture

📚 Documents the architecture of the Readium projects
https://readium.org/architecture/
BSD 3-Clause "New" or "Revised" License
171 stars 33 forks source link

Leverage CodeBeat for automated code reviews #49

Open rkwright opened 7 years ago

rkwright commented 7 years ago

CodeBeat provides a free automated review of code in a wide variety of languages, including JavaScript, Swift, Go, TypeScript Java, and Kotlin. It is easy to use - just create a CodeBeat account and add your repository and branch. CodeBeat will then analyze the code on every checkin.

You can be notified in several ways:

Alexandre has been using it for his Swift work and has the results sent to his Slack channel. I use it myself for my "hobby" Javascript work (rkwright@github) and find it very useful. It is not a substitute for real code reviews, but it is very useful nonetheless.

Having it go directly into Slack for all of our projects might be a bit much, but might be useful.

I'll put an agenda item in next week's R2 meeting about this issue and we can discuss it.

aslagle commented 7 years ago

I'm not sure what advantages this would have over lint tools like SwiftLint, TSLint, etc. Those can usually be run from the command line or integrated into IDEs, so you can see things right away as you develop, instead of having to send your code to an external service to analyze. They're also more configurable, and can be used with something like TravisCI, so you can see the results on github linked from your commit. That can send email notifications and I'm sure it can be integrated into slack as well. You can have it run automatically on pull requests, which is nice if you want to enforce style rules before merging.

I guess CodeBeat might be easier to set up, and might be useful if you want a general sense of the quality of your code and don't care about configuring or enforcing specific rules.

danielweck commented 7 years ago

"code linting" is a useful indicator of code quality indeed, and an important step in the build workflow. The project setup of r2-streamer-js ; just like other R2 projects, I imagine ; enforces pretty strict code styling rules (not just aspects like indentation / formatting, but also "smarter" TypeScript programming conventions). A linting failure is a build failure, which TravisCI catches (resulting in developer/team notifications). This could be configured as a Git commit hook (precondition to code pushes), but the existing workflow is a sufficient deterrent to bad commits :)

I am not familiar with CodeBeat, but this service obviously appear to offer more high-level functionality for managing code updates, and is probably not mutually-exclusive with existing development practices.