GithubHelp home page GithubHelp logo

irfanahmadin / rubocop-auto-correct Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tomoya/rubocop-auto-correct

0.0 2.0 0.0 93 KB

Auto-correct ruby source code by using rubocop in Atom.

Home Page: https://atom.io/packages/rubocop-auto-correct

License: MIT License

Ruby 0.32% CoffeeScript 99.68%

rubocop-auto-correct's Introduction

rubocop-auto-correct package Build Status

Auto-correct ruby source code by using rubocop in Atom.

rubocop-auto-correct:current-file

Prerequisites

You have rubocop installed.

$ gem install rubocop

Usage

  1. Run Rubocop Auto Correct: Current File from Command Palette
  2. Select Rubocop Auto-correct in Context menu
  3. Select [Packages] -> [Rubocop Auto-correct] -> [Current File] in menu bar

Commands

Name Description
RUbocop Auto Correct: Current File Run rubocop auto-correct to current file
RUbocop Auto Correct: Toggle Notification Toggle notification option
RUbocop Auto Correct: Toggle Only Fixed Notification Toggle only fixes notification option
RUbocop Auto Correct: Toggle Auto Run Toggle auto run option
RUbocop Auto Correct: Toggle Debug Mode Toggle debug-mode option

Keymap example

This package does not provide default keymap.

If you want to use the commands from keybinding, please set up ~/.atom/keymap.cson following the below:

'atom-text-editor[data-grammar~="ruby"]':
  'alt-r': 'rubocop-auto-correct:current-file'

Settings

rubocop-auto-correct setting panel

If you have a custom .rubocop.yml, this package will search it on project's root folder or on $HOME/.rubocop.yml

Auto Run

This package supports auto-run. When checked, it runs Rubocop auto correct. But, it does not run automatically unless you activate this package.

You can activate it by running manually Rubocop Auto Correct: Current File once at Atom window.

  • default value is false

You can enable/disable this option by Rubocop Auto Correct: Toggle Auto Run command at any time.

Correct File

You can correct a file directly if you enable this option. You do not need to save file after correcting it.

  • default value is false

I recommend you to enable Auto Run & Correct File options. Then, all files are corrected automatically.

Notification

When this option is disabled, you do not receive any notifications even thought a file is corrected.

  • default value is true

You can enable/disable this option by Rubocop Auto Correct: Toggle Notification command at any time.

Only Fixes Notification

When this option is disabled, you will get all rubocop notifications appeared.

  • default value is true

You can enable/disable this option by Rubocop Auto Correct: Toggle Only Fixes Notification command at any time.

Rubocop Command Path

If you already installed rubocop, please check package setting at Rubocop Command Path. For example ~/.rbenv/shims/rubocop.

If you want to set arguments, please set arguments with command at here. For example rubocop --format simple

  • default value is rubocop

Debug Mode

When this option is disabled, you can get log on console.

  • default value is false

You can enable/disable this option by Rubocop Auto Correct: Toggle Debug Mode command at any time.

Contributing

  1. Fork it ( https://github.com/tomoya/rubocop-auto-correct/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

rubocop-auto-correct's People

Contributors

tomoya avatar rfocosi avatar imnotquitejack avatar

Watchers

James Cloos avatar Irfan Ahmad 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.