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

tools/checkpatch.sh should check for wrongly set Executable bit #8365

Closed
hartmannathan opened this issue Jan 30, 2023 · 0 comments · Fixed by #8403
Closed

tools/checkpatch.sh should check for wrongly set Executable bit #8365

hartmannathan opened this issue Jan 30, 2023 · 0 comments · Fixed by #8403

Comments

@hartmannathan
Copy link
Contributor

Sometimes source files (e.g., *.c, *.h, Make.defs, etc.) are committed to the repository with the Executable bit unintentionally set (that is, file perms are stored in Git as 100755 instead of 100644).

tools/checkpatch.sh should check for this and warn if the permissions are not set properly.

Files which should be allowed executable bit:

  • *.sh
  • *.py
  • Not sure about *.bat since these are for Windows. Does Executable bit have effect on Windows?

Note: Not recommended to use GNU Find arguments: find . -type f -executable -print because this is non-portable. POSIX Find command is: find . -type f -perm +111 -print

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