summaryrefslogtreecommitdiffstats
path: root/tools/warnstats.sh
diff options
context:
space:
mode:
authorThomas Kulik <thomas.kulik@telekom.de>2020-04-03 12:56:27 +0200
committerAndreas Geissler <andreas-geissler@telekom.de>2020-04-07 06:40:03 +0000
commitaddb6969c833902f2e82df768de95de89e31dc83 (patch)
tree41b9f7a3d808ebc502aa054a483d03f41ff966d0 /tools/warnstats.sh
parent1b164d64864b4370405d139c154a6a6760934600 (diff)
Issue-ID: DOC-599
extended detection of docs pathes Signed-off-by: Thomas Kulik <thomas.kulik@telekom.de> Change-Id: I9344f2041e7b38fd001f1658b4c1631f1e46bf9b
Diffstat (limited to 'tools/warnstats.sh')
-rwxr-xr-xtools/warnstats.sh36
1 files changed, 32 insertions, 4 deletions
diff --git a/tools/warnstats.sh b/tools/warnstats.sh
index e38a734f1..338898a90 100755
--- a/tools/warnstats.sh
+++ b/tools/warnstats.sh
@@ -33,6 +33,8 @@
###
### CHANGELOG (LATEST ON TOP)
###
+### 1.6.0 (2020-04-03) - extended detection of docs pathes in case they are not
+### below the submodules directory
### 1.5.0 (2020-03-23) - doc8 test now executed for every rst file. result is
### provided in the output as "doc8_(nnnnn)" where nnnnn
### is the total number of accumulated doc8 errors.
@@ -48,7 +50,7 @@
### 1.3.0 (2020-03-09) - initial release
###
-script_version="1.5.0 (2020-03-23)"
+script_version="1.6.0 (2020-04-03)"
doc8_dir=$(pwd)/doc8_results
logfile=$1;
doc8_command="doc8 --verbose"; #add options if required
@@ -114,16 +116,18 @@ do
# extract path to local rst file
#
path_rst=$line;
+ path_rst_debug=$line;
#echo "DBUG line: $line"
# remove problematic text in line that causes regex to fail
path_rst=$(echo "$path_rst" | sed -r 's:, other instance in.*::');
#echo "DBUG path_rst: $path_rst"
# grep the rst file path
- path_rst=$(echo "$path_rst" | grep -oP "^/.*\.rst");
+ path_rst=$(echo "$path_rst" | grep -oP "^(/|docs).*\.rst");
#echo "DBUG path_rst: $path_rst"
if [[ "$path_rst" == "" ]] ; then
path_rst="path_to_rst_missing"
- #echo "DBUG path_rst: $path_rst"
+ #echo "DBUG path_rst: $path_rst"
+ #echo "DBUG path_rst_debug: $path_rst_debug"
fi
# finally embed the full rst path in a message to use mouse-over/context menu of bash to open file
path_rst_link='\e]8;;file:'$path_rst'\arst\e]8;;\a';
@@ -167,8 +171,32 @@ do
module="docs_use-cases"
#echo "DBUG line: $line"
#echo "DBUG module: $module"
+ elif [[ $line =~ doc/docs/guides/onap-developer ]] ; then
+ module="docs_guides_onap-developer"
+ #echo "DBUG line: $line"
+ #echo "DBUG module: $module"
+ elif [[ $line =~ doc/docs/guides/onap-operator ]] ; then
+ module="docs_guides_onap-operator"
+ #echo "DBUG line: $line"
+ #echo "DBUG module: $module"
+ elif [[ $line =~ doc/docs/guides/onap-provider ]] ; then
+ module="docs_guides_onap-provider"
+ #echo "DBUG line: $line"
+ #echo "DBUG module: $module"
+ elif [[ $line =~ doc/docs/guides/onap-user ]] ; then
+ module="docs_guides_onap-user"
+ #echo "DBUG line: $line"
+ #echo "DBUG module: $module"
+ elif [[ $line =~ doc/docs/guides/overview ]] ; then
+ module="docs_guides_overview"
+ #echo "DBUG line: $line"
+ #echo "DBUG module: $module"
+ elif [[ $line =~ doc/docs/templates ]] ; then
+ module="docs_templates"
+ #echo "DBUG line: $line"
+ #echo "DBUG module: $module"
elif [[ $line =~ doc/docs/guides ]] ; then
- module="docs_guides"
+ module="docs_guides"
#echo "DBUG line: $line"
#echo "DBUG module: $module"
else