brew

https://github.com/homebrew/brew

Ruby

🍺 The missing package manager for macOS

RuboCop::Cop::FormulaAuditStrict::ComponentsOrder#reorder_components

Reorder two nodes in the source, using the corrector instance in autocorrect method
Components of same type are grouped together when rewriting the source
Linebreaks are introduced if components are of two different methods/blocks/multilines

Source | Google | Stack overflow

Edit

git clone [email protected]:homebrew/brew.git

cd brew

open Library/Homebrew/rubocops/components_order_cop.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-RuboCop--Cop--FormulaAuditStrict--ComponentsOrder-reorder_components-for-pr


# Commit to git

git add Library/Homebrew/rubocops/components_order_cop.rbgit commit -m "better docs for RuboCop::Cop::FormulaAuditStrict::ComponentsOrder#reorder_components"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-RuboCop--Cop--FormulaAuditStrict--ComponentsOrder-reorder_components-for-pr

hub pull-request


# Celebrate!