Skip to content

Remove substitution_formatter_base.h#45369

Open
yanavlasov wants to merge 1 commit into
envoyproxy:mainfrom
yanavlasov:substitution_formatter_base
Open

Remove substitution_formatter_base.h#45369
yanavlasov wants to merge 1 commit into
envoyproxy:mainfrom
yanavlasov:substitution_formatter_base

Conversation

@yanavlasov
Copy link
Copy Markdown
Contributor

Remove envoy/formatter/substitution_formatter.h -> envoy/formatter/substitution_formatter_base.h indirection and just use substitution_formatter.h directly.

Risk Level: none
Testing: unit tests
Docs Changes: no
Release Notes: no
Platform Specific Features: no

Signed-off-by: Yan Avlasov <yavlasov@google.com>
@yanjunxiang-google
Copy link
Copy Markdown
Contributor

/gemini review

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request consolidates the formatter interfaces by removing substitution_formatter_base.h and merging its contents into substitution_formatter.h, updating all dependent files accordingly. The review feedback suggests correcting outdated and misspelled type references (FormatterProviderBasePtr and FormattterProviderPtr) in the documentation of CommandParser::parse to ensure clarity and correctness.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment on lines +77 to +85
* Return a FormatterProviderBasePtr if command arg and max_length are correct for the formatter
* provider associated with command.
* @param command command name.
* @param command_arg command specific argument. Empty if no argument is provided.
* @param max_length length to which the output produced by FormatterProvider
* should be truncated to (optional).
*
* @return FormattterProviderPtr substitution provider for the parsed command.
*/
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.

medium

The comment for CommandParser::parse contains outdated and misspelled type references. It refers to FormatterProviderBasePtr (which does not exist) and misspells FormatterProviderPtr as FormattterProviderPtr (with three 't's). Updating these will improve the clarity and correctness of the public interface documentation.

   * Return a FormatterProviderPtr if command arg and max_length are correct for the formatter
   * provider associated with command.
   * @param command command name.
   * @param command_arg command specific argument. Empty if no argument is provided.
   * @param max_length length to which the output produced by FormatterProvider
   *                   should be truncated to (optional).
   *
   * @return FormatterProviderPtr substitution provider for the parsed command.
   */

* @param max_length length to which the output produced by FormatterProvider
* should be truncated to (optional).
*
* @return FormattterProviderPtr substitution provider for the parsed command.
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.

remove a "t"

virtual ~CommandParser() = default;

/**
* Return a FormatterProviderBasePtr if command arg and max_length are correct for the formatter
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.

FormatterProviderPtr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants