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

add only_changed input to run rubocop only against changed files #103

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

toy
Copy link
Contributor

@toy toy commented May 2, 2024

Add an input to limit running rubocop only against files changed in the PR.

Had to switch to bash for process substitution and working with arrays.

Ignore if there are more than 100 changed files. Main reason is to protect from possibly hitting the command line length limit. In reality the command line length limit most probably (depends on OS) allows much higher number of files and if needed can be calculated or provided as one more input.

Fix ci workflow to fetch all commits for pr branch plus head commit of base branch to be able to find changed files.

Will conflict with #102, I will update whichever is not merged first

@toy toy force-pushed the option-to-test-only-changed-files-reviewdog branch 4 times, most recently from 2aac704 to cd3cfda Compare May 8, 2024 16:10
@toy toy mentioned this pull request May 13, 2024
Switch to bash for process substitution and working with arrays.

Ignore if there are more than 100. Protecting from possibly hitting the
command line length limit, it can be much higher and can be calculated
or also extracted as one more input if needed. The effect from limiting
number of files processed by rubocop is also smaller.

Fix ci workflow to fetch all commits for pr branch plus head commit of
base branch to be able to find changed files.

Co-authored-by: Oliver Günther <mail@oliverguenther.de>
@toy toy force-pushed the option-to-test-only-changed-files-reviewdog branch from cd3cfda to 998b37a Compare May 15, 2024 17:37
@toy
Copy link
Contributor Author

toy commented May 23, 2024

@javierjulio May I ping you for input?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant