-
-
Notifications
You must be signed in to change notification settings - Fork 278
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
Default rake task makes unintended changes to docs? #2044
Comments
I confirmed that if this line is commented out, it does not occur.
|
Ah, so perhaps when |
cc @koic |
…Rake task This PR fixes unintended document changes caused by default Rake task. ## Problem The default task causes `RuboCop::Config` to end up in an unexpected state when `internal_investigation` task is executed before `generate_cops_documentation` task. This is due to the fact that plugins are already loaded when RuboCop is executed as part of `internal_investigation`. ## Solution This change preemptively determines whether configuration adjustments are necessary based on whether `rubocop-rspec` plugin has already been loaded. ## Additional Information Since this logic should ideally be encapsulated within `CopsDocumentationGenerator`, it is expected to become unnecessary in the future once the API design and implementation of `CopsDocumentationGenerator` class are complete. For now, this serves as a temporary workaround. Fixes rubocop#2044.
Sorry for taking up your time due to the documentation generation issue. This is a workaround fix, and #2047 has been opened. I plan to address the issue in RuboCop core in the future to allow for simpler usage. |
…Rake task This PR fixes unintended document changes caused by default Rake task. ## Problem The default task causes `RuboCop::Config` to end up in an unexpected state when `internal_investigation` task is executed before `generate_cops_documentation` task. This is due to the fact that plugins are already loaded when RuboCop is executed as part of `internal_investigation`. ## Solution This change preemptively determines whether configuration adjustments are necessary based on whether `rubocop-rspec` plugin has already been loaded. ## Additional Information Since this logic should ideally be encapsulated within `CopsDocumentationGenerator`, it is expected to become unnecessary in the future once the API design and implementation of `CopsDocumentationGenerator` class are complete. For now, this serves as a temporary workaround. Fixes rubocop#2044.
No worries @koic, and thank you for having a look – and for fixing it too. |
…used_by_default_rake_task [Fix #2044] Fix unintended document changes caused by default Rake task
Running
rake
locally causes a seemingly unintended change to docs.I tried “bisecting” the default rake command to find the issue, and interestingly
bundle exec rake confirm_config documentation_syntax_check confirm_documentation
does not trigger the issue, butbundle exec rake internal_investigation confirm_documentation
does:I noticed this on the latest
master
branch (dac4256) with the most recent dependencies installed.The text was updated successfully, but these errors were encountered: