Skip to content
Permalink
Browse files

Merge pull request #2929 from sanssecours/🦚

Check Formatting: Change Code Difference Detection
  • Loading branch information...
markus2330 committed Sep 7, 2019
2 parents bc9254c + d4047a9 commit 6092a69a44ce9e7a11ab511afaff083e7fe23dbd
Showing with 14 additions and 6 deletions.
  1. +1 βˆ’1 doc/news/_preparation_next_release.md
  2. +13 βˆ’5 tests/shell/check_formatting.sh
@@ -153,7 +153,7 @@ you up to date with the multi-language support provided by Elektra.

## Tests

- <<TODO>>
- We changed how the [formatting test](../../tests/shell/check_formatting.sh) detects code differences. This update should get rid of transient errors as [reported here](https://issues.libelektra.org/2927#issuecomment-528058641). _(RenΓ© Schwaiger)_
- <<TODO>>
- <<TODO>>

@@ -66,13 +66,21 @@ to fix the formatting problems. For that please
EOF
)"

git diff --quiet
succeed_if "$error_message"
git_diff_output="$(git diff -p 2>&1)"

git diff --quiet || {
if [ $? -ne 0 ]; then
error_message="$(printf 'Unable to create diff: %s' "$git_diff_output" 2>&1)"
false
exit_if_fail "$error_message"
fi

if [ -n "$git_diff_output" ]; then
false
succeed_if "$error_message"
printf '\n\nβ€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”\n\n'
git diff -p
printf '%s' "$git_diff_output"
printf '\n\nβ€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”\n\n'
}

fi

end_script

0 comments on commit 6092a69

Please sign in to comment.
You can’t perform that action at this time.