rubocop-publicdoc2 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 834d819dc85bf442a24ad2b911701413dd126f7fec7e9fcc44345ae68ec254a1
4
- data.tar.gz: 3d79c19d27543a51871337737d238f71cf9c59baa1e57d2689192f468b81bddd
3
+ metadata.gz: b3addc1e5884b6144b1f56adaa32ac5b9d86f6ea60321325ccd067e97edb57f4
4
+ data.tar.gz: da9781df68b97fd9dd4d947b9b08c6676c848a2f3e2c24b6796633193599bacc
5
5
  SHA512:
6
- metadata.gz: bb764c614208969c5772685631e569f5b4195a471c08026949e2c10979ac6aaf4a8cf23d66479658d35a9929164d15af966301a9c823db0746f02cd5acbec286
7
- data.tar.gz: 374e7fd0a4183c6241044270909030eaf4ef280cac58cea226b71721d63af973332daed2dacc49af398fc4ad475e038cbe9e225f259973841ea0c16700147ecb
6
+ metadata.gz: d6132f9ad5d2efd9517f7ad2a10bd60eab1f73f72f5c14228a4c8b5282f7512ff4d37bfa928068b587c12884a9af23b3af832e2d6cdcc5dffdee2d22d108b031
7
+ data.tar.gz: ea653ce4eea63f7331db6c7c56505a3c659651a2aad6bc51ec120219bd0398bc55332197414b2a64fd819b5076a02dafacc335ccdffcd5e96d488dd65d59cda4
data/CHANGELOG.md CHANGED
@@ -1,2 +1,7 @@
1
1
  ## New features
2
- * Style/PublicMethodDocumentation
2
+ * Style/PublicMethodDocumentation
3
+
4
+ # Changes
5
+ * 1.0.4
6
+ * Handle a rubocop_directive_comment?
7
+ * by adding offense for ''# rubocop:disable Layout/LineLength''
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rubocop-publicdoc2 (0.1.3)
4
+ rubocop-publicdoc2 (0.1.4)
5
5
  rubocop
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -26,13 +26,22 @@ TODO: Write usage instructions here
26
26
 
27
27
  ## Development
28
28
 
29
- 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.
30
-
31
- 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).
32
-
33
- ## Contributing
34
-
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/rubocop-publicdoc2. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
29
+ - Check out the repo,
30
+ - run `bin/setup` to install dependencies. Then,
31
+ - run `rake spec` to run the tests.
32
+ - You can also run `bin/console` for an interactive prompt that will allow you to experiment.
33
+
34
+ To release a new version,
35
+ - update the version number in `version.rb`,
36
+ - update CHANGELOG.md
37
+ - push (commit) changes
38
+ - then run `bundle exec rake release`,
39
+ - which will create a git tag for the version,
40
+ - push git commits and tags, and
41
+ - push the `.gem` file to [rubygems.org](https://rubygems.org).
42
+
43
+ if gem does not push then run
44
+ - gem push pkg/rubocop-publicdoc2-<new version>.gem
36
45
 
37
46
  ## License
38
47
 
@@ -41,6 +41,7 @@ module RuboCop
41
41
  MSG_DESCRIPTION_SHOULD_END_WITH_BLANK_COMMENT = 'Description should end with blank comment.'
42
42
  MSG_ILLEGAL_RANGE_BODY_FORMAT = "Illegal %s format: '# * <tt>:{argument}</tt> {description}'."
43
43
  MSG_ILLEGAL_RANGE_RET_BODY_FORMAT = "Illegal %s format: '# * <tt>{CLASS}</tt> {description}'."
44
+ MSG_INVALID_DOCUMENTATION = 'Invalid public method documentation comment for `%s`.'
44
45
  MSG_MISSING_DOCUMENTATION = 'Missing public method documentation comment for `%s`.'
45
46
  MSG_MISSING_PARAMETERS = 'Parameter is missing for `%s`.'
46
47
  MSG_PARAMETERS_ARG_NAME_MISMATCH = 'Parameter name `%s` does not match argument name `%s`.'
@@ -125,13 +126,13 @@ module RuboCop
125
126
  add_offense(attrs_range.start_comment, message: MSG_ATTRIBUTES_AND_PARAMETERS_NO_COEXIST) unless grd
126
127
 
127
128
  # copied from documentation_comment.rb
128
- special_comm = preceding_lines.any? do |comment|
129
+ not_special_comm = preceding_lines(node) do |comment|
129
130
  !AnnotationComment.new(comment, annotation_keywords).annotation? &&
130
131
  !interpreter_directive_comment?(comment) &&
131
132
  !rubocop_directive_comment?(comment)
132
133
  end
133
134
 
134
- return add_offense(preceding_lines[index], message: MSG_INVALID_DOCUMENTATION) unless special_comm
135
+ return add_offense(preceding_lines(node)[0], message: MSG_INVALID_DOCUMENTATION) unless not_special_comm
135
136
 
136
137
  add_offense(parameters_range.start_comment, message: MSG_PARAMETERS_SHOULD_BE_BEFORE_RETURNS) unless guard
137
138
 
@@ -1,5 +1,5 @@
1
1
  module RuboCop
2
2
  module Publicdoc2
3
- VERSION = '0.1.3'
3
+ VERSION = '0.1.4'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-publicdoc2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Kristoff
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-08-31 00:00:00.000000000 Z
11
+ date: 2021-09-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler