This project was built in ruby to check ruby code, it is a linters for beginners, it provides feedback about errors or warning in code little by little. It was developed following the best practices
In this project we are looking for the following errors:
- Wrong indentation
- Trailing spaces
- New line errors
- Empty files
- Last empty line
- Ruby
- Installed Ruby
To get a local copy up and running follow these simple example steps.
Go to git clone git@github.com:Mhdez221993/my_lin.git
To run the tests locally :
-
To instal RSpec for testing please run the following command on your terminal:
gem install rspec
To test the code, run rspec
from the root of the folder using the terminal.
-
Open your terminal:
- On Windows =>
Win + R
- On Linux =>
ctrl + alt + T
- On Mac =>
Control + Option + Shift + T
- On Windows =>
-
In your terminal run:
./bin/main.rb
this will inspect all the files in the actual directory
-
you can provide a path to test a specific file in the same directory or outside by typing:
./bin/main.rb some_file_in_my_directory.rb
./bin/main.rb ../../some_file.rb
//Good Code
def call_check_last_line
check_last_line unless File.zero?(file)
end
//Bad Code
def call_check_last_line
check_last_line unless File.zero?(file)
end
//Good Code
def call_check_last_line
check_last_line unless File.zero?(file)
end
//Bad Code
def call_check_last_line
check_last_line unless File.zero?(file)
end
//Good Code
def call_check_last_line
check_last_line unless File.zero?(file)
end
def call_check_last_line
check_last_line unless File.zero?(file)
end
//Bad Code
def call_check_last_line
check_last_line unless File.zero?(file)
end
def call_check_last_line
check_last_line unless File.zero?(file)
end
//Good Code
def call_check_last_line
check_last_line unless File.zero?(file)
end
def call_check_last_line
check_last_line unless File.zero?(file)
end
//Bad Code
def call_check_last_line
check_last_line unless File.zero?(file)
end
def call_check_last_line
check_last_line unless File.zero?(file)
end
👤 Moises Hernandez Coronado
- GitHub: @Mhdez221993
- Twitter: @MoisesH42060050
- LinkedIn: Moises Hernandez Coronado
Contributions, issues, and feature requests are welcome!
Feel free to check the issues page.
Give a ⭐️ if you like this project!
- To my coding partner who helped me through all the work
- To my Stand Up Team who kept my morale up!