[PR #2607] [MERGED] Crank up static analysis audit #25004

Open
opened 2026-01-31 09:06:39 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/2607
Author: @miniksa
Created: 8/29/2019
Status: Merged
Merged: 9/10/2019
Merged by: @miniksa

Base: masterHead: dev/miniksa/audit-a


📝 Commits (10+)

  • 1989eb9 Make warnings errors for static analysis.
  • 65dec36 C26446, Use .at instead of array indices
  • 23897b1 [Complex] C26446, Use .at instead of array indices - Reword UTF8OutPipeReader to use std::array so we can use .at and move some pointers to iterators.
  • bd2d5dd C26477, don't use 0 or NULL, use nullptr.
  • b33a598 C26496, mark const if it's never written after creation
  • c63289b C26493, no C-style casts.
  • a381f6a C26435, choose one of virtual, override, or final
  • 8ea7401 C26472, no static_cast for arithmetic conversions. narrow or narrow_cast
  • 50e2d0c C26433, overrides should be explicit.
  • 8579d89 C26451, promote before arithmetic if storing in larger result size (or use safe math)

📊 Changes

75 files changed (+1465 additions, -1321 deletions)

View changed files

📝 src/StaticAnalysis.ruleset (+8 -4)
📝 src/buffer/out/AttrRow.cpp (+5 -5)
📝 src/buffer/out/AttrRowIterator.cpp (+4 -4)
📝 src/buffer/out/AttrRowIterator.hpp (+4 -4)
📝 src/buffer/out/CharRow.cpp (+8 -31)
📝 src/buffer/out/CharRow.hpp (+4 -7)
📝 src/buffer/out/CharRowCell.cpp (+3 -3)
📝 src/buffer/out/CharRowCell.hpp (+3 -3)
📝 src/buffer/out/CharRowCellReference.cpp (+4 -0)
📝 src/buffer/out/CharRowCellReference.hpp (+1 -1)
📝 src/buffer/out/DbcsAttribute.hpp (+1 -1)
📝 src/buffer/out/OutputCell.cpp (+2 -4)
📝 src/buffer/out/OutputCell.hpp (+2 -2)
📝 src/buffer/out/OutputCellIterator.cpp (+21 -15)
📝 src/buffer/out/OutputCellIterator.hpp (+14 -14)
📝 src/buffer/out/OutputCellRect.cpp (+3 -3)
📝 src/buffer/out/OutputCellRect.hpp (+1 -1)
📝 src/buffer/out/OutputCellView.cpp (+4 -2)
📝 src/buffer/out/OutputCellView.hpp (+1 -1)
📝 src/buffer/out/Row.cpp (+6 -6)

...and 55 more files

📄 Description

Summary of the Pull Request

Brings audit mode up to full warning speed and fixes relevant errors in the four active projects.

PR Checklist

  • Closes #xxx
  • I'm an employee
  • Tests added/passed - This is a test of sorts
  • Requires documentation to be updated - Yes, should probably mention audits somewhere in docs.
  • I'm a core contributor

Detailed Description of the Pull Request / Additional comments


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/2607 **Author:** [@miniksa](https://github.com/miniksa) **Created:** 8/29/2019 **Status:** ✅ Merged **Merged:** 9/10/2019 **Merged by:** [@miniksa](https://github.com/miniksa) **Base:** `master` ← **Head:** `dev/miniksa/audit-a` --- ### 📝 Commits (10+) - [`1989eb9`](https://github.com/microsoft/terminal/commit/1989eb9d0027477acb76174b936016d2d60580e6) Make warnings errors for static analysis. - [`65dec36`](https://github.com/microsoft/terminal/commit/65dec36cb1eebbb700eb220b7c1a36ceedea03d8) C26446, Use .at instead of array indices - [`23897b1`](https://github.com/microsoft/terminal/commit/23897b1bd450fe856bb9cdf11f59814bb758c2b2) [Complex] C26446, Use .at instead of array indices - Reword UTF8OutPipeReader to use std::array so we can use .at and move some pointers to iterators. - [`bd2d5dd`](https://github.com/microsoft/terminal/commit/bd2d5ddb4b3c1e924c2fc44e140d4fd047522642) C26477, don't use 0 or NULL, use nullptr. - [`b33a598`](https://github.com/microsoft/terminal/commit/b33a59816e907825c49354c08282e41b9014a99b) C26496, mark const if it's never written after creation - [`c63289b`](https://github.com/microsoft/terminal/commit/c63289b1143dcc46a4bb0ad6e1d2b0971aa45e7a) C26493, no C-style casts. - [`a381f6a`](https://github.com/microsoft/terminal/commit/a381f6a042c953c573cc19b6b74b94c798f06fe8) C26435, choose one of `virtual`, `override`, or `final` - [`8ea7401`](https://github.com/microsoft/terminal/commit/8ea7401dc97203bb3097e33a2c4dd12211aabe09) C26472, no static_cast for arithmetic conversions. narrow or narrow_cast - [`50e2d0c`](https://github.com/microsoft/terminal/commit/50e2d0c4335fdca3a336ab9ad1a8257e233d5837) C26433, overrides should be explicit. - [`8579d89`](https://github.com/microsoft/terminal/commit/8579d8905a90710174fc170bc37fe8111dd2e02a) C26451, promote before arithmetic if storing in larger result size (or use safe math) ### 📊 Changes **75 files changed** (+1465 additions, -1321 deletions) <details> <summary>View changed files</summary> 📝 `src/StaticAnalysis.ruleset` (+8 -4) 📝 `src/buffer/out/AttrRow.cpp` (+5 -5) 📝 `src/buffer/out/AttrRowIterator.cpp` (+4 -4) 📝 `src/buffer/out/AttrRowIterator.hpp` (+4 -4) 📝 `src/buffer/out/CharRow.cpp` (+8 -31) 📝 `src/buffer/out/CharRow.hpp` (+4 -7) 📝 `src/buffer/out/CharRowCell.cpp` (+3 -3) 📝 `src/buffer/out/CharRowCell.hpp` (+3 -3) 📝 `src/buffer/out/CharRowCellReference.cpp` (+4 -0) 📝 `src/buffer/out/CharRowCellReference.hpp` (+1 -1) 📝 `src/buffer/out/DbcsAttribute.hpp` (+1 -1) 📝 `src/buffer/out/OutputCell.cpp` (+2 -4) 📝 `src/buffer/out/OutputCell.hpp` (+2 -2) 📝 `src/buffer/out/OutputCellIterator.cpp` (+21 -15) 📝 `src/buffer/out/OutputCellIterator.hpp` (+14 -14) 📝 `src/buffer/out/OutputCellRect.cpp` (+3 -3) 📝 `src/buffer/out/OutputCellRect.hpp` (+1 -1) 📝 `src/buffer/out/OutputCellView.cpp` (+4 -2) 📝 `src/buffer/out/OutputCellView.hpp` (+1 -1) 📝 `src/buffer/out/Row.cpp` (+6 -6) _...and 55 more files_ </details> ### 📄 Description <!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request Brings audit mode up to full warning speed and fixes relevant errors in the four active projects. <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist * [ ] Closes #xxx * [X] I'm an employee * [X] Tests added/passed - This is a test of sorts * [ ] Requires documentation to be updated - Yes, should probably mention audits somewhere in docs. * [X] I'm a core contributor <!-- Provide a more detailed description of the PR, other things fixed or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:06:39 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#25004