Playground to test out automated code quality / linting comments on fellow work.
This has been done for the test repo, but you'll need to take these steps in the Code Climate UI for any other repos to enable GitHub PR comments.
Code Climate's documentation for this is here
The manual setup is laborious on a per repo basis but Pursuit has ~1,000 repos so we can't give Code Climate blanket authorization. In the future we can try to use the Code Climate API to automate these steps.
- Go to the Code Climate site
- Choose
Login > Quality
- Use your GitHub account to sign up or log in
- Choose the
Open Source
organization (or joinpursuit if that is an option) - This should take you to a dashboard screen that lists Repositories
- Make sure your repo is public.
- Click
Add a repository
- After Code Climate has synced the GH repos you're associated with, scroll down and find the repo you want to add. Click
Add Repo
. - You'll see Code Climate do some build steps that should take ~2 minutes
- When the success modal appears, click
See Results
to go to the repo view. The view for this repo is here. Troubleshooting
- Your repo may need to be public.
- Code Climate's idea of alphabetical order is A-Z, then a-z
- Choose the
Repo Settings
tab - Choose
GitHub
on the left menu. - Click
Pull request comments > Set up
- Go through the Oauth flow to authorize Codeclimate:
- Choose the
Pursuit org
- Important Choose
Only select repositories
and select your repo, then clickInstall
- You'll be dumped on github.com so you'll need to navigate back to the
Repo Settings > GitHub
UI on Code Climate - Flip on the toggle for
Inline issue comments
- Set maximum number of comments per issue to your desired number (5 is the default; this repo is set to 10)
- Hit
Save
- This repo also has
Pull request status updates
installed. I am not sure if this is a requirement in order to get the inline PR comments.
- Open a PR against your repo
- You should see the Code Climate check running (if you installed
Pull request status updates
) - If any of the files you touched have Code Climate errors or eslint errors, you should see inline commments. Example PR with comments