Skip to content

Add support for *.entitlements#571

Merged
asottile merged 1 commit intopre-commit:mainfrom
petamas:add-entitlements
Mar 1, 2026
Merged

Add support for *.entitlements#571
asottile merged 1 commit intopre-commit:mainfrom
petamas:add-entitlements

Conversation

@petamas
Copy link
Contributor

@petamas petamas commented Feb 10, 2026

Format documentation: https://developer.apple.com/documentation/bundleresources/entitlements

Relevant quote:

Xcode records capabilities that you add in a property list file with the .entitlements extension.

'zsh': {'text', 'shell', 'zsh'},
}
EXTENSIONS_NEED_BINARY_CHECK = {
'entitlements': {'plist', 'entitlements'},
Copy link
Member

Choose a reason for hiding this comment

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

can this actually be a binary file? all the examples I see online are either empty or xml

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I haven't seen any examples of it being binary, but the link documentation only says it must be a property list, aka plist file, without specifying the flavour.

I couldn't find any docs / forum threads / SO questions that would have a definitive answer either way, so it seems safer to make identify autodetect textness, just like other plists.

Copy link
Member

@asottile asottile left a comment

Choose a reason for hiding this comment

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

@asottile asottile merged commit a10759d into pre-commit:main Mar 1, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants