rubocop-publicdoc2 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f47572451602f0cb28be0997c1626c0fcd218a60dbad8c0ca5edcd97ab093500
4
- data.tar.gz: 071c9289b76dd2a4fb9cbb1cbfd979e664c52dd6e0926943549f7d86e104c691
3
+ metadata.gz: 834d819dc85bf442a24ad2b911701413dd126f7fec7e9fcc44345ae68ec254a1
4
+ data.tar.gz: 3d79c19d27543a51871337737d238f71cf9c59baa1e57d2689192f468b81bddd
5
5
  SHA512:
6
- metadata.gz: 626e6be5fa81324b512397956b27659b66d8fff181d86dbaefeec6ec661ffd2779f28613124a42d9d91394508555af5ca15a27b912c634376557e58f95dbbc78
7
- data.tar.gz: b00f1afad0dc06c87b3caa7bfc35fc253da7768aae1a2d0256b9f736233f97275eb120958efb6f3bf1ac642221a9df8ab4bba7e84308c2ad4308a2e5e360e208
6
+ metadata.gz: bb764c614208969c5772685631e569f5b4195a471c08026949e2c10979ac6aaf4a8cf23d66479658d35a9929164d15af966301a9c823db0746f02cd5acbec286
7
+ data.tar.gz: 374e7fd0a4183c6241044270909030eaf4ef280cac58cea226b71721d63af973332daed2dacc49af398fc4ad475e038cbe9e225f259973841ea0c16700147ecb
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rubocop-publicdoc2 (0.1.2)
4
+ rubocop-publicdoc2 (0.1.3)
5
5
  rubocop
6
6
 
7
7
  GEM
@@ -39,6 +39,8 @@ module RuboCop
39
39
 
40
40
  MSG_ATTRIBUTES_AND_PARAMETERS_NO_COEXIST = 'Attributes and Parameters should not exist on same method.'
41
41
  MSG_DESCRIPTION_SHOULD_END_WITH_BLANK_COMMENT = 'Description should end with blank comment.'
42
+ MSG_ILLEGAL_RANGE_BODY_FORMAT = "Illegal %s format: '# * <tt>:{argument}</tt> {description}'."
43
+ MSG_ILLEGAL_RANGE_RET_BODY_FORMAT = "Illegal %s format: '# * <tt>{CLASS}</tt> {description}'."
42
44
  MSG_MISSING_DOCUMENTATION = 'Missing public method documentation comment for `%s`.'
43
45
  MSG_MISSING_PARAMETERS = 'Parameter is missing for `%s`.'
44
46
  MSG_PARAMETERS_ARG_NAME_MISMATCH = 'Parameter name `%s` does not match argument name `%s`.'
@@ -46,11 +48,13 @@ module RuboCop
46
48
  MSG_PARAMETERS_SHOULD_BE_BEFORE_RETURNS = 'Parameters should be before Returns.'
47
49
  MSG_RANGE_BODY_EMPTY = '%s body is empty.'
48
50
  MSG_RETURNS_SHOULD_BE_LAST = 'Returns should be last.'
51
+ MSG_UNNECESSARY_PARAMETERS = 'Unnecessary Parameter documentation for `%s`.'
49
52
 
50
53
  # https://regex101.com/
51
54
  ATTR_REGEXP = /^ *# *=== *Attributes:/.freeze
52
55
  DOC_PARM_REGEXP = %r{^# \* <tt>:(\w+)</tt>}.freeze
53
56
  DOC_RET_REGEXP = %r{^# \* <tt>([:\w]+)</tt>}.freeze
57
+ DOC_SUB_PARM_REGEXP = %r{^# \** <code>([.:\w ]+-*[.:\w ]+)</code>([.:\w ]*-*[.:\w ]*)}.freeze
54
58
  PARMS_REGEXP = /^ *# *=== *Parameters:/.freeze
55
59
  RETURNS_REGEXP = /^ *# *=== *Returns: */.freeze
56
60
 
@@ -120,6 +124,7 @@ module RuboCop
120
124
  grd = attrs_range.missing? || parameters_range.missing?
121
125
  add_offense(attrs_range.start_comment, message: MSG_ATTRIBUTES_AND_PARAMETERS_NO_COEXIST) unless grd
122
126
 
127
+ # copied from documentation_comment.rb
123
128
  special_comm = preceding_lines.any? do |comment|
124
129
  !AnnotationComment.new(comment, annotation_keywords).annotation? &&
125
130
  !interpreter_directive_comment?(comment) &&
@@ -1,5 +1,5 @@
1
1
  module RuboCop
2
2
  module Publicdoc2
3
- VERSION = '0.1.2'
3
+ VERSION = '0.1.3'
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.2
4
+ version: 0.1.3
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-30 00:00:00.000000000 Z
11
+ date: 2021-08-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler