MCPcopy Create free account

hub / github.com/alibaba/open-code-review / functions

Functions7,169 in github.com/alibaba/open-code-review

FunctionTestOutputPreviewText_ColorEmitsEscapes
(t *testing.T)
cmd/opencodereview/output_color_test.go:169
FunctionTestOutputPreviewText_ColumnsAlign
TestOutputPreviewText_ColumnsAlign guards the padding: the counts are padded before colorizing, so the path/count columns line up in both modes.
cmd/opencodereview/output_color_test.go:144
FunctionTestOutputPreviewText_ExcludedPathDoesNotWidenWillReview
TestOutputPreviewText_ExcludedPathDoesNotWidenWillReview pins issue #1236: a long excluded path must not pad the Will review rows, or the counts are p
cmd/opencodereview/output_helpers_test.go:756
FunctionTestOutputPreviewText_NoColorIsPlain
TestOutputPreviewText_NoColorIsPlain covers the second text path that emitted escapes: `ocr review --preview` piped to a file.
cmd/opencodereview/output_color_test.go:122
FunctionTestOutputPreviewText_NoFiles
(t *testing.T)
cmd/opencodereview/output_helpers_test.go:688
FunctionTestOutputPreviewText_WithExcludedFiles
(t *testing.T)
cmd/opencodereview/output_helpers_test.go:724
FunctionTestOutputPreviewText_WithReviewableFiles
(t *testing.T)
cmd/opencodereview/output_helpers_test.go:698
FunctionTestOutputPreview_SarifRejects
--preview --format sarif should error, not emit a non-SARIF document.
cmd/opencodereview/sarif_test.go:758
FunctionTestOutputRetryReportText_CancelledIsShown
(t *testing.T)
cmd/opencodereview/retry_report_render_test.go:176
FunctionTestOutputRetryReportText_EmptyRequestsHasNoDanglingSummary
(t *testing.T)
cmd/opencodereview/retry_report_render_test.go:91
FunctionTestOutputRetryReportText_NilWritesNothing
(t *testing.T)
cmd/opencodereview/retry_report_render_test.go:83
FunctionTestOutputRetryReportText_PluralAgreement
Counted nouns are singular at one and plural above it.
cmd/opencodereview/retry_report_render_test.go:103
FunctionTestOutputRetryReportText_RecoveredAndFailed
(t *testing.T)
cmd/opencodereview/retry_report_render_test.go:75
FunctionTestOutputRetryReportText_SanitizesControlChars
(t *testing.T)
cmd/opencodereview/retry_report_render_test.go:229
FunctionTestOutputRetryReportText_SucceededAfterRetry
A retry that ended in success without any error attempt is a real outcome: an HTTP 200 carrying x-should-retry: true makes the SDK attempt again. The
cmd/opencodereview/retry_report_render_test.go:144
FunctionTestOutputRetryReportText_TruncatesStageList
(t *testing.T)
cmd/opencodereview/retry_report_render_test.go:240
FunctionTestOutputSARIF_BasicStructure
--- AC-1: Basic SARIF output structure ---
cmd/opencodereview/sarif_test.go:50
FunctionTestOutputSARIF_EmptyCategory
--- AC-7: Empty Category defaults to "other" ---
cmd/opencodereview/sarif_test.go:234
FunctionTestOutputSARIF_EmptyComments
--- AC-2: Empty comments produces empty results array (not null) ---
cmd/opencodereview/sarif_test.go:94
FunctionTestOutputSARIF_FullFieldMapping
--- AC-4: Full field mapping ---
cmd/opencodereview/sarif_test.go:136
FunctionTestOutputSARIF_JSONFormatting
--- AC-14: JSON formatting (2-space indent, trailing newline) ---
cmd/opencodereview/sarif_test.go:461
FunctionTestOutputSARIF_MultipleComments
--- AC-15: Multiple comments ---
cmd/opencodereview/sarif_test.go:478
FunctionTestOutputSARIF_NoFixes
--- AC-9: Missing suggestion/existing code omits fixes ---
cmd/opencodereview/sarif_test.go:294
FunctionTestOutputSARIF_SchemaCompliance
--- AC-13: Schema compliance (field types) ---
cmd/opencodereview/sarif_test.go:403
FunctionTestOutputSARIF_ZeroLineNumbers
--- AC-8: Zero line numbers omit region AND fixes (deletedRegion is required) ---
cmd/opencodereview/sarif_test.go:257
FunctionTestOutputTextWithWarnings_NoCommentsNoErrors
(t *testing.T)
cmd/opencodereview/output_helpers_test.go:562
FunctionTestOutputTextWithWarnings_NoCommentsWithReviewLimitReached
A limit the grace round completed still truncates the review, so the zero-finding output must not read as an unqualified approval.
cmd/opencodereview/output_helpers_test.go:584
FunctionTestOutputTextWithWarnings_NoCommentsWithSubtaskError
(t *testing.T)
cmd/opencodereview/output_helpers_test.go:572
FunctionTestOutputTextWithWarnings_WithComments
(t *testing.T)
cmd/opencodereview/output_helpers_test.go:607
FunctionTestOutputText_NoComments
(t *testing.T)
cmd/opencodereview/output_helpers_test.go:538
FunctionTestOutputText_WithComments
(t *testing.T)
cmd/opencodereview/output_helpers_test.go:547
FunctionTestPagerCSS_StaysHiddenUntilScripted
(t *testing.T)
internal/viewer/server_extra_test.go:322
FunctionTestPagerJS_Contract
(t *testing.T)
internal/viewer/server_extra_test.go:964
FunctionTestParentCommands_KnownSubcommandStillWorks
TestParentCommands_KnownSubcommandStillWorks ensures that adding RunE to parent commands does not break legitimate subcommand routing.
cmd/opencodereview/parent_cmd_test.go:53
FunctionTestParentCommands_NoArgsPrintsHelp
TestParentCommands_NoArgsPrintsHelp verifies that invoking a parent command with no arguments still prints help and exits 0 (RunE returns cmd.Help() w
cmd/opencodereview/parent_cmd_test.go:92
FunctionTestParentCommands_UnknownSubcommand
TestParentCommands_UnknownSubcommand verifies that parent commands which previously silently printed help and exited 0 now return a non-zero exit code
cmd/opencodereview/parent_cmd_test.go:17
FunctionTestParseBatchStrategy
(t *testing.T)
internal/scan/batch_test.go:33
FunctionTestParseBpeData_EmptyLines
(t *testing.T)
internal/llm/embedded_loader_test.go:26
FunctionTestParseBpeData_InvalidBase64
(t *testing.T)
internal/llm/embedded_loader_test.go:45
FunctionTestParseBpeData_InvalidLine
(t *testing.T)
internal/llm/embedded_loader_test.go:37
FunctionTestParseBpeData_InvalidRank
(t *testing.T)
internal/llm/embedded_loader_test.go:53
FunctionTestParseBpeData_Valid
(t *testing.T)
internal/llm/embedded_loader_test.go:11
FunctionTestParseComments
(t *testing.T)
internal/tool/code_comment_test.go:15
FunctionTestParseComments_CategorySeverity
TestParseComments_CategorySeverity verifies the structured category and severity fields are read off each comment object when present, and left zero-v
internal/tool/code_comment_test.go:142
FunctionTestParseComments_CategorySeveritySchemaDrift
(t *testing.T)
internal/tool/code_comment_test.go:223
FunctionTestParseComments_CleanRepairIsAcceptedIntact
TestParseComments_CleanRepairIsAcceptedIntact is the contrast that keeps the detector honest: every fixture here is an actually-observed failure shape
internal/tool/comment_args_repair_test.go:468
FunctionTestParseComments_Fields
(t *testing.T)
internal/tool/code_comment_test.go:102
FunctionTestParseComments_NormalizePath
(t *testing.T)
internal/tool/code_comment_test.go:385
FunctionTestParseComments_RepairKeepsEveryCommentInTheBatch
(t *testing.T)
internal/tool/comment_args_repair_test.go:95
FunctionTestParseComments_RepairRejectedWhenABatchEntryEndsUpEmpty
(t *testing.T)
internal/tool/comment_args_repair_test.go:132
FunctionTestParseComments_RepairRejectedWhenProseBecameAField
(t *testing.T)
internal/tool/comment_args_repair_test.go:206
FunctionTestParseComments_RepairsAllControlCharacters
(t *testing.T)
internal/tool/comment_args_repair_test.go:190
FunctionTestParseComments_RepairsBareControlCharacter
(t *testing.T)
internal/tool/comment_args_repair_test.go:79
FunctionTestParseComments_RepairsIllegalBackslashEscape
(t *testing.T)
internal/tool/comment_args_repair_test.go:153
FunctionTestParseComments_RepairsProseQuoteAcrossMultiByteRunes
(t *testing.T)
internal/tool/comment_args_repair_test.go:61
FunctionTestParseComments_RepairsUnescapedProseQuote
(t *testing.T)
internal/tool/comment_args_repair_test.go:36
FunctionTestParseComments_SuspectContentRejectsTheBatch
(t *testing.T)
internal/tool/comment_args_repair_test.go:449
FunctionTestParseComments_SuspectExistingCodeRejectsTheBatch
(t *testing.T)
internal/tool/comment_args_repair_test.go:454
FunctionTestParseComments_SuspectPathRejectsTheBatch
(t *testing.T)
internal/tool/comment_args_repair_test.go:460
FunctionTestParseComments_SuspectSuggestionRejectsTheBatch
One case per checked field, each feeding a value the scan cuts short. All must be refused rather than partially recovered: a cut existing_code matches
internal/tool/comment_args_repair_test.go:443
FunctionTestParseComments_TruncatedThinkingStillAccepted
TestParseComments_TruncatedThinkingStillAccepted pins the decision to leave thinking out of commentTextFields. Adding it looks like a completeness win
internal/tool/comment_args_repair_test.go:504
FunctionTestParseComments_UnrepairableKeepsOriginalParserWording
(t *testing.T)
internal/tool/comment_args_repair_test.go:114
FunctionTestParseComments_WellFormedInputReportsNoRepair
(t *testing.T)
internal/tool/comment_args_repair_test.go:308
FunctionTestParseDiffHeaderLine_QuotingCombinations
TestParseDiffHeaderLine_QuotingCombinations covers issue #1492. Git quotes the two sides of a header independently, so a changed file can arrive in an
internal/diff/quotedpath_test.go:64
FunctionTestParseDiffText_AmbiguousRenameHeaderStillUsesRenameLines
TestParseDiffText_AmbiguousRenameHeaderStillUsesRenameLines pins that a rename whose two paths both contain " b/" keeps taking its paths from the "ren
internal/diff/parser_test.go:131
FunctionTestParseDiffText_BinaryMarkerAnchored
TestParseDiffText_BinaryMarkerAnchored guards two binary-detection cases: a text file whose CONTENT mentions "Binary files " must not be classified as
internal/diff/parser_test.go:249
FunctionTestParseDiffText_CRLFKeepsDevNullMetadata
The "new file mode" / "deleted file mode" headers are matched by prefix, so they survive a trailing CR on their own. The /dev/null markers are compare
internal/diff/crlf_test.go:50
FunctionTestParseDiffText_CRLFKeepsPathsClean
CRLF-terminated diff text reaches the parser from a .patch checked out under core.autocrlf=true, or from output captured through a Windows shell. Befo
internal/diff/crlf_test.go:16
FunctionTestParseDiffText_CountsContentLinesWithPlusMinusPrefix
TestParseDiffText_CountsContentLinesWithPlusMinusPrefix covers content lines that themselves begin with "++"/"--": an added line "++i" renders in the
internal/diff/parser_test.go:286
FunctionTestParseDiffText_DeletedFile
TestParseDiffText_DeletedFile guards the /dev/null detection: git emits "+++ /dev/null" WITHOUT the b/ prefix, which the old regexes required, so dele
internal/diff/parser_test.go:184
FunctionTestParseDiffText_DevNullStringInsideHunk
TestParseDiffText_DevNullStringInsideHunk ensures an added content line whose rendered form is exactly "+++ /dev/null" (i.e. the file gained a line re
internal/diff/parser_test.go:317
FunctionTestParseDiffText_NewFile
TestParseDiffText_NewFile covers "--- /dev/null" (no a/ prefix).
internal/diff/parser_test.go:214
FunctionTestParseDiffText_PureRename
TestParseDiffText_PureRename covers a 100% similarity rename, which carries no hunks and no ---/+++ lines at all.
internal/diff/parser_test.go:161
FunctionTestParseDiffText_QuotedPathFromRealGit
TestParseDiffText_QuotedPathFromRealGit runs the whole path against git itself rather than a handwritten fixture, so the escape spelling under test is
internal/diff/quotedpath_test.go:190
FunctionTestParseDiffText_QuotedPathIsNotDropped
TestParseDiffText_QuotedPathIsNotDropped is the coverage-gap assertion: the file must appear in the parsed diff at all. Before the fix the header did
internal/diff/quotedpath_test.go:121
FunctionTestParseDiffText_QuotedRenamePaths
TestParseDiffText_QuotedRenamePaths pins the other place the same quoting appears. "rename from"/"rename to" are authoritative for renames and overwri
internal/diff/quotedpath_test.go:161
FunctionTestParseDiffText_RealGitPathHeaders
(t *testing.T)
internal/diff/parser_git_test.go:16
FunctionTestParseDiffText_Rename
TestParseDiffText_Rename guards against issue #99: a renamed file must be recognized via the "rename from"/"rename to" extended header lines so that t
internal/diff/parser_test.go:57
FunctionTestParseDiffText_SamePathHeaderWithDelimiterInPath
TestParseDiffText_SamePathHeaderWithDelimiterInPath covers a bare "diff --git" header whose only delimiter-looking " b/" sits inside the pathname itse
internal/diff/parser_test.go:99
FunctionTestParseDiffText_StripsIndexHeadersFromPromptDiff
(t *testing.T)
internal/diff/parser_test.go:12
FunctionTestParseEffort_CaseInsensitive
(t *testing.T)
internal/config/template/effort_test.go:20
FunctionTestParseEffort_Invalid
(t *testing.T)
internal/config/template/effort_test.go:30
FunctionTestParseEffort_Valid
(t *testing.T)
internal/config/template/effort_test.go:8
FunctionTestParseExtraHeaders
(t *testing.T)
internal/llm/resolver_test.go:1553
FunctionTestParseFilterResponse
(t *testing.T)
internal/agent/agent_test.go:190
FunctionTestParseFilterToolCalls
(t *testing.T)
internal/agent/agent_test.go:262
FunctionTestParseGitVersion
(t *testing.T)
internal/gitcmd/version_test.go:14
FunctionTestParseGroupingGroups
(t *testing.T)
internal/viewer/store_test.go:76
FunctionTestParseGroupingResponse_DuplicateFile
(t *testing.T)
internal/agent/grouping_test.go:100
FunctionTestParseGroupingResponse_InvalidJSON
(t *testing.T)
internal/agent/grouping_test.go:155
FunctionTestParseGroupingResponse_MarkdownFenced
(t *testing.T)
internal/agent/grouping_test.go:85
FunctionTestParseGroupingResponse_MissingFile
(t *testing.T)
internal/agent/grouping_test.go:118
FunctionTestParseGroupingResponse_Truncated
(t *testing.T)
internal/agent/grouping_test.go:163
FunctionTestParseGroupingResponse_UnknownFile
(t *testing.T)
internal/agent/grouping_test.go:137
FunctionTestParseGroupingResponse_Valid
(t *testing.T)
internal/agent/grouping_test.go:60
FunctionTestParseHunks_CRLFKeepsLineContentClean
ParseHunks splits the same text, so hunk content carried the CR too. Line content is compared against file content when resolving comment positions.
internal/diff/crlf_test.go:111
FunctionTestParseHunks_EmptyInput
(t *testing.T)
internal/diff/hunk_test.go:96
FunctionTestParseHunks_MultipleHunks
(t *testing.T)
internal/diff/hunk_test.go:45
FunctionTestParseHunks_NewFileAllAdditions
(t *testing.T)
internal/diff/hunk_test.go:103
FunctionTestParseHunks_NoNewlineMarker
(t *testing.T)
internal/diff/hunk_test.go:81
← previousnext →4,701–4,800 of 7,169, ranked by callers