- About the Project
- Built With
- Getting Started
- Prerequisites
- Contributing
- Author
- License
- Acknowledgements
R-detective is a beginner code analysis tool developed as Part of Microverse Ruby Capstone project. This tool provides feedback about code errors.
- bad comment syntax
- bad file name
- Proc.New usage
- trailing empty lines
- source file too long
- leading empty lines
- double spaces
- trailing spaces
- RUBY
```
# not acceptable
#Bad Comment
```
```
# acceptable
# Good Comment
```
```
# not acceptable
FileName
```
```
# acceptable
file_name
```
```
# not acceptable
Proc.new
```
```
# acceptable
proc
```
```
# not acceptable
reader = FileReader.new(path)
reader.file_lines.length > 100
```
```
# acceptable
reader = FileReader.new(path)
reader.file_lines.length <= 100
```
```
# not acceptable
---------------------
<- empty leading line
require 'colorize'
```
```
# acceptable
---------------------
require 'colorize'
```
```
# not acceptable
def multiplication
^double spacing
```
```
# acceptable
def multiplication
^single space
```
```
# not acceptable
def my_method |<- denoting trailing spaces
```
```
# acceptable
def my_method|<- no trailing spaces
```
- Clone this repo https://github.com/Lameck1/r-detective
- Navigate to project directory.
cd r-detective
- Run
bundle install
to install dependencies - Lastly run
bin/main.rb test_files/code_smells.rb
to check for errors the file ```code_smells.rb``
This directory Test Files, have been excluded from rubocop because it contains files only for testing the r-detective
- Run
rspec
- Ensure you have git installed.
- Ensure you have ruby programming language installed.
Contributions, issues, and feature requests are welcome!
Feel free to check the issues page.
👤 Lameck Otieno
- GitHub: @githubhandle
- Twitter: @twitterhandle
- LinkedIn: LinkedIn
This project is MIT licensed.
Credits go to the following
Give a ⭐️ if you like this project!