File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -183,6 +183,31 @@ def test_valid_commit_bin_prefix_for_fluent_bit():
183183 assert ok is True
184184
185185
186+ def test_valid_commit_with_fenced_code_block_in_body ():
187+ """
188+ Commits containing fenced code blocks in the body should NOT fail validation.
189+
190+ Code blocks often include YAML, shell output, or logs that may look like
191+ subject prefixes or configuration directives. These must be ignored by
192+ the linter to avoid false positives.
193+ """
194+ commit = make_commit (
195+ "out_s3: validate config earlier\n \n "
196+ "This commit improves validation.\n \n "
197+ "```yaml\n "
198+ "pipeline:\n "
199+ " inputs:\n "
200+ " - name: dummy\n "
201+ " tag: test\n "
202+ "```\n \n "
203+ "Signed-off-by: User" ,
204+ ["plugins/out_s3/s3.c" ]
205+ )
206+
207+ ok , msg = validate_commit (commit )
208+ assert ok is True
209+
210+
186211# -----------------------------------------------------------
187212# Tests: validate_commit ERROR CASES
188213# -----------------------------------------------------------
You can’t perform that action at this time.
0 commit comments