Skip to content

Apply audit mode to TerminalInput/Adapter/Parser libraries - #4005

Merged
28 commits merged into
masterfrom
dev/miniksa/gardening3_audit
Jan 3, 2020
Merged

28 commits merged into
masterfrom
dev/miniksa/gardening3_audit

Conversation

@miniksa

@miniksa Michael Niksa (miniksa) commented Dec 17, 2019 •

Copy link
Copy Markdown
Contributor

Summary of the Pull Request

  • Enables auditing of Virtual Terminal libraries (input, adapter, parser)

PR Checklist

Detailed Description of the Pull Request / Additional comments

This is turning on the auditing of these projects (as enabled by the heavier lifting in the other refactor) and then cleaning up the remaining warnings.

Validation Steps Performed

  • Built it
  • Ran the tests

…ng string views everywhere, size_ts over smaller sizes in prep for massive buffers, and so on and so on.
…ing used for calling ProcessString on the parser in the tests.
…sts. Fixed some rule of 5s, suppressed others. Suppressed constexpr suggestions. Use narrow_cast where applicable. Consts on unchanged variables. .at() for array accesses, and so on.
… constexpr and gluing everything back together. Otherwise, the usual suspects of array-to-pointer decay and noexcepts and whatnot.
@miniksa Michael Niksa (miniksa) added Area-CodeHealth Issues related to code cleanliness, linting, rules, warnings, errors, static analysis, etc. Issue-Task It's a feature request, but it doesn't really need a major design. Product-Conhost For issues in the Console codebase labels Dec 17, 2019

@zadjii-msft Mike Griese (zadjii-msft) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea this one's good too. Okay, no more reviews from me today :P

Comment thread src/terminal/adapter/MouseInput.hpp Resolved

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm NAKing out of this PR early to mark it red, but I'll keep reviewing.

Nit: please reword the PR title to be imperative, and as though it was completing the sentence "This pull request will ...".

Comment thread src/terminal/adapter/MouseInput.cpp Resolved
Comment thread src/terminal/adapter/MouseInput.cpp Resolved
Comment thread src/terminal/adapter/MouseInput.cpp Resolved
Comment thread src/terminal/adapter/MouseInput.hpp Resolved
Comment thread src/terminal/adapter/adaptDispatch.cpp Resolved
@ghost ghost added Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Dec 18, 2019
@miniksa Michael Niksa (miniksa) changed the title Applies audit mode to TerminalInput/Adapter/Parser libraries Apply audit mode to TerminalInput/Adapter/Parser libraries Dec 18, 2019
Comment thread src/terminal/adapter/adaptDispatch.cpp Resolved
Comment thread src/terminal/adapter/adaptDispatch.cpp Resolved
Comment thread src/terminal/adapter/terminalOutput.cpp Resolved
Comment thread src/terminal/parser/telemetry.cpp Resolved
Comment thread src/terminal/input/terminalInput.cpp Resolved
Comment thread src/terminal/input/terminalInput.cpp Resolved
Comment thread src/terminal/input/terminalInput.cpp Resolved
@miniksa
Michael Niksa (miniksa) changed the base branch from dev/miniksa/gardening3 to master December 31, 2019 18:39
…de (and in the future do conversions and whatnot safelyish). Use it to bypass the warnings in a methodic way for where we already know the bounds FOR SURE. Also, try to adjust some of adapt dispatch's arithmetic to make it not substantially worse and still pass audit before we get to improving our safemath library.
Comment thread src/terminal/adapter/adaptDispatch.cpp Resolved
Comment thread src/terminal/parser/tracing.cpp Resolved

@miniksa Michael Niksa (miniksa) left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(What happened here? a revert?)

Yeah, I thought the GitHub UI would allow me to revert one file in one commit. Turns out it made me revert a lot more than that.

@miniksa

Copy link
Copy Markdown
Contributor Author

Gotta run to an appointment. If this succeeds everything, then we'll merge it at the next opportunity and move on to gardening3_audit2.

@miniksa Michael Niksa (miniksa) removed the Needs-Second It's a PR that needs another sign-off label Jan 2, 2020
@zadjii-msft Mike Griese (zadjii-msft) added the AutoMerge Marked for automatic merge by the bot when requirements are met label Jan 3, 2020
@ghost

Copy link
Copy Markdown

Hello Mike Griese (@zadjii-msft)!

Because this pull request has the AutoMerge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@ghost
ghost merged commit 322989d into master Jan 3, 2020
@ghost
ghost deleted the dev/miniksa/gardening3_audit branch January 3, 2020 14:25
@miniksa
Michael Niksa (miniksa) restored the dev/miniksa/gardening3_audit branch January 3, 2020 15:23
@miniksa
Michael Niksa (miniksa) deleted the dev/miniksa/gardening3_audit branch January 3, 2020 15:24
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-CodeHealth Issues related to code cleanliness, linting, rules, warnings, errors, static analysis, etc. AutoMerge Marked for automatic merge by the bot when requirements are met Issue-Task It's a feature request, but it doesn't really need a major design. Product-Conhost For issues in the Console codebase

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update MouseInput.cpp's _Generate*Sequence() to use wil::str_printf

4 participants