1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2025-01-20 05:19:40 +02:00

Emit a warning to the log in case the same parameter is documented twice.

This commit is contained in:
Marcus Holl 2018-10-26 12:21:06 +02:00
parent a8eb963ac2
commit 44cf1c6f47

View File

@ -143,8 +143,12 @@ class Helper {
Matcher m = (line =~ /.*'(.*)'.*/) Matcher m = (line =~ /.*'(.*)'.*/)
if(m.size() == 1 && m[0].size() == 2) { if(m.size() == 1 && m[0].size() == 2) {
// otherwise there is a comment we do care for
def param = m[0][1] def param = m[0][1]
if(params[param].docu ||
params[param].value)
System.err << "[WARNING] There is already some documentation for parameter '${param}. Is this parameter documented twice?'\n"
def _docu = [], _value = [] def _docu = [], _value = []
docuLines.each { _docu << it } docuLines.each { _docu << it }
valueLines.each { _value << it} valueLines.each { _value << it}