summaryrefslogblamecommitdiff
path: root/.tools/jobs/spaces.sh
blob: 4460cfb7818c764ae5a1f09d614001b8a03b5928 (plain) (tree)
1
2
3
4
5
6
7
8
9







                                                                      
                                              
          
  
#!/bin/bash

find -H . -type f -name "*.txt" -exec sed -i 's/[[:blank:]]*$//' {} \;

export RES=$(git diff --name-only)
if [[ -n "${RES}" ]]; then
    echo "Extra spaces before new lines detected in files:"
    git diff --name-only
    # I don't want this to be critical on TMW2
    exit 1
fi