rubocop-dmp_roadmap 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 6e46dd11c9e29a4d65ef6d4cee89566d7a470611a8170a226eaaa9ac275fe69d
4
+ data.tar.gz: f905a7362e092f04a0046e8c2a022907b5229e077d3a196d5565bc1c1f6286e4
5
+ SHA512:
6
+ metadata.gz: af5c9a007d7c1b629ba87a54ea74fde12c079b59a30096ca5810687bbbc9daa5be3ae3ac6ccacb9eaac71ec543bfd07c03ac5ceca86e8307dbaa3eb6865becb0
7
+ data.tar.gz: 8d757c185fb7b1ec342efd6280859456e0d0fd5376049c1cd61a0e86344615e354b9fecae677ceeef1dfedd7b7b30123da7617c2fc8124addc560fe1022879fa
data/README.md ADDED
@@ -0,0 +1,56 @@
1
+ # DMP Roadmap Rubocop Style guide
2
+
3
+ Install this gem in your Ruby project to check your code against DMP Roadmap's style guide using Rubocop.
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ group :development, :test do
11
+
12
+ gem 'rubocop-dmp_roadmap', require: false
13
+
14
+ end
15
+ ```
16
+
17
+ And then execute:
18
+
19
+ $ bundle
20
+
21
+ Or install it yourself as:
22
+
23
+ $ gem install rubocop-dmp_roadmap
24
+
25
+ ## Usage
26
+
27
+ If you don't already have a `.rubocop.yml` file, create one in your repo's root directory now:
28
+
29
+ ``` yml
30
+ # .rubocop.yml
31
+
32
+ require: rubocop/dmp_roadmap
33
+
34
+ inherit_gem:
35
+ rubocop-dmp_roadmap:
36
+ - config/default.yml
37
+ ```
38
+
39
+ ## Rationales
40
+
41
+ This file over-writes some of the default assertions in the `rubocop` gem, and the `rubocop-rails` gem. Over-written cops are defined in the [config directory](https://github.com/DMPRoadmap/rubocop-dmp_roadmap/tree/master/config/).
42
+
43
+
44
+ ## Development
45
+
46
+ After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
47
+
48
+ 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 tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
49
+
50
+ ## Contributing
51
+
52
+ Bug reports and pull requests are welcome on GitHub at https://github.com/DMPRoadmap/rubocop-dmp_roadmap
53
+
54
+ ## License
55
+
56
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
@@ -0,0 +1,20 @@
1
+ # Global configuration for Rubocop
2
+ #
3
+ AllCops:
4
+ # Cache the results for faster processing
5
+ UseCache: true
6
+ # Show the name of the cops being voilated in the feedback
7
+ DisplayCopNames: true
8
+ DisplayStyleGuide: true
9
+ # We're using Ruby 2.4 right now. So force that version or higher.
10
+ TargetRubyVersion: 2.4
11
+ # Don't check these files. So many of them are boilerplate code with violations.
12
+ Exclude:
13
+ - 'bin/*'
14
+ - 'lib/tasks/**/*'
15
+ - 'Gemfile'
16
+ - 'db/**/*'
17
+ - 'config/**/*'
18
+ - 'script/**/*'
19
+ - '**/Rakefile'
20
+ - '**/config.ru'
@@ -0,0 +1,13 @@
1
+ inherit_gem:
2
+ rubocop-rails:
3
+ - config/rails.yml
4
+
5
+ inherit_from:
6
+ - ./allcops.yml
7
+ - ./lint.yml
8
+ - ./style.yml
9
+ - ./metrics.yml
10
+ - ./layout.yml
11
+
12
+ Rails:
13
+ Enabled: true
data/config/layout.yml ADDED
@@ -0,0 +1,27 @@
1
+ # Ignore this cop. The Rubocop default is sensible, but the rubocop-rails gem modifies
2
+ # this to position else keywords awkwardly.
3
+ Layout/ElseAlignment:
4
+ Enabled: false
5
+
6
+ # Ignore this cop. The Rubocop default is sensible, but the rubocop-rails gem modifies
7
+ # this to position end keywords awkwardly.
8
+ Layout/EndAlignment:
9
+ Enabled: false
10
+
11
+ # Force no empty lines at the start or end of a block's body. Ignore specs, since this
12
+ # improves readability within the RSpec blocks.
13
+ Layout/EmptyLinesAroundBlockBody:
14
+ Exclude:
15
+ - 'spec/**/*'
16
+
17
+ # Force a single blank line around a class's body. Adding this whitespace makes code
18
+ # a bit easier to read.
19
+ Layout/EmptyLinesAroundClassBody:
20
+ Enabled: true
21
+ EnforcedStyle: empty_lines
22
+
23
+ # Force a single blank line around a module's body. Adding this whitespace makes code
24
+ # a bit easier to read.
25
+ Layout/EmptyLinesAroundModuleBody:
26
+ Enabled: true
27
+ EnforcedStyle: empty_lines
data/config/lint.yml ADDED
@@ -0,0 +1,5 @@
1
+ # Enforce this in the main code but ignore it in specs since the Rspec core methods
2
+ # are defined as potentially ambiguous blocks
3
+ Lint/AmbiguousBlockAssociation:
4
+ Exclude:
5
+ - 'spec/**/*'
@@ -0,0 +1,18 @@
1
+ # Restrict the length of each line of code to 90 characters. Enforcing this is important
2
+ # as many developers are working on smaller screens, or split screens. Having to scroll
3
+ # to read a full line of code makes code harder to read and more frustrating to work with.
4
+ Metrics/LineLength:
5
+ # I've found that 90 is a suitable limit. Many developers balk at the 80 character
6
+ # default.
7
+ Max: 90
8
+ Exclude:
9
+ # Excludes the spec helper, since this boilerplate file has comments that are much
10
+ # longer.
11
+ - 'spec/spec_helper.rb'
12
+
13
+ # Restrict the number of lines of code that may be within a block of code. This should
14
+ # force developers to break their code into smaller discrete methods or objects.
15
+ Metrics/BlockLength:
16
+ # Exclude specs, since those are defined as large blocks of code
17
+ Exclude:
18
+ - 'spec/**/*'
data/config/style.yml ADDED
@@ -0,0 +1,33 @@
1
+ # This cop enforces the use of boolean and/or "&&" and "||" over "and" "or".
2
+ # Sometimes using "and"/"or" is preferrable, when these are used as control flow.
3
+ #
4
+ # For example:
5
+ #
6
+ # render text: "Hello world" and return
7
+ #
8
+ Style/AndOr:
9
+ Enabled: false
10
+
11
+ # This cop enforces how modules and classes are nested within another module or class.
12
+ # In Rails code (e.g. models and controllers) nesting with a colon is preferrable (e.g.
13
+ # User::Session).
14
+ Style/ClassAndModuleChildren:
15
+ Exclude:
16
+ - 'app/**/*'
17
+
18
+ # This cop enforces each class to have documentation at the top. That's not always
19
+ # practical or necessary in Rails apps (e.g. the purpose of helpers is self evident).
20
+ Style/Documentation:
21
+ Enabled: false
22
+
23
+ # Enforce double quotes. Don't allow single quotes. This is preferred since double
24
+ # quotes are more useful (they support escaping characters, and interpolation).
25
+ Style/StringLiterals:
26
+ Enabled: true
27
+ EnforcedStyle: double_quotes
28
+
29
+ # Enforce empty methods to be written across two lines, like any normal method would be.
30
+ # This allows for easy modification of the method in future.
31
+ Style/EmptyMethod:
32
+ Enabled: true
33
+ EnforcedStyle: expanded
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "rubocop/dmp_roadmap/version"
4
+
5
+ module Rubocop
6
+ module DmpRoadmap
7
+ # Your code goes here...
8
+ end
9
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Rubocop
4
+ module DmpRoadmap
5
+ VERSION = "1.0.0"
6
+ end
7
+ end
metadata ADDED
@@ -0,0 +1,124 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rubocop-dmp_roadmap
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Bodacious
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2018-08-09 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rubocop
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 0.58.2
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: 0.58.2
27
+ - !ruby/object:Gem::Dependency
28
+ name: rubocop-rails_config
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 0.2.2
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: 0.2.2
41
+ - !ruby/object:Gem::Dependency
42
+ name: rubocop-rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: 1.27.0
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: 1.27.0
55
+ - !ruby/object:Gem::Dependency
56
+ name: bundler
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - '='
60
+ - !ruby/object:Gem::Version
61
+ version: 1.16.1
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - '='
67
+ - !ruby/object:Gem::Version
68
+ version: 1.16.1
69
+ - !ruby/object:Gem::Dependency
70
+ name: rake
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - '='
74
+ - !ruby/object:Gem::Version
75
+ version: 12.3.1
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - '='
81
+ - !ruby/object:Gem::Version
82
+ version: 12.3.1
83
+ description: DMP Roadmap Rubocop style guide checks
84
+ email:
85
+ - bodacious@katanacode.com
86
+ executables: []
87
+ extensions: []
88
+ extra_rdoc_files: []
89
+ files:
90
+ - README.md
91
+ - config/allcops.yml
92
+ - config/default.yml
93
+ - config/layout.yml
94
+ - config/lint.yml
95
+ - config/metrics.yml
96
+ - config/style.yml
97
+ - lib/rubocop/dmp_roadmap.rb
98
+ - lib/rubocop/dmp_roadmap/version.rb
99
+ homepage: https://github.com/DMPRoadmap/rubocop-DMP_Roadmap
100
+ licenses:
101
+ - MIT
102
+ metadata: {}
103
+ post_install_message:
104
+ rdoc_options: []
105
+ require_paths:
106
+ - lib
107
+ - config
108
+ required_ruby_version: !ruby/object:Gem::Requirement
109
+ requirements:
110
+ - - ">="
111
+ - !ruby/object:Gem::Version
112
+ version: '0'
113
+ required_rubygems_version: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ requirements: []
119
+ rubyforge_project:
120
+ rubygems_version: 2.7.6
121
+ signing_key:
122
+ specification_version: 4
123
+ summary: Rubocop style checks for DMP Roadmap projects.
124
+ test_files: []