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

clean up whitespace #37

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

henrytill
Copy link

Thanks for this amazing resource!

I noticed there is a seemingly inconsistent mix of tabs and spaces across the repo.

This PR converts the tabs to (8) spaces and removes a few instances of trailing whitespace.

This was achieved using the following script:

#!/bin/sh

set -e

list_files() {
    git ls-files
}

remove_trailing_whitespace() {
    while read -r input
    do
        sed -i 's/[ \t]*$//' $input
    done
}

untabify() {
    while read -r input
    do
        expand -t 8 $input | sponge $input
    done
}

list_files | untabify

list_files | remove_trailing_whitespace

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

Successfully merging this pull request may close these issues.

1 participant