Skip to content

GH-46547: [CI][Dev][R] Use pre-commit for lintr #46581

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

Merged
merged 1 commit into from
May 26, 2025

Conversation

kou
Copy link
Member

@kou kou commented May 26, 2025

Rationale for this change

We want to migrate to pre-commit from archery lint.

What changes are included in this PR?

Use pre-commit for lintr against r/.

This doesn't use https://github.com/lorenzwalthert/precommit because it doesn't include cyclocomp that we need.

Are these changes tested?

Yes.

Are there any user-facing changes?

No.

Copy link

⚠️ GitHub issue #46547 has been automatically assigned in GitHub to PR creator.

Copy link

⚠️ GitHub issue #46547 has no components, please add labels for components.

@jonkeane
Copy link
Member

The minimum supported version failure is spurious, but #46491 removes that anyway.

Copy link
Member

@jonkeane jonkeane left a comment

Choose a reason for hiding this comment

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

I'm good with this, we also might consider adding air to fix any linting issues as well (we can + should probably do that separately since we will need to reformat with air in one big change).

@github-actions github-actions bot added awaiting merge Awaiting merge and removed awaiting committer review Awaiting committer review labels May 26, 2025
@kou
Copy link
Member Author

kou commented May 26, 2025

OK. I've rebased on main and opened a new issue for Air: #46592

Copy link
Member

@assignUser assignUser left a comment

Choose a reason for hiding this comment

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

Nice!

@assignUser assignUser merged commit 1943911 into apache:main May 26, 2025
9 of 10 checks passed
@assignUser assignUser removed the awaiting merge Awaiting merge label May 26, 2025
@github-actions github-actions bot added the awaiting committer review Awaiting committer review label May 26, 2025
@kou kou deleted the pre-commit-lintr branch May 27, 2025 00:53
Copy link

After merging your PR, Conbench analyzed the 4 benchmarking runs that have been run so far on merge-commit 1943911.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details. It also includes information about 10 possible false positives for unstable benchmarks that are known to sometimes produce them.

Copy link
Contributor

Choose a reason for hiding this comment

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

I believe the tools directory is distributed as part of the source R package and is generally intended to be used to include files for use during source installation12.
Since this script is used during development and is not needed during installation, probably it should be moved to a directory that is not included in the source R package (and is listed in .Rbuildignore).

If I understand correctly, the same reason why files like list.sh are not included in the subdirectory for now.

Footnotes

  1. If your configure script needs auxiliary files, it is recommended that you ship them in a tools directory (as R itself does).https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Configure-and-cleanup-1

  2. tools/: auxiliary files needed during configuration, usually found in the company of a configure script. https://r-pkgs.org/misc.html#other-directories

Copy link
Member Author

Choose a reason for hiding this comment

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

Good catch.
Could you open a new issue for it and discuss better location in the issue?

Copy link
Contributor

Choose a reason for hiding this comment

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

Sure. #46661

@github-actions github-actions bot added awaiting changes Awaiting changes and removed awaiting committer review Awaiting committer review labels Jun 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants