If you are not familiar with linters and Stickler, read root level README.
Please do the following steps in this order:
- Install stickler-ci https://github.com/apps/stickler-ci
- Enable stickler in your repo. You can do it here.
- In first commit of your feature branch add a copy of .stickler.yml and .rubocop.yml to the root directory.
- Remember to use both files linked above
- Remember that
.stickler.yml
and.rubocop.yml
file names start with a dot.
- Do not make any changes in config files - they represent style guidelines that you share with your team - which is a group of all Microverse students.
- If you think that change is necessary - open a Pull Request in this repository and let your code reviewer know about it.
- When you open your first pull request you should see Stickler's report at
Checks
tab.
- Add
gem 'rubocop'
toGemfile
(not sure how to use Gemfile? Read this) - Run
bundle install
- Copy .rubocop.yml to the root directory of your project.
- Do not make any changes in config files - they represent style guidelines that you share with your team - which is a group of all Microverse students.
- If you think that change is necessary - open a Pull Request in this repository and let your code reviewer know about it.
- Run
rubocop
- Fix linter errors
- IMPORTANT NOTE: feel free to research auto-correct options for Rubocop if you get a flood of errors but keep in mind that correcting style errors manually will help you to make a habit of writing a clean code!
-
All config files are in my repo bu Stickler does not work.
- Make sure that Stickler app has permission to access your repository. Find Stickler here https://github.com/settings/installations and check its configuration.
- Try to add a new commit to your Pull Request. Stickler should detect changes in your repo and start checking your code.
-
while scanning for the next token found character '\t' that cannot start any token
error.- Please make sure that you used spaces not tabs for indentation.
-
Check if someone else has had similar problem before here.
-
Stickler does not work and nothing helps 💥 - run rubocop in your local env and correct all errors. Remember to let your Code Reviewer know that you had problems with Stickler and you used linter in local env.