X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Flibraries%2Fbash%2Fentry%2Fcheck%2Fline.sh;h=6f373121e0b219125f07d840108e413b1a213062;hp=c58c7d0126fdc272621f956ee8a2c253e359f301;hb=7829fea4a2c8936513fa95215b7d84997f814a69;hpb=694b418272e9d7670ac69d477ed731bb7445b65a diff --git a/resources/libraries/bash/entry/check/line.sh b/resources/libraries/bash/entry/check/line.sh index c58c7d0126..6f373121e0 100644 --- a/resources/libraries/bash/entry/check/line.sh +++ b/resources/libraries/bash/entry/check/line.sh @@ -1,4 +1,4 @@ -# Copyright (c) 2019 Cisco and/or its affiliates. +# Copyright (c) 2021 Cisco and/or its affiliates. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at: @@ -30,10 +30,11 @@ source "${BASH_FUNCTION_DIR}/common.sh" || { exit 1 } -# docs contains too many wide formatted tables. +# Directory docs contains too many wide formatted tables. # .txt contains lines with wide URLs. piped_command='set -exuo pipefail && grep -rn ".\{81\}" "resources/" "tests/"' piped_command+=' | fgrep -v .svg | fgrep -v .txt | tee "lines.log" | wc -l' +# TODO: The greps "fail" if no long line remains. Fix that if it ever happens. lines="$(bash -c "${piped_command}")" || die if [ "${lines}" != "0" ]; then # TODO: Decide which text goes to stdout and which to stderr.