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

Regenerate the Rubocop TODOs on depfu PRs #16058

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

hellcp-work
Copy link
Contributor

This creates a commit with a regenerated TODOs file from Rubocop whenever depfu pushes into a depfu/update/srcapi/rubocop-* branch. Fixes #5009

@github-actions github-actions bot added the Test Suite / CI 💉 Things related to our tests/CI label Apr 26, 2024
@hennevogel
Copy link
Member

Isn't that just

AllCops:
  NewCops: disable

@hellcp-work
Copy link
Contributor Author

Isn't that just

AllCops:
  NewCops: disable

I mean, we could also run rubocop -a and then rubocop --regenerate-todo, that might make this more useful

eduardoj
eduardoj previously approved these changes Apr 26, 2024
@hennevogel
Copy link
Member

I mean, we could also run rubocop -a and then rubocop --regenerate-todo, that might make this more useful

I'm not sure what you are trying to achieve? This is about complying to a style guide. If the style guide changes, a human should think about if we want to comply or not.

@eduardoj
Copy link
Member

eduardoj commented Apr 30, 2024

I'm not sure what you are trying to achieve? This is about complying to a style guide. If the style guide changes, a human should think about if we want to comply or not.

Most of the times, we would face changes in the existing cops (fix of false positives or fix of false negatives). This is what this commit is for: to reduce the burden of creating a manual commit with the changes in the rubocop_todo files.

I agree, that this commit automatically created could give the impression that we should approve the changes and merge the pull request because everything is fine. And maybe we miss reviewing the following pull requests in detail. But I'm in favor of merging this pull request as it is.

In the worst-case scenario, merging RuboCop Depfu pull requests with the commit automatically generated can introduce a cop and its exceptions in the TODO files. This cop can be easily disabled afteward. Even if we face this case, I think this will not happen so often.

branches:
- depfu/update/srcapi/rubocop-*
permissions:
contents: write
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm I'm not sure about the security implications of this. In which context is this running? What if someone makes a PR from a fork from the branch depfu/update/srcapi/rubocop-i-hack-you. Won't this action hand out the keys to the kingdom?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ups... yes. Let's study them.

@eduardoj eduardoj dismissed their stale review April 30, 2024 11:51

Security implications

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Test Suite / CI 💉 Things related to our tests/CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Regenerate .rubocop_todo.yml when rubocop is updated with Depfu
3 participants