Skip to content

Commit 6f63179

Browse files
committed
fix column number being 0 issue
1 parent c1f6a41 commit 6f63179

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

test/testsarif.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ int main() {
559559
ASSERT(region.find("startLine") != region.end());
560560
ASSERT(region.find("startColumn") != region.end());
561561

562-
// Line numbers should be positive, columns can be 0 or positive
562+
// Line numbers should be positive, columns should be positive (SARIF requires >= 1)
563563
if (region.at("startLine").is<double>())
564564
{
565565
const int64_t line = static_cast<int64_t>(region.at("startLine").get<double>());
@@ -569,7 +569,7 @@ int main() {
569569
if (region.at("startColumn").is<double>())
570570
{
571571
const int64_t col = static_cast<int64_t>(region.at("startColumn").get<double>());
572-
ASSERT(col >= 0);
572+
ASSERT(col > 0);
573573
}
574574
}
575575
}

0 commit comments

Comments
 (0)