Skip to content

This is a basic linter that verifies that all the parentheses and brackets were properly used. This is a console app that runs using Ruby for the logic and Rspec for testing.

Notifications You must be signed in to change notification settings

balerum03/linter_capstone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

linter_capstone

This project consists in the development of a basic linter, in this case I choose to validate in a given file if all of the parenthesis, square brackets and curly brackets were properly close in each line.

This is an example of some bad code and the output you can get when using the linter I created.

screenshot screenshot

This is an example of some right code and the output you can get when using the linter I created.

screenshot screenshot

Built With

  • Ruby

technology/gem used

  • Rubocop
  • colorize
  • Rspec

Prerequisites

  • Ruby must be Installed on your system
  • Basic command line knowledge

Setup

  • Download or clone the repository.
  • Make sure that you have the gems require install in this case just colorize and rubocop.
  • Run a CLI and run ruby main test_file.rb on your local machine.

Run Test

Open your terminal and follow this simple steps:

  • Once you have cloned the Repository, you would need to move to the folder where the project is located by running cd linter_capstone (remember that you have take in consideration the location of this project on your own machine)
  • When you get to project directory then run gem install colorize
  • Then you move the bin directory by running cd bin
  • The only thing left to do is run the program by typing ruby main file_to_be_tested.rb (make sure the file you are testing is a ruby file with the .rb extension)
  • One thing to notice is that the file_to_be_tested.rb has to be typied as the relative path for the file you want this program to analize.

Basic instructions on how to use this linter.

You can run the basic linter just as shown in the image below, where the tester_file.rb can be you ruby file (remeber to use relative path). screenshot The code shown on the image would work if you want to use the tester.rb file provided for testing on this repository.

Author

👤 Adan Fernandez Bonilla

🤝 Contributing

Contributions, issues and feature requests are welcome!

Feel free to check the issues page.

Show your support

Give a ⭐️ if you like this project!

Acknowledgments

  • Microverse
  • GitHub
  • TheOdinProject
  • Ruby

📝 License

This project is MIT licensed.

About

This is a basic linter that verifies that all the parentheses and brackets were properly used. This is a console app that runs using Ruby for the logic and Rspec for testing.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages