Repository navigation
Conversation
…ilot Autofix Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
…ilot Autofix Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
echoix
enabled auto-merge (squash)
July 13, 2026 09:52
petrasovaa
approved these changes
Jul 13, 2026
echoix
deleted the
ai-findings-autofix/utils-g.md2man-tests-g_md2man_test.py
branch
July 13, 2026 14:31
echoix
added a commit
to wenzeslaus/grass
that referenced
this pull request
Jul 14, 2026
CodeQL Code Quality had some AI findings on a recently changed file, a test file for g.md2man. The tests suggested seemed legitimate, and they are passing. I am thus submitting them here, after testing them in my fork. Original text explaining the findings: ------- The test asserts that there are exactly 3 bullet list markers for the input `"- first\n- second\n - nested\n"`, but this input only has 3 items (first, second, nested). The assertion `== 3` may be correct, but it should be verified that the nested item also produces the same `.IP \(bu 4n` marker, since nested items could produce a different marker format. If the nested list intentionally uses the same marker, this is fine, but the test name `test_unordered_list_nested` suggests the nesting behavior is what's being tested, and there is no assertion verifying that the nested item is actually rendered as nested (e.g., inside `.RS`/`.RE` blocks relative to the parent items). Consider adding an assertion that checks the order of `.RS`, `.IP`, and `.RE` to confirm correct nesting structure. ---------- The `test_comment_parsing_unit` test covers multi-line and inline comments, but there is no unit test for `strip_html_comments` behavior inside a fenced code block (i.e., that a comment inside a fence is preserved). The integration test `test_comment_kept_in_fenced_code` covers this via subprocess, but a direct unit test of `strip_html_comments` with a fenced block containing a comment would provide more precise coverage of that branch in `gmd.py`. * Apply suggested fix to utils/g.md2man/tests/g_md2man_test.py from Copilot Autofix Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> * Apply suggested fix to utils/g.md2man/tests/g_md2man_test.py from Copilot Autofix Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> * Apply ruff format --------- Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CodeQL Code Quality had some AI findings on a recently changed file, a test file for g.md2man. The tests suggested seemed legitimate, and they are passing. I am thus submitting them here, after testing them in my fork.
Original text explaining the findings:
The test asserts that there are exactly 3 bullet list markers for the input
"- first\n- second\n - nested\n", but this input only has 3 items (first, second, nested). The assertion== 3may be correct, but it should be verified that the nested item also produces the same.IP \(bu 4nmarker, since nested items could produce a different marker format. If the nested list intentionally uses the same marker, this is fine, but the test nametest_unordered_list_nestedsuggests the nesting behavior is what's being tested, and there is no assertion verifying that the nested item is actually rendered as nested (e.g., inside.RS/.REblocks relative to the parent items). Consider adding an assertion that checks the order of.RS,.IP, and.REto confirm correct nesting structure.The
test_comment_parsing_unittest covers multi-line and inline comments, but there is no unit test forstrip_html_commentsbehavior inside a fenced code block (i.e., that a comment inside a fence is preserved). The integration testtest_comment_kept_in_fenced_codecovers this via subprocess, but a direct unit test ofstrip_html_commentswith a fenced block containing a comment would provide more precise coverage of that branch ingmd.py.