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 +4 -4
- data/CHANGELOG.md +6 -1
- data/Gemfile.lock +1 -1
- data/README.md +16 -7
- data/lib/rubocop/cop/style/public_method_documentation.rb +3 -2
- data/lib/rubocop/publicdoc2/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b3addc1e5884b6144b1f56adaa32ac5b9d86f6ea60321325ccd067e97edb57f4
|
4
|
+
data.tar.gz: da9781df68b97fd9dd4d947b9b08c6676c848a2f3e2c24b6796633193599bacc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d6132f9ad5d2efd9517f7ad2a10bd60eab1f73f72f5c14228a4c8b5282f7512ff4d37bfa928068b587c12884a9af23b3af832e2d6cdcc5dffdee2d22d108b031
|
7
|
+
data.tar.gz: ea653ce4eea63f7331db6c7c56505a3c659651a2aad6bc51ec120219bd0398bc55332197414b2a64fd819b5076a02dafacc335ccdffcd5e96d488dd65d59cda4
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -26,13 +26,22 @@ TODO: Write usage instructions here
|
|
26
26
|
|
27
27
|
## Development
|
28
28
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
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
|
-
|
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[
|
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
|
|
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.
|
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-
|
11
|
+
date: 2021-09-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|