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 GitHub Action to Check plist Files for 'real' Key #901

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

Conversation

dreamwhite
Copy link
Contributor

This pull request introduces a GitHub Action workflow to automatically scan all .plist files in the repository for the presence of the real key. The real key, when found, creates issues when compiling the project, thus the need of fixing it to integer type.

The workflow utilizes libxml2-utils to parse .plist files and grep to search for occurrences of the real key. If the key is found in any of the plist files, the workflow will raise an error, prompting contributors to consider replacing real with integer for the above reasons.

You can test the functionality by "accidentally" replacing a integer key with real: the action will return error code 1 and print both the file name as well as the line number with the line content, for better debugging purposes.

Please review and merge this pull request to integrate the new GitHub Action into the project workflow.

CC @vandroiy2013

[CI] Added check.yaml action to check integrity of plist files
.github/workflows/check.yml Show resolved Hide resolved
.github/workflows/check.yml Outdated Show resolved Hide resolved
@dreamwhite
Copy link
Contributor Author

Good afternoon @vit9696, I think we're good to go. I switched from grep to xmllint and made the following tests:

  • detect `NUMBER
  • detect
<real>
NUMBER
</real>

and the action correctly reports if there's any real key inside .plist files whether is on a single line or in multiple lines (like the example you correctly provided).

Also consider that I still left real key inside Resources/PinConfigs.kext/Contents/Info.plist just for testing purposes. It will be reverted back as it should normally be.

Finally, I noticed, beside this issue, that AppleALC compilation fails if int key is used instead of integer. Do you think should I add a similar check inside the same action?

Please let me know if it satisfies you and once is ready to merge.

Greetings
dreamwhite

@dreamwhite
Copy link
Contributor Author

Good evening @vit9696 sorry for the bump. Any update on this?

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