-
Notifications
You must be signed in to change notification settings - Fork 2k
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
travis: add check for line endings #2281
Comments
I will be working on this issue , before I start just a question , once the script is run what should be the expected output format (should there be a list of the places where UNIX line endings are not used) ? |
Do tell if the following code looks good , tell the changes that need to be done (if any) so that I can create a PR for it. ( Note : I removed the initial copyright part from now , I think there wont be any changes for that part ) Here is the link to the code I have written |
@kushalsingh007 I think printing the name of the offending file is enough to know what to do. Most likely the entire file is Windows line endings and then it won't be much help to print every line number. |
I am sorry, but why do we need to implement anything at all for this? egrep handles it just fine:
where Edit: I mean implement other than wrapping egrep for Travis |
So @gebart should I then create a bash script which uses egrep ? I guess I should waited for someone before starting the task to elaborate the comment :( . Regardless , the script also works fine doesn't it ? |
@kushalsingh007 that's just my opinion. Since this script will have to be run for every PR and every commit made to the RIOT repo on the overloaded Travis CI servers, it is better to use the option which has the least overhead, which I guess is egrep or some other tool which has been around for years instead of writing our own. Writing this kind of tool is a good student assignment but I think for everyday usage in our CI it is better to go with something tried and tested. Assigned @OlegHahm since @Kijewski has not been very active on RIOT lately. |
@gebart Here is the updated python script regardless https://gist.github.com/kushalsingh007/2cdbc043b649550c8420 |
Yes, I agree with @gebart that egrep aka |
Have a look at the bash script and give your feedback Edit : I have created a PR for it :) |
-Created a bash script using grep to check for carriage return at line endings. -Fix for issue RIOT-OS#2281
I think this issue can be closed now. |
Yes. One Github-Tip: If you reference an issue to be fixed in an commit or pull request like "Fixes #" or "Closes #" the issue gets to be closed automatically as soon as it gets merged ;-) |
Add a script that check for valid UNIX line endings.
The text was updated successfully, but these errors were encountered: