Build a CSS linter as a Ruby Capstone Project for Ruby module. The linter checks css file incase of such errors: for Extra/Unnecessary empty lines, Indentation(2 spaces)- private method, and Last Empty Line Space before bracket.
- Install Ruby
$ ruby -v
$ gem install ruby
- Set-Up the project locally
- $ git clone https://github.com/jebitok-dev/Ruby-linter
- $ git checkout develop
- run ```$ bundle```
Open the folder you want to check on your terminal and type the following command! run linter on good file
$ ruby ./bin/markup.rb lib/good.css
run linter on bad file
$ ruby ./bin/markup.rb lib/bad.css
- Ruby
- Ruby-Rubocop
- Github
- RSpec for Testing
In this version release, we will check the following issues:
- Extra/Unnecessary empty lines.
- Indentations (By Default and as far, for now, it will check indentations of 2).
- Last Empty Line.
- Space before bracket.
-
Bad Code
1 body{ 2 width: 101px; 3 }
Good Code
1 body { 2 width: 101px; 3 } 4
-
Bad Code
1 body { 2 width: 101px; 3 }
or
1 body { 2 width: 101px; 3 }
Good Code
1 body { 2 width: 101px; 3 } 4
-
Bad Code
1 body { 2 width: 101px; 3 } 4 section { 5 height: 300px; 6 }
Good Code
1 body { 2 width: 101px; 3 } 4 5 section { 6 height: 300px; 7 } 8
-
Bad Code
1 body { 2 width: 101px; 3 } 4 5 section { 6 height: 300px; 7 } Good Code ```css 1 body { 2 width: 101px; 3 } 4 5 section { 6 height: 300px; 7 } 8
Open the terminal and checkout the parent project folder and run:
$ rspec
๐ค Sharon Jebitok
- GitHub: @Jebitok-dev
- Twitter: @Jsebitok
- LinkedIn: LinkedIn
Contributions, issues, and feature requests are welcome!
To get a local copy up and running follow these simple example steps.
- Fork the repository
- git clone https://github.com/your_username/Ruby-linter
- git checkout develop
- git checkout -b branch name
- run ```$ bundle```
- git remote add upstream https://github.com/jebitok-dev/Ruby-linter
- git pull upstream develop
- git commit -m "commit message"
- git push -u origin HEAD
Give a โญ๏ธ if you like this project!
- Inspired by Microverse
This project is MIT licensed.