markdownlint: add -g option to check_format and fix mdl errors
-g option using only files known to git, that allow us to avoid errors from submodules Also add check if mdl is installed, and gracefull info if not. Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com> Change-Id: Ib6e1920774ffca81e62d9abebc8d8b4548feb519 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9086 Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Reviewed-by: Paul Luse <paul.e.luse@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Monica Kenguva <monica.kenguva@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
24bfe0dd27
commit
2f5c602574
2
.github/ISSUE_TEMPLATE/bug_report.md
vendored
2
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@ -7,6 +7,8 @@ assignees: ''
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
# Bug report
|
||||||
|
|
||||||
<!--- Provide a general summary of the issue in the Title above -->
|
<!--- Provide a general summary of the issue in the Title above -->
|
||||||
|
|
||||||
## Expected Behavior
|
## Expected Behavior
|
||||||
|
@ -7,6 +7,8 @@ assignees: ''
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
# CI Intermittent Failure
|
||||||
|
|
||||||
<!--- Provide a [test_name] where the issue occurred and brief description in the Title above. -->
|
<!--- Provide a [test_name] where the issue occurred and brief description in the Title above. -->
|
||||||
<!--- Name of the test can be found by last occurrence of: -->
|
<!--- Name of the test can be found by last occurrence of: -->
|
||||||
<!--- ************************************ -->
|
<!--- ************************************ -->
|
||||||
|
@ -587,16 +587,21 @@ function check_json_rpc() {
|
|||||||
function check_markdown_format() {
|
function check_markdown_format() {
|
||||||
local rc=0
|
local rc=0
|
||||||
|
|
||||||
echo -n "Checking markdown files format..."
|
if hash mdl 2> /dev/null; then
|
||||||
mdl -s $rootdir/mdl_rules.rb . > mdl.log || true
|
echo -n "Checking markdown files format..."
|
||||||
if [ -s mdl.log ]; then
|
mdl -g -s $rootdir/mdl_rules.rb . > mdl.log || true
|
||||||
echo " Errors in .md files detected:"
|
if [ -s mdl.log ]; then
|
||||||
cat mdl.log
|
echo " Errors in .md files detected:"
|
||||||
rc=1
|
cat mdl.log
|
||||||
|
rc=1
|
||||||
|
else
|
||||||
|
echo " OK"
|
||||||
|
fi
|
||||||
|
rm -f mdl.log
|
||||||
else
|
else
|
||||||
echo " OK"
|
echo "You do not have markdownlint installed so .md files not being checked!"
|
||||||
fi
|
fi
|
||||||
rm -f mdl.log
|
|
||||||
return $rc
|
return $rc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user