Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Semi Automatic Code Review
Presenter: Richard Huang
Rails is so popular to be used to fast build a website, at the beginning we sometimes write codes too fast without considering code quality, but after your company grows fast, you have to pay more attentions on code review to make your website more robust and more maintainable.
In this talk I will introduce you a way to build a semi automatic code review process, in this process a tool will analyze the source codes of your rails project, then give you some suggestions to refactor your codes according to rails best practices. It can also check your codes according to your team's rails code guideline. So engineers can focus on implementation performance, scalability, etc. when they do code review.
Automation of tasks is important. This talk discussed the speaker's open-source
rails_best_practices gem (similar to JSLint in concept) and its associated web service. It can point out code smells, etc. as a GitHub hook. If you already use GitHub and do pull requests for code review, this can automate simple detection.
- He works on OpenFeint
- Prefer automatic processes to manual processes (e.g., automatic testing)
- Totally manual: code review
- Automatic tests / manual verification
- Automated deploy via Capistrano
- But can you automate code review?
- What is review?
- Coding guidelines
- Remove unused methods
- Automate "easy"
- Can suggest things like "use scope access", "use model association", or "use query attribute")
- A code review service?
- Integrates with GitHub (service hook); looks similar to Travis CI if you've used that
- Tracks history
- Gives analysis in web UI
- Cost: unclear (TODO check site; looks like donations)
- Plugins are possible (e.g., for
- Both the site and gem are OSSS