forked from os-autoinst/os-autoinst-distri-opensuse
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add target to check documenation errors
Run perldoc and check for error in the documentaion format. Add a make target about it. Fix some documenation error.
- Loading branch information
Showing
7 changed files
with
48 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -136,5 +136,6 @@ Args has 2 named parameters: | |
The path parameter is used for recursion in this function. | ||
=back | ||
=cut | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/bash | ||
<< 'heredoc_pod_error_rule' | ||
The script checks that no POD error are present in any changed file. | ||
heredoc_pod_error_rule | ||
|
||
libs_files=$(git ls-files lib/ | grep '.pm$' | xargs echo) | ||
tmpfile=$(mktemp) | ||
|
||
success=1 | ||
if test -n "$libs_files"; then | ||
for libfile in $libs_files; do | ||
perldoc -T -D "${libfile}" 2>/dev/null 1>"$tmpfile" | ||
grep -n "POD ERRORS" "$tmpfile" || continue | ||
|
||
success=0 | ||
error_line=$(grep -n "POD ERRORS" "$tmpfile"|tail -1| cut -f 1 -d ":") | ||
echo "ERROR in file ${libfile}" | ||
cat "$tmpfile" | sed -n "$error_line,\$"p | ||
done | ||
else | ||
echo "No lib files."; | ||
fi | ||
[ $success = 1 ] && echo "POD ERROR CHECK SUCCESS" && exit 0 | ||
exit 1 |