Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
templates
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tecnalia_robotics-public
templates
Merge requests
!41
Resolve "Add asciidoctor syntax check to CI tests"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Resolve "Add asciidoctor syntax check to CI tests"
17-add-asciidoctor-syntax-check-to-ci-tests-2
into
master
Overview
2
Commits
3
Pipelines
3
Changes
3
Merged
Jon Azpiazu
requested to merge
17-add-asciidoctor-syntax-check-to-ci-tests-2
into
master
5 years ago
Overview
2
Commits
3
Pipelines
3
Changes
3
Expand
Closes
#17 (closed)
Edited
5 years ago
by
Jon Azpiazu
0
0
Merge request reports
Compare
master
version 1
7bac8b8c
5 years ago
master (base)
and
latest version
latest version
68dc39c8
3 commits,
5 years ago
version 1
7bac8b8c
2 commits,
5 years ago
3 files
+
55
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
3
Search (e.g. *.vue) (Ctrl+P)
scripts/asciidoctor_syntax_check.bash
0 → 100644
+
21
−
0
Options
#!/bin/bash
if
!
[
-x
"
$(
command
-v
asciidoctor
)
"
]
;
then
echo
"Error: asciidoctor is not installed"
exit
1
fi
if
[
-z
"
$1
"
]
;
then
echo
"Error: No argument supplied - path needed"
exit
1
fi
touch
output.log
# avoid failing if no adoc files exist
while
IFS
=
read
-r
-d
''
filename
;
do
asciidoctor
"
$filename
"
2>&1 |
tee
-a
output.log
done
< <
(
find
"
$1
"
-name
'*.adoc'
-type
f
-print0
)
adoc_errors
=
0
;
adoc_warnings
=
0
adoc_errors
=
$(
grep
-c
"ERROR"
output.log
)
adoc_warnings
=
$(
grep
-c
"WARNING"
output.log
)
echo
"AsciiDoc format Found
${
adoc_errors
}
errors and
${
adoc_warnings
}
warnings"
if
[
"
${
adoc_errors
}
"
-eq
0
]
;
then
exit
0
;
else
exit
1
;
fi
Loading