Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

travis ci build fails due to linting errors ? #1868

Closed
tabshaikh opened this issue Feb 6, 2019 · 6 comments
Closed

travis ci build fails due to linting errors ? #1868

tabshaikh opened this issue Feb 6, 2019 · 6 comments

Comments

@tabshaikh
Copy link
Collaborator

tabshaikh commented Feb 6, 2019

Description

What problem are we solving? What does the experience look like today? What are the symptoms?
We use Stylelint which gives us protection from various CSS issues, so if the pr doesn't follow the linting rules of the css the travis build fails.

Evidence

The travis error log will look something like this ->
linting_fix

@tabshaikh tabshaikh changed the title My travis ci build fails due to linting errors ? travis ci build fails due to linting errors ? Feb 6, 2019
@tabshaikh
Copy link
Collaborator Author

tabshaikh commented Feb 6, 2019

Answer
To fix the build failure due to linting errors in the local dev we may want to change all the statements that violate the linting rules. This can be done by running npm run lint:fix inside the docker container which will fix show all the css files with the rule violations which may have to be manually fixed.
To go inside the docker container :
docker-compose exec web bash

@shreyansh23
Copy link
Contributor

I installed open library using using docker, so to check the linting errors I had to do

docker-compose exec web bash
make test

@tabshaikh
Copy link
Collaborator Author

tabshaikh commented Feb 6, 2019

@shreyansh23 i also use docker but i can use the command normally outside too can you confirm?
l

@shreyansh23
Copy link
Contributor

Yes @tabshaikh I can also run the command outside but to see the errors I had to go inside the container.
Using npm run lint:fix,
screenshot from 2019-02-06 23-25-26

Using make test
screenshot from 2019-02-06 23-27-16

@tabshaikh
Copy link
Collaborator Author

tabshaikh commented Feb 6, 2019

@shreyansh23 Thanks for the confirmation. Updated my answer, we are trying to build a faq for new contributors where all questions and answers would be stored in this wiki https://github.com/internetarchive/openlibrary/wiki/Beginner's-FAQ. If you have some questions feel free to add them to it :)

@mekarpeles
Copy link
Member

This is great! @tabshaikh has linked this question on our wiki -- closing this as an issue :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants