Skip to content

Conversation

seisman
Copy link
Member

@seisman seisman commented Aug 27, 2024

Address #3414 (comment).

Patches #3414.

@seisman
Copy link
Member Author

seisman commented Aug 27, 2024

pre-commit.ci run

@seisman seisman added maintenance Boring but important stuff for the core devs skip-changelog Skip adding Pull Request to changelog labels Aug 27, 2024
@seisman seisman added this to the 0.13.0 milestone Aug 27, 2024
Comment on lines 16 to 17
- id: chmod
args: ['644']
Copy link
Member

Choose a reason for hiding this comment

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

You can add a exclude: .pre-commit-config.yaml line to exclude 644 permissions on this file if I'm not mistaken. See https://pre-commit.com/#config-exclude

Copy link
Member

Choose a reason for hiding this comment

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

Oh wait sorry, I misread things. Let me see if there's another way...

Copy link
Member Author

Choose a reason for hiding this comment

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

Since we only care about if files have execute permission, so I thought chmod -x should work. Unfortunately the hook doesn't support it yet https://github.com/Lucas-C/pre-commit-hooks/blob/a30f0d816e5062a67d87c8de753cfe499672b959/pre_commit_hooks/chmod.py#L35-L40.

Copy link
Member

@weiji14 weiji14 Aug 27, 2024

Choose a reason for hiding this comment

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

Maybe we skip the chmod hook on pre-commit.ci using https://pre-commit.ci/#configuration-skip? Since we have the check on the `Style Checks' CI already on GitHub Actions and it doesn't complain there.

@seisman seisman changed the title CI: Move the file permission checking from pre-commit to Style Checks workflow CI: Skip the chmod hook in pre-commit.ci Aug 27, 2024
@seisman seisman merged commit 0faf52c into main Aug 27, 2024
7 checks passed
@seisman seisman deleted the ci/chmod branch August 27, 2024 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Boring but important stuff for the core devs skip-changelog Skip adding Pull Request to changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants