You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now you can run `rubocop` and it will automatically load the RuboCop eightyfourcodes
33
29
cops together with the standard cops.
34
30
35
-
### Command line
36
-
37
-
```bash
38
-
rubocop --require rubocop-eightyfourcodes
39
-
```
40
-
41
-
### Rake task
31
+
## Development
42
32
43
-
```ruby
44
-
RuboCop::RakeTask.new do |task|
45
-
task.requires << 'rubocop-eightyfourcodes'
46
-
end
47
-
```
33
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
48
34
49
-
## Inspecting specific files
35
+
Use `bundle exec rake 'new_cop[EightyFourCodes/CommandLiteralInjection]'` to generate a new cop.
50
36
51
-
By default, `rubocop-eightyfourcodes` inspects all files. You can override this setting in your config file by specifying one or more patterns:
37
+
The [NodePattern Debugger](https://nodepattern.herokuapp.com/) is a very helpful resource when creating new AST matchers.
52
38
53
-
```yaml
54
-
# Inspect all files
55
-
AllCops:
56
-
EightyFourCodes:
57
-
Patterns:
58
-
- '.+'
59
-
```
60
-
61
-
```yaml
62
-
# Inspect only controller files.
63
-
AllCops:
64
-
EightyFourCodes:
65
-
Patterns:
66
-
- app/controllers/**/*.rb
67
-
```
68
-
69
-
## The Cops
70
-
71
-
All cops are located under
72
-
[`lib/rubocop/cop/eighty_four_codes`](lib/rubocop/cop/eighty_four_codes), and contain
73
-
examples/documentation.
74
-
75
-
In your `.rubocop.yml`, you may treat the eightyfourcodes cops just like any other
76
-
cop. For example:
77
-
78
-
```yaml
79
-
EightyFourCodes/CommandLiteralInjection:
80
-
Exclude:
81
-
- 'spec/**/*'
82
-
```
39
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
83
40
84
41
## Contributing
85
42
86
-
1. Fork it
87
-
2. Create your feature branch (`git checkout -b my-new-feature`)
88
-
3. Commit your changes (`git commit -am 'Add some feature'`)
89
-
4. Push to the branch (`git push origin my-new-feature`)
90
-
5. Create new Merge Request
43
+
Bug reports and pull requests are welcome on GitHub at <https://github.com/84codes/rubocop-eightyfourcodes>.
91
44
92
45
## License
93
46
94
-
`rubocop-eightyfourcodes`is MIT licensed. [See the accompanying file](LICENSE.md) for
95
-
the full text.
47
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
0 commit comments