-
Notifications
You must be signed in to change notification settings - Fork 580
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
Create FileModeBear #2370
Comments
Is this Bear supposed to check whether if there is +x permission and if not add it as a patch ?Just checking |
Not quite that specific. It is supposed to check whether the file permissions match those given in the setting.
However, the first design issue is how do we do this in a way that supports both Windows and Unix.
We currently do not have the ability for a 'patch' to modify file permissions. |
fyi, passwords and such are not appropriate for fixes; the bear would try to change the permissions if it can, otherwise it would not fix. bears escalating privilege levels, or having any access tokens, is not something we're likely to ever do. If the person running coala wants a bear to do things which require escalated privileges, it should give the coala process those privileges. Typically, the bear will be run by an account which has write access to the files. But moreover, a 'fix' for modes can be done as a new 'action' type, but in this case a fix could be a patch as git patches do record changes of file modes. But coala doesnt support that yet iirc. |
Confuses me does os module works differently in Windows ( srsly didn't know), if No then we have a |
https://docs.python.org/3/library/os.html mentions lots of OS specific aspects, and it links to https://github.com/python/cpython/blob/3.7/Lib/os.py which you can see is almost entirely OS specific logic. Windows and Unix file permissions models are very different. Proper analysis is needed to ensure the bear would work correctly on both platforms. Reading |
This issue reserved for Google Code-in task 6370456127930368. |
This issue is reserved under the GSoC project Improve Generic Bear Quality. |
Closes coala#2370
Closes coala#2370
It's really easy to forget to set +x on scripts. How about a bear like this:
The text was updated successfully, but these errors were encountered: