Skip to content

Commit c2f2795

Browse files
committed
add a string comparation issue to check clang tidy
1 parent 0515f83 commit c2f2795

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

.github/workflows/clang-tidy.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,15 +155,15 @@ jobs:
155155
# Show summary of issues found
156156
echo ""
157157
echo "=== Summary of issues found ==="
158-
grep -E 'warning:|error:' clang-tidy.log | grep -v '\[clang-diagnostic' | wc -l || echo "0 issues found"
158+
grep -E 'error:' clang-tidy.log | grep -v '\[clang-diagnostic' | wc -l || echo "0 issues found"
159159
160160
# === NEW: Extract errors only to a separate log ===
161161
- name: Extract errors from clang-tidy log
162162
run: |
163-
# Extract actual clang-tidy warnings/errors, excluding:
163+
# Extract actual clang-tidy errors, excluding:
164164
# - clang-diagnostic-* (compilation errors)
165165
# - "Error while processing" messages
166-
grep -E 'warning:|error:' clang-tidy.log | \
166+
grep -E 'error:' clang-tidy.log | \
167167
grep -v '\[clang-diagnostic' | \
168168
grep -v 'Error while processing' > clang-tidy-errors.log || true
169169

src/ds/d400/d400-auto-calibration.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,10 @@ namespace librealsense
270270
break;
271271
case ds_calib_common::SPEED_WHITE_WALL:
272272
_total_frames = 120;
273+
/* Inject string comparation issue by purpose to see if clang tidy finds it - REMOVE!!*/
274+
char * tmp = "NIR";
275+
if (tmp == "NIR")
276+
int a = 0;
273277
break;
274278
}
275279
std::fill_n(_fill_factor, 256, 0);

0 commit comments

Comments
 (0)