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

Remove DOS-style line endings from files #145

Open
aaaaalbert opened this issue Sep 11, 2014 · 8 comments
Open

Remove DOS-style line endings from files #145

aaaaalbert opened this issue Sep 11, 2014 · 8 comments
Labels

Comments

@aaaaalbert
Copy link
Contributor

Lots of files in the clearinghouse code base have DOS-style line endings. Try egrep -rl $'\r\n'$ . in the repo.

To streamline the appearance of our code base, let's run all of the text files through dos2unix or col(but not the binary files).

@asm582
Copy link
Contributor

asm582 commented Nov 10, 2014

Should i use the below until and regex to convert files:-
egrep -rlI $'\r\n'$ | xargs dos2unix

@aaaaalbert
Copy link
Contributor Author

You can try this on your working copy, and then see if no DOS-style linebreaks remain. (Keep in mind the usual forking, branching, sending of pull request.)

@aaaaalbert
Copy link
Contributor Author

Sorry for the erroneous regexp. Use grep -rl "^M" . instead.
This is not a literal "caret M" there, but Ctrl-V followed by Ctrl-M, the actual control code of the carriage return character \r.

@asm582
Copy link
Contributor

asm582 commented Nov 11, 2014

Thanks albert.. I have ran dos2Unix on text files and the relevant changes has been made to file..

@asm582
Copy link
Contributor

asm582 commented Nov 13, 2014

Ran the above regex in clearing house, seash, affix and nodemanager with grep for text files only. found that only a single text file in seash exists that has DOS format ..the file name is -
./modules/factoids/factoid.txt

@aaaaalbert
Copy link
Contributor Author

Please check the other repos too.

@aaaaalbert
Copy link
Contributor Author

What's the status of this? Did I overlook a PR? In a recent checkout, grep -rIl "^M" yields these files:

./clearinghouse/xmlrpc_clients/seattleclearinghouse_xmlrpc.py
./clearinghouse/website/xmlrpc/tests/ut_xmlrpc_frontend.py
./clearinghouse/website/html/templates/control/profile.html
./clearinghouse/website/html/templates/download/installers.html
./clearinghouse/website/html/tests/ut_html_test_change_api_key.py
./clearinghouse/website/html/tests/test_change_api_key.py
./clearinghouse/website/html/tests/test_change_key.py
./clearinghouse/website/html/tests/test_renew_resources.py
./clearinghouse/website/html/tests/ut_html_test_change_key.py
./clearinghouse/website/html/tests/test_urls.py
./clearinghouse/website/html/tests/ut_html_test_del_resources.py
./clearinghouse/website/html/tests/test_get_resources.py
./clearinghouse/website/html/tests/ut_html_test_renew_resources.py
./clearinghouse/website/html/tests/test_register.py
./clearinghouse/website/html/tests/ut_html_test_get_resources.py
./clearinghouse/website/html/tests/test_del_resources.py
./clearinghouse/website/html/tests/ut_html_test_urls.py
./clearinghouse/website/html/tests/ut_html_test_register.py
./clearinghouse/website/html/views.py
./clearinghouse/website/html/media/scripts/register.js
./clearinghouse/website/reports/views.py

@asm582
Copy link
Contributor

asm582 commented Apr 6, 2015

I have sent pull request for a few repos and will work on others as well as i wanted to make sure i am not doing something incorrect...

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

No branches or pull requests

2 participants