Closed de-jcup closed 1 month ago
With V1.11.0 a source formatter was introduced, which does ignore curly brackets in variables. But it has a problem when it comes to multiple occurrences in one line:
callGradleWrapper("ensureLocalhostCertificate build generateOpenapi buildDeveloperAdminUI -x :sechub-cli:build -Psechub.test.wiremock.https_port=${env.SECHUB_TEST_WIREMOCK_HTTPS_PORT} -Psechub.test.wiremock.http_port=${env.SECHUB_TEST_WIREMOCK_HTTP_PORT} --console=plain")
is currently formatted to
callGradleWrapper("ensureLocalhostCertificate build generateOpenapi buildDeveloperAdminUI -x :sechub-cli:build -Psechub.test.wiremock.https_port=________START_VARESCAPE____env.SECHUB_TEST_WIREMOCK_HTTPS_PORT } -Psechub.test.wiremock.http_port=$ { env.SECHUB_TEST_WIREMOCK_HTTP_PORT________END___VARESCAPE___ --console=plain")
which means
The problem is the used regular expression.
No matter how many variables are in one line, the escaping/unescaping must work always correct.
Situation
With V1.11.0 a source formatter was introduced, which does ignore curly brackets in variables. But it has a problem when it comes to multiple occurrences in one line:
is currently formatted to
which means
Analyze
The problem is the used regular expression.
Wanted
No matter how many variables are in one line, the escaping/unescaping must work always correct.
Solution