Skip to content

Commit 05d6b33

Browse files
feat: avoid error logging on gitlab optional section parsing (#11881)
feat: avoid error logging on gitlab optional section parsing Merge branch 'master' into daniel.mohedano/codeowners-optional-section Co-authored-by: daniel.mohedano <daniel.mohedano@datadoghq.com>
1 parent b767c68 commit 05d6b33

3 files changed

Lines changed: 192 additions & 179 deletions

File tree

dd-java-agent/agent-ci-visibility/src/main/java/datadog/trace/civisibility/codeowners/EntryBuilder.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,10 @@ public EntryBuilder(CharacterMatcher.Factory characterMatcherFactory, String s)
5454

5555
if (offset == c.length // empty line
5656
|| c[offset] == '#' // comment
57-
|| c[offset] == '[') { // section header
57+
|| c[offset] == '[' // section header
58+
|| (c[offset] == '^'
59+
&& offset + 1 < c.length
60+
&& c[offset + 1] == '[')) { // GitLab optional section header (^[...])
5861
return null;
5962
}
6063

dd-java-agent/agent-ci-visibility/src/test/groovy/datadog/trace/civisibility/codeowners/EntryBuilderTest.groovy

Lines changed: 0 additions & 178 deletions
This file was deleted.

0 commit comments

Comments
 (0)