Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
28 commits merged into from
Jan 3, 2020

Conversation

miniksa
Copy link
Member

@miniksa miniksa commented Dec 17, 2019

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 miniksa self-assigned this Dec 17, 2019
@miniksa 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
Copy link
Member

@zadjii-msft zadjii-msft left a comment

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

src/terminal/adapter/MouseInput.hpp Outdated Show resolved Hide resolved
@zadjii-msft zadjii-msft added the Needs-Second It's a PR that needs another sign-off label Dec 18, 2019
@ghost ghost requested review from carlos-zamora and DHowett-MSFT December 18, 2019 17:02
Copy link
Contributor

@DHowett-MSFT DHowett-MSFT left a comment

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 ...".

src/terminal/adapter/MouseInput.cpp Show resolved Hide resolved
src/terminal/adapter/MouseInput.cpp Show resolved Hide resolved
src/terminal/adapter/MouseInput.cpp Show resolved Hide resolved
src/terminal/adapter/MouseInput.hpp Outdated Show resolved Hide resolved
src/terminal/adapter/adaptDispatch.cpp Outdated Show resolved Hide 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 miniksa changed the title Applies audit mode to TerminalInput/Adapter/Parser libraries Apply audit mode to TerminalInput/Adapter/Parser libraries Dec 18, 2019
src/terminal/adapter/adaptDispatch.cpp Outdated Show resolved Hide resolved
src/terminal/adapter/adaptDispatch.cpp Outdated Show resolved Hide resolved
src/terminal/adapter/adaptDispatchGraphics.cpp Outdated Show resolved Hide resolved
src/terminal/adapter/terminalOutput.cpp Show resolved Hide resolved
src/terminal/parser/telemetry.cpp Show resolved Hide resolved
src/terminal/parser/ut_parser/OutputEngineTest.cpp Outdated Show resolved Hide resolved
src/terminal/input/terminalInput.cpp Outdated Show resolved Hide resolved
src/terminal/input/terminalInput.cpp Outdated Show resolved Hide resolved
src/terminal/input/terminalInput.cpp Outdated Show resolved Hide resolved
@miniksa 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.
src/terminal/adapter/adaptDispatch.cpp Outdated Show resolved Hide resolved
src/terminal/adapter/adaptDispatchGraphics.cpp Outdated Show resolved Hide resolved
src/terminal/parser/tracing.cpp Outdated Show resolved Hide resolved
Copy link
Member Author

@miniksa miniksa left a comment

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
Member Author

miniksa commented Jan 2, 2020

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 miniksa removed the Needs-Second It's a PR that needs another sign-off label Jan 2, 2020
@zadjii-msft zadjii-msft added the AutoMerge Marked for automatic merge by the bot when requirements are met label Jan 3, 2020
@ghost
Copy link

ghost commented Jan 3, 2020

Hello @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 miniksa restored the dev/miniksa/gardening3_audit branch January 3, 2020 15:23
@miniksa 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