From dc4fe7e33730dbbfa69c05d29766ce3d8277b2f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Kr=C3=BCger?= Date: Fri, 8 Apr 2016 20:11:08 +0200 Subject: [PATCH] travis: add and run script which checks if listed files contain "unwrap". Should fix #10446. --- .travis.yml | 1 + etc/ci/check_no_unwrap.sh | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100755 etc/ci/check_no_unwrap.sh diff --git a/.travis.yml b/.travis.yml index 4872e5de0941..9f591aa35191 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,6 +16,7 @@ matrix: - ./mach test-compiletest - bash etc/ci/lockfile_changed.sh - bash etc/ci/manifest_changed.sh + - bash etc/ci/check_no_unwrap.sh cache: directories: - .cargo diff --git a/etc/ci/check_no_unwrap.sh b/etc/ci/check_no_unwrap.sh new file mode 100755 index 000000000000..bbf5eabce88f --- /dev/null +++ b/etc/ci/check_no_unwrap.sh @@ -0,0 +1,15 @@ +#!/bin/bash +# +# Make sure listed files do not contain "unwrap" +set -o errexit +set -o nounset +set -o pipefail + +cd $(git rev-parse --show-toplevel) # cd into repo root so make sure paths works in any case + +# files that should not contain "unwrap" +FILES=("components/compositing/compositor.rs" + "components/compositing/pipeline.rs" + "components/compositing/constellation.rs") + +! grep -n "unwrap(" "${FILES[@]}"