Skip to content

This project is a CSS linter (Linter_Alpha). It checks for various CSS errors such as multiple semicolons, a wrong indentation on code lines, and errors in spacing while opening curly braces.

Notifications You must be signed in to change notification settings

Alaska01/Lint_Alpha

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CSS Linter

About

CSS Linter project at [Microverse] This project is a CSS Linter that checks for various CSS errors such as multiple semicolumns, semicolons, a wrong indentation on code lines, and error in spacing while opening curly braces. I named the CSS Linter Alpha_Lint. It was built as a Ruby Capstone project at Microverse to show my efficiency in using OOP in ruby language and the ability to work with minimal supervision. Here is a screenshot of the working code displaying error it uncovered in a CSS code. screenshot

Built With

  • RUBY

ONLINE VIDEO EXPLANING THE PROJECT

Rules Created for Alpha_Lint

  • Checks for multiple semicolumns on a single line throughout the code
  • Checks for multiple columns on a single line throughout the code
  • Checks empty block on a single line in the code file throughout the code
  • Checks wrong code indentation throughout the code within code blocks
  • Checks incorrect positioning of column and semicolumn side by side

Good Code

screenshot

Bad Code

screenshot

Getting Started 🚀

These instructions will get you a copy on how to get your Alphat_Lint running on your local machine to debug CSS code errors. The gem colorize will also need to be installed to have a colored output. Follow this link on how to install the colorize gem.

How To Run Checks 🔧

  • You may also want to watch the video for a graphical demonstration how to run the code and avoid some errors on windows machine. Video Link Here

From your command line, first clone the project:

# Clone this repository
$ git clone https://github.com/Alaska01/Lint_Alpha.git
$ cd Lint_Alpha/
$ cd bin/
-Before proceeding ensure that the main.rb file on LINE one is having no space for windows machines i.e change "# !/usr/bin/env" ruby to be "#!/usr/bin/env ruby" without a space between the hash or pound symbol and the exclamation mark symbol. Thanks.
# Go to the command line/terminal and type the following command
$ ./main.rb '../css/good_code.css'
-OR
$ ./main.rb '../css/bug.css'

# Running RSPEC Check
- Use the following command to go a step backward into the root directory after running your tests cases for good_code.css and bug.css
$ cd ..
- Run the command rspec in the root directory.
$ rspec



## Author
👤 **Aye Daniel A*****

- [Github](https://github.com/Alaska01)
- [Twitter](https://twitter.com/AyeAsoo)
- [Linkedin](https://www.linkedin.com/in/daniel-asoo-aye/)

## Show your support

Give a ⭐️ if you like this project!

## Acknowledgments

- I acknowledge Microverse, the global remote school for developers.
- I appreciate The Odin Project for providing the project and making lessons simple to learn.

## 📝 License

This project is MIT licensed.

About

This project is a CSS linter (Linter_Alpha). It checks for various CSS errors such as multiple semicolons, a wrong indentation on code lines, and errors in spacing while opening curly braces.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published