Address CodeQL issues#1615
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #1615 +/- ##
=======================================
Coverage 85.72% 85.72%
=======================================
Files 23 23
Lines 7210 7210
=======================================
Hits 6181 6181
Misses 1029 1029
🚀 New features to boost your workflow:
|
saurabh500
approved these changes
May 8, 2026
This was referenced May 15, 2026
This was referenced May 22, 2026
This was referenced May 31, 2026
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.
This pull request mainly improves code clarity and static analysis by adding detailed comments to justify reinterpret_cast usage when handling UTF-16 buffers from ODBC, and it also adjusts the configuration for CodeQL analysis and test certificate validity. The most important changes are grouped below:
Static Analysis and Documentation Improvements:
reinterpret_castfor buffers containing UTF-16 data from ODBC output parameters incore_stmt.cpp,core_stream.cpp, andcore_util.cpp. These comments clarify that the cast is safe due to ODBC guarantees and are annotated for CodeQL suppression [1]], [2]], [3]]).CodeQL Configuration:
CodeQL.ymlto exclude all external PHP SDK source code from analysis, but explicitly include only thesqlsrvandpdo_sqlsrvsource files within the PHP SDK ([CodeQL.ymlR1-R10]).C++ Lint Fix
Test Improvements:
mock_tds_server.pyfrom 365 days to 30 days to improve test hygiene ([test/tools/mock_tds_server.pyL1344-R1344]) and also avoid CodeQL analysis thinking it was "year math without considering leap years".