Skip to content

Ruby-linter was created with the intention of catching some syntax common errors in ruby files, errors like unexpected use of parenthesis and ends.

Notifications You must be signed in to change notification settings

AlanSoto31/ruby-linter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ruby-linter

Ruby-Linter

Project created by Alan Soto Valle
It was based on the capstone in the Ruby Module in Microverse

Table of Contents

About-ruby-linter

Ruby-linter was created with the intention of catching some syntax common errors in ruby files, such errors are:

  • Unexpectected use of parenthesis
  • Unexpectected use of ends

About-the-project

I created a linter for ruby files (files.rb) using Ruby.

The goals of this project are:

  • Practice with OOP (Object Oriented Programming) using Ruby.
  • Learn how to create and structure a Ruby project.
  • Learn to manage the files with correct usage to make code maintainable.
  • Practice Git Flow and Github Flow creating branches for different features and for version control.
  • Practice to use of regex.
  • Learn how to read whole files.

Linter-examples

Examples of a bad and good use of parentheses

Example 1 Example 2 Example 3

Examples of a bad and good use of do/if/while/def with end

Example 4 Example 5

Built-with

  • Ruby

Setup-ruby-linter

To get a local copy up and running follow these simple example steps.

Prerequisites

Computer running Mac OS, Windows, or Linux Ubuntu. Internet browser: Firefox, Google Chrome, Opera...

Have Ruby installed you can see this link for more detailed instructions Install Ruby

Installation

You MUST have Ruby installed in your system. If you don't have it installed you can go this page Install Ruby

After installing ruby, you can download the repo or clone it (paste on the terminal) git@github.com:AlanSoto31/ruby-linter.git

Ruby-linter

You will need to execute the main file located inside the bin folder. If you are using Window, follow next step.

Windows

Open the terminal and navigate to the folder using cd path-to-folder containing ruby-linter Once you are inside, your terminal should look like this: User//oop-ruby/. You can type or paste this on terminal ruby bin/main.rb to run the linter.

Mac-and-linux

Most Mac and some of Linux computers come with ruby installed, but still need to verify by typing in your terminal ruby --version if not please go back to Installation section.

After verifying you have ruby installed and completing the Installation section, open the terminal navigate using cd path-to-folder containing the ruby-linter and run in the terminal ruby bin/main.rb to run the linter.

Testing-your-own-code

After running main.rb you are going to see a demonstration of what the linter is going to catch, opening test.rb file automatically, in order to parse a different piece of code, you have two ways:

1.- Copy and paste the code you want to test inside test.rb file 2.- Replace the test.rb file with you own file but remember to keep "test" as file's name

👥 Authors

👤 Alan Soto

🤝 Contributing

Contributions, issues, and feature requests are welcome!

Show-your-support

Give a ⭐️ if you like this project!

About

Ruby-linter was created with the intention of catching some syntax common errors in ruby files, errors like unexpected use of parenthesis and ends.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages