-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Remove trailing space characters and add a few missing newlines #1220
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
Conversation
Thanks, these changing looks good to me. Actually, the Travis CI will run |
I could add it to Also, I noticed that the scripts are in a folder called |
what you found has happened for a couple of days(or months?), Travis CI always exists and run, (see this https://travis-ci.org/github/open-source-parsers/jsoncpp/builds/727220741), but doesn't show up in the front-end CI checklist, I haven't figured it out yet, @BillyDonahue can you take a look at this?
we haven't discussed to use Actions CI, so I am not sure about this point. |
clang-format is just for C++. I think if we were going to enforce elimination of trailing whitespace in other kinds of files, we should name that rule something else. I'm not sure what it has to do with POSIX compliance, though. It's probably fine as a one-shot cleanup. We'll just have to watch incoming PRs for trailing whitespace. |
Trailing whitespace is not a matter of POSIX compliance, newlines are. The script I used is similar to this one, but we would want to tailor it for this repo if it's desired to have the script. |
I didn't know POSIX had an opinion. It does!
We'd have to be careful about dos2unix and recode as deps. The tests will sometimes be deliberately messy or ill-formed, so we'd have to be careful not to "fix" the test input data. |
Also add two newlines
Any update? This should be good to go. CC @baylesj and @BillyDonahue Travis completed successfully if you click "Details", but it's not updating here on GitHub. |
Also add two newlines (rebased from `aaronfranke/formatting`) resolves #1220
Rebased and merged. Sorry for delay. |
This PR does a few things related to file formatting:
Remove trailing space characters. These are useless and just take up disk space.
Ensure text files end in trailing newline characters, except for JSON files. These are important for POSIX-compliance, however, some JSON tools automatically remove them, so for JSON files we make an exception. I also didn't add them to
.expected
since I wasn't sure about those files. In the end the only places where newlines were missing in files where they should exist was one Python file and one Bash file.I made these changes using a script. In case I need to rebase this PR, it is very easy to re-run the script I used. Additionally, if desired, I can add the script to the CI checks, so that these formatting checks are done automatically.