820d73f345
Problem: We need to add stylish config to settle code style for our project. Makefile to simplify its building. Also we need to check our project for trailing whitespaces so we need to add the corresponding script to be used later in CI. Solution: Add - stylish-haskell config - Makefile - `check_trailing_whitespace` script
15 lines
357 B
Bash
Executable File
15 lines
357 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# SPDX-FileCopyrightText: 2020 Tocqueville Group
|
|
#
|
|
# SPDX-License-Identifier: LicenseRef-MIT-TQ
|
|
|
|
files=$(git ls-files | xargs grep --files-with-matches --binary-files=without-match '[[:blank:]]$')
|
|
if [[ -n $files ]];then
|
|
echo ' Files with trailing whitespace found:'
|
|
for f in "${files[@]}"; do
|
|
echo " * $f"
|
|
done
|
|
exit 1
|
|
fi
|