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 -->
|
||||
|
||||
## 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. -->
|
||||
<!--- Name of the test can be found by last occurrence of: -->
|
||||
<!--- ************************************ -->
|
||||
|
@ -587,16 +587,21 @@ function check_json_rpc() {
|
||||
function check_markdown_format() {
|
||||
local rc=0
|
||||
|
||||
echo -n "Checking markdown files format..."
|
||||
mdl -s $rootdir/mdl_rules.rb . > mdl.log || true
|
||||
if [ -s mdl.log ]; then
|
||||
echo " Errors in .md files detected:"
|
||||
cat mdl.log
|
||||
rc=1
|
||||
if hash mdl 2> /dev/null; then
|
||||
echo -n "Checking markdown files format..."
|
||||
mdl -g -s $rootdir/mdl_rules.rb . > mdl.log || true
|
||||
if [ -s mdl.log ]; then
|
||||
echo " Errors in .md files detected:"
|
||||
cat mdl.log
|
||||
rc=1
|
||||
else
|
||||
echo " OK"
|
||||
fi
|
||||
rm -f mdl.log
|
||||
else
|
||||
echo " OK"
|
||||
echo "You do not have markdownlint installed so .md files not being checked!"
|
||||
fi
|
||||
rm -f mdl.log
|
||||
|
||||
return $rc
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user