Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow excluding some constants from Style/Documentation #9219

Merged
merged 1 commit into from Mar 16, 2021
Merged

Allow excluding some constants from Style/Documentation #9219

merged 1 commit into from Mar 16, 2021

Conversation

@fsateler
Copy link
Contributor

@fsateler fsateler commented Dec 11, 2020

For example, a very common idiom is to define a ClassMethods module that
contains the class methods created by the parent module. In such cases,
it might be desired to document the parent module, but not the
ClassMethods module.


Before submitting the PR make sure the following are checked:

  • The PR relates to only one subject with a clear title and description in grammatically correct, complete sentences.
  • Wrote good commit messages.
  • Commit message starts with [Fix #issue-number] (if the related issue exists).
  • Feature branch is up-to-date with master (if not - rebase it).
  • Squashed related commits together.
  • Added tests.
  • Ran bundle exec rake default. It executes all tests and runs RuboCop on its own code.
  • Added an entry (file) to the changelog folder named {change_type}_{change_description}.md if the new code introduces user-observable changes. See changelog entry format for details.
config/default.yml Outdated Show resolved Hide resolved
@fsateler
Copy link
Contributor Author

@fsateler fsateler commented Dec 16, 2020

Thanks, updated according to comments

@bbatsov
Copy link
Collaborator

@bbatsov bbatsov commented Dec 17, 2020

The CI build is currently failing.

@fsateler
Copy link
Contributor Author

@fsateler fsateler commented Dec 23, 2020

The CI build is currently failing.

Indeed. It appears this is because I modified the default.yml and thus many tests fail because the generated config is now larger. What is the expected change here? Should I change the auto gen config test? Or should I remove the change from the config? Both changes seem to make things work.

BTW, should I add a VersionChanged: <<next>> tag?

config/default.yml Outdated Show resolved Hide resolved
@bbatsov
Copy link
Collaborator

@bbatsov bbatsov commented Feb 14, 2021

Should I change the auto gen config test?

That'd be fine. Sorry about the radio silence. I somehow forgot I had to respond here.

@bbatsov bbatsov self-assigned this Feb 15, 2021
@fsateler
Copy link
Contributor Author

@fsateler fsateler commented Feb 19, 2021

Thanks, I updated the PR. I had to extract a nodoc_self_or_outer_module? method, otherwise check would fail the CyclomaticComplexity cop. I couldn't find a better name :)

@bbatsov
Copy link
Collaborator

@bbatsov bbatsov commented Feb 19, 2021

The CI is failing and I see there's a conflict in one of the specs.

For example, a very common idiom is to define a ClassMethods module that
contains the class methods created by the parent module. In such cases,
it might be desired to document the parent module, but not the
ClassMethods module.
@bbatsov bbatsov merged commit 3f10d2e into rubocop:master Mar 16, 2021
31 checks passed
31 checks passed
@github-actions
windows 2.4
Details
@github-actions
windows 2.5
Details
@github-actions
windows 2.6
Details
@github-actions
windows 2.7
Details
@github-actions
windows 3.0
Details
@github-actions
windows mingw
Details
@mergify
Summary 2 potential rules
Details
ci/circleci: cc-setup Your tests passed on CircleCI!
Details
ci/circleci: cc-upload-coverage Your tests passed on CircleCI!
Details
ci/circleci: documentation-checks Your tests passed on CircleCI!
Details
ci/circleci: jruby-9.2-ascii_spec Your tests passed on CircleCI!
Details
ci/circleci: jruby-9.2-rubocop Your tests passed on CircleCI!
Details
ci/circleci: jruby-9.2-spec Your tests passed on CircleCI!
Details
ci/circleci: ruby-2.4-ascii_spec Your tests passed on CircleCI!
Details
ci/circleci: ruby-2.4-rubocop Your tests passed on CircleCI!
Details
ci/circleci: ruby-2.4-spec Your tests passed on CircleCI!
Details
ci/circleci: ruby-2.5-ascii_spec Your tests passed on CircleCI!
Details
ci/circleci: ruby-2.5-rubocop Your tests passed on CircleCI!
Details
ci/circleci: ruby-2.5-spec Your tests passed on CircleCI!
Details
ci/circleci: ruby-2.6-ascii_spec Your tests passed on CircleCI!
Details
ci/circleci: ruby-2.6-rubocop Your tests passed on CircleCI!
Details
ci/circleci: ruby-2.6-spec Your tests passed on CircleCI!
Details
ci/circleci: ruby-2.7-ascii_spec Your tests passed on CircleCI!
Details
ci/circleci: ruby-2.7-rubocop Your tests passed on CircleCI!
Details
ci/circleci: ruby-2.7-spec Your tests passed on CircleCI!
Details
ci/circleci: ruby-3.0-ascii_spec Your tests passed on CircleCI!
Details
ci/circleci: ruby-3.0-rubocop Your tests passed on CircleCI!
Details
ci/circleci: ruby-3.0-spec Your tests passed on CircleCI!
Details
ci/circleci: ruby-head-ascii_spec Your tests passed on CircleCI!
Details
ci/circleci: ruby-head-rubocop Your tests passed on CircleCI!
Details
ci/circleci: ruby-head-spec Your tests passed on CircleCI!
Details
@bbatsov
Copy link
Collaborator

@bbatsov bbatsov commented Mar 16, 2021

Thanks!

koic added a commit that referenced this pull request Mar 16, 2021
This commit fixes the following build error.

```console
% cd path/to/rubocop
% bundle exec rake
(snip)

==> Failures

  1) RuboCop Project Changelog future entries For
  /Users/koic/src/github.com/rubocop/rubocop/spec/../changelog/new_allow_excluding_some_constants_from.md
  entry link to related issue has a valid URL
     Failure/Error: expect(issue[:url]).to match(pattern)

       expected "#9219" to
       match
       /^https:\/\/github\.com\/rubocop\/rubocop\/(?:issues|pull)\/9219$/
       Diff:
       @@ -1 +1 @@
       -/^https:\/\/github\.com\/rubocop\/rubocop\/(?:issues|pull)\/9219$/
       +"#9219"
     Shared Example Group: "has Changelog format" called from
       ./spec/project_spec.rb:261
     # ./spec/project_spec.rb:192:in `block (6 levels) in
       <top (required)>'
     # ./spec/project_spec.rb:188:in `each'
     # ./spec/project_spec.rb:188:in `block (5 levels) in
       <top (required)>'
     # tasks/spec_runner.rake:70:in `run_worker'
     # tasks/spec_runner.rake:30:in `block in run_specs'
     # tasks/spec_runner.rake:44:in `with_encoding'
     # tasks/spec_runner.rake:28:in `run_specs'
     # tasks/spec_runner.rake:116:in `block in <top (required)>'

1 deprecation logged to /tmp/test_queue_worker_88506_output
```
@fsateler fsateler deleted the fsateler:feature/excluded-constants-documentation branch Mar 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants