Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add script for POD whitespace check in Makefile
As a convention the POD and the code needs to have an empty line in between. The script checks all the files rather the commit files in the lib directory. With this PR we enable validation of the rule in CI Signed-off-by: Ioannis Bonatakis <ybonatakis@suse.com>
- Loading branch information
Showing
2 changed files
with
15 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash -ex | ||
<< 'heredoc_pod_whitespace_rule' | ||
As a convention the POD and the code needs to have an empty line in between. | ||
The script checks all the files rather the commit files in the lib directory. | ||
heredoc_pod_whitespace_rule | ||
|
||
|
||
grep -Pzo "=cut\nsub" -rn lib || exit 0 | ||
echo -e '\033[0;31mCheck for whitespace after end of POD failed.\nAdd a empty line between =cut and code.' | ||
exit 1 |