Code Climate Lunch & Learn Example
Example files: https://gist.github.com/dblandin/589e70345774298e1622850349c31876
- Install the Code Climate browser extension
- Fork this project
-
Modify
foo_bar.rb
with this content from gist -
Push to fork and open PR against master
git add foo_bar.rb git commit -m "Add FooBar" git push origin master hub pull-request # or using the GitHub UI
You should now see complexity issues reported by Code Climate as a commit status and via the browser extension. Test coverage reporting should also show uncovered lines via the browser extension and a drop in coverage via a commit status.
-
Modify
spec/foo_bar_spec.rb
with this content from gist -
Commit and push to your fork PR branch
git add spec/foo_bar_spec.rb git commit -m "Add FooBar specs" git push origin master
You should now see green annotations which mean those lines are now covered by
-
Commit and push to your fork PR branch
git add duplication.rb duplication_2.rb git commit -m "Add duplication" git push origin master
You should now see duplication issues reported by Code Climate.