Files
metasploit-gs/docs/metasploit-framework.wiki/Using-Rubocop.md
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
866 B
Markdown
Raw Normal View History

2017-06-06 13:31:38 -05:00
# Rubocop
2021-08-30 13:34:53 -05:00
Rubocop is a great tool for beginning and experienced Ruby coders. Previously, we suggested that developers run Rubocop on code to give suggestions for improvement. Since then, we've worked hard to get the rules right, and now we ask everyone submitting ruby code to run the code through rubocop with automatic fixes enabled.
2017-06-06 13:31:38 -05:00
## Installing Rubocop
[Installing Rubocop](https://github.com/bbatsov/rubocop) is really easy. Simply go to your metasploit-framework directory and run:
```gem install rubocop```
## Running Rubocop
2021-08-30 13:34:53 -05:00
Run ```rubocop -a <ruby file>```
2017-06-06 13:31:38 -05:00
2017-06-06 13:37:43 -05:00
#### But I copied it from another module!
2021-08-30 13:34:53 -05:00
Consistency is a virtue only when it is correct. (In all seriousness, use your best judgement here, and don't be afraid to ask.). Also, we allow cleaning up other modules too, though be forewarned, please have a way to test any modules you clean up!