Building Custom Linter.
This custom Linter is built to be able to check for errors in codes within files with specificities for checking brackets/parenthesis, curly braces, and square brackets errors to determine whether they are correctly closed.
- Ruby
- colorize
- Rubocop
- Rspec
- Installed Ruby on your local machine(system).
- Basic to intermediate command line skills.
- Clone the repository to your local machine first.
- Ensure required colorize and rubocop gems are installed.
Follow these steps on your computer terminal:
- After cloning the Repository, change directory to the project folder by running
cd My_Linter_Capstone_project
( take note of the location of this project on your own machine) - On project directory then run
gem install colorize
- Then change to the bin folder/directory by running
cd bin
- Run the program by typing
ruby main.rb ../test/test.rb
into your CLI and press ENTER key (This is to test run how this custom linter is working with test.rb file on this project that contains lines of codes for demonstration )
To use this custom linter;
- Navigate to project folder by running
cd My_Linter_Capstone_project
on the CLI. - When you get to the project folder
then run gem install colorize
(to add color to the output message(s)). - Then run
cd bin
to navigate to bin folder. - On the bin folder type
ruby main.rb ../file_to_be_tested.rb
and press ENTER key. Thefile_to_be_tested.rb
is thefile's relative path
(Do not forget to use the file relative path with preceding '../' afterruby main.rb
in this format:ruby main.rb ../file_relative_path
). It is important that the file to be tested should have .rb extension.
To install the gem file, run;
$ bundle install
Ensure bundler is already installed on your system, else run
$ gem install bundler
or you can simply install it directly using
$ gem install rspec
I used rspec.
to test the code. After installing the rspec gem
, to start testing run cd My_Linter_Capstone_project
to navigate to project folder on the CLI. Then type rspec
on your terminal and press ENTER key.
👤 Adesoji Adewumi
- Github: @AdesojiCodeMaster
- Linkedin: @adesoji-adewumi
- Twitter: [@codemas22665735(https://twitter.com/codemas22665735)]
Suggestions, Contributions and feature requests would be appreciated! Do not hesitate to make use of the issues page.
Give a ⭐️ if you like this project!
- Microverse
- GitHub
- TheOdinProject
This project is MIT licensed.