mirror of
https://github.com/SAP/jenkins-library.git
synced 2024-12-12 10:55:20 +02:00
scanNextLineForParam -> docuEnd
since this naming is more open, e.g. when dealing with header comments we do not scan the next line for a parameter.
This commit is contained in:
parent
9532e1c05d
commit
77419882dd
@ -130,7 +130,7 @@ class Helper {
|
|||||||
|
|
||||||
boolean docu = false,
|
boolean docu = false,
|
||||||
value = false,
|
value = false,
|
||||||
scanNextLineForParamName = false
|
docuEnd = false
|
||||||
|
|
||||||
def docuLines = [],
|
def docuLines = [],
|
||||||
valueLines = []
|
valueLines = []
|
||||||
@ -138,14 +138,14 @@ class Helper {
|
|||||||
f.eachLine {
|
f.eachLine {
|
||||||
line ->
|
line ->
|
||||||
|
|
||||||
if(scanNextLineForParamName) {
|
if(docuEnd) {
|
||||||
scanNextLineForParamName = false
|
docuEnd = false
|
||||||
|
|
||||||
// first we check if we have a header comment for a step
|
// first we check if we have a header comment for a step
|
||||||
Matcher headerMatcher = (line =~ /(def|void)\s*call\s*\(/ )
|
Matcher headerMatcher = (line =~ /(def|void)\s*call\s*\(/ )
|
||||||
if(headerMatcher.size() == 1 && headerMatcher[0].size() == 2) {
|
if(headerMatcher.size() == 1 && headerMatcher[0].size() == 2) {
|
||||||
}
|
}
|
||||||
|
|
||||||
Matcher m = (line =~ /.*'(.*)'.*/)
|
Matcher m = (line =~ /.*'(.*)'.*/)
|
||||||
if(m.size() == 1 && m[0].size() == 2) {
|
if(m.size() == 1 && m[0].size() == 2) {
|
||||||
def param = m[0][1]
|
def param = m[0][1]
|
||||||
@ -190,7 +190,7 @@ class Helper {
|
|||||||
if(docu && line.trim() ==~ /^\*\//) {
|
if(docu && line.trim() ==~ /^\*\//) {
|
||||||
docu = false
|
docu = false
|
||||||
value = false
|
value = false
|
||||||
scanNextLineForParamName = true
|
docuEnd = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user