Skip to content

This is the Ruby capstone project. I developed a linter who has 5 rules about for any CSS files

Notifications You must be signed in to change notification settings

bertil291utn/ruby-linters

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Linter for CSS files

This linter checks simpler error like and suggests alternatives to improve your code

Rules

  • More than two break line
  • More than 53 characters in a single line
  • Have a break line after method and comment
  • Have blank space after the class name
  • Repeated method name
  • Have colon and/or in a method line

Built With

  • Ruby 2.6

Getting start

In order to start with the project:

  1. You need to have Ruby environment installed. Click here for instructions
  2. Clone this repository 📘
  3. Run the main file
    • In a terminal window write ruby [your_file_path]main.rb
  4. Once you get the file to enter your CSS file path. By default, it is set style.css in the examples folder, it doesn't matter always it has been returned a file it's going to return value
Without path With path
image image

Testing

We are using RSpec testing tool to test all enumerable methods. Also some detailed documentation about this tool

Install

  • In a terminal window type gem install rspec
  • Once rspec install has finished, type rspec --init
  • You will see a folder spec and a file .rspec
  • Inside spec folder you'll see a spec_helper.rb file.

Run

We have already created a file called logic_spec.rb, if you want to create another one with the end [your file name]_spec.rb

  • Open ./spec/logic_spec.rb file
  • Open a terminal window and type rspec
  • If all test were passed you will see:

image

Else you'll see a red message, then check errors and fix them

Author

👤 Bertil Tandayamo

🤝 Contributing

Contributions, issues, and feature requests are welcome!

Feel free to submit a new suggestion issues page.

Show your support

Hit the ⭐️ button if you like this project!

About

This is the Ruby capstone project. I developed a linter who has 5 rules about for any CSS files

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages