File: usage.adoc

package info (click to toggle)
ruby-rubocop-packaging 0.5.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 220 kB
  • sloc: ruby: 739; sh: 4; makefile: 4
file content (42 lines) | stat: -rw-r--r-- 708 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
= Usage

You need to tell RuboCop to load the Packaging extension. There are three
ways to do this:

== RuboCop configuration file

Put this into your `.rubocop.yml` file:

[source,yaml]
----
require: rubocop-packaging  
----

Alternatively, use the following array notation when specifying multiple
extensions:

[source,yaml]
----
require:
  - rubocop-other-extension
  - rubocop-packaging
----

Now you can run `rubocop` and it will automatically load the RuboCop Packaging  
cops together with the standard cops.

== Command line

[source,bash]
----
rubocop --require rubocop-packaging
----

== Rake task

[source,ruby]
----
RuboCop::RakeTask.new do |task|
  task.requires << 'rubocop-packaging'
end
----