GithubHelp home page GithubHelp logo

vichuge / rb-capstone-rubocop Goto Github PK

View Code? Open in Web Editor NEW
7.0 1.0 0.0 54 KB

A rubocop version made by myself for ruby language. This tool helps to get the rubocop issues in a script.

License: MIT License

Ruby 100.00%
rubocop rspec ruby-language ruby linters

rb-capstone-rubocop's Introduction

Rubocop linters

A rubocop version made by myself for ruby language. This tool helps to get the rubocop issues in a script.

screenshot

This project was build with ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x64-mingw32]

Built With

  • Ruby
  • Rubocop
  • Rspec

Set up locally

  • Clone the repository.
  • Make sure that you install ruby, open the CMD and type "ruby -v". If you can't see the version install ruby here!.
  • Make sure to have rspec in your computer after ruby, if you don't have rspec, you can install it opening your terminal and typing "gem install rspec". Use "rspec --version" to check if the installation was completed.
  • Open the folder in a terminal and run the main file with "ruby bin/main.rb".
  • Check the rspec test using "rspec" in the terminal.

Rules

As a style checker, this tool helps in specific ways to have your code according to good practices in ruby language. Here you can see some examples who explain rules and to know what exactly mark this tool when you run it.

== Right spaces

Is not good to have right blank-space(s) in a line after logic.

# bad - blank-spaces after code
def some_method    
  #Code here...
end

# good
def some_method
  #Code here...
end

== Blank line at the start

Consider blank lines at the script start.

# bad - a blank line

def some_method
  #Code here...
end

# good
def some_method
  #Code here...
end

== Semicolon

A Semicolon after the line is not required.

# bad - using a semicolon
puts "I'm a puts";

# good
puts "I'm a puts"

== Navigation operator

When a navigation operator is used, is not required to have blank spaces between the operator and the elements.

# bad
foo &. bar
foo &.bar
foo&. bar

# good
foo&.bar

== Space between elements in Array

The array should have a blank space between the open key with the first element, between the comma with next element, and before the close key.

# bad
[ 1,2, 3 ]
[1, 2, 3]

# good
[ 1, 2, 3 ]

== Space between exponent operator is not required

The exponent operator symbol and the elements should be together.

# bad
e  = M * c ** 2

# good
e = M * c**2

Authors

๐Ÿ‘ค Victor Pacheco

๐Ÿค Contributing

Contributions, issues, and feature requests are welcome!

Feel free to check the issues page.

Show your support

Give an โญ๏ธ if you like this project!

๐Ÿ“ License

This project is MIT licensed, thanks.

rb-capstone-rubocop's People

Contributors

vichuge avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.