diff options
author | vityaman <[email protected]> | 2025-06-06 11:09:02 +0300 |
---|---|---|
committer | robot-piglet <[email protected]> | 2025-06-06 11:32:08 +0300 |
commit | 1df1c560c27a041991c7fc59bcdf232eb57ad11f (patch) | |
tree | cec61c97b18b46a460d157325e568187e5133f20 /yql/essentials/sql/v1/complete/sql_complete.cpp | |
parent | 082adff1a90a22e29aa0a831de5255fcef65da0e (diff) |
YQL-19747: Fix some TODOs and Clang Tidy checks
Clang Tidy is cool, but too slow ;(. Btw, should we respect `misc-include-cleaner` check?
```bash
ya dump compile-commands > /tmp/cc/compile_commands.json
find . -type f \( -name "*.cpp" -o -name "*.h" \) -exec clang-tidy {} -p /tmp/cc {} -checks="misc-*" \;
```
---
- Related to `YQL-19747`
- Related to https://github.com/ydb-platform/ydb/issues/9056
---
Pull Request resolved: https://github.com/ytsaurus/ytsaurus/pull/1305
commit_hash:c2ecf638062dcdd0730fed3381da4a230f5352c3
Diffstat (limited to 'yql/essentials/sql/v1/complete/sql_complete.cpp')
-rw-r--r-- | yql/essentials/sql/v1/complete/sql_complete.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/yql/essentials/sql/v1/complete/sql_complete.cpp b/yql/essentials/sql/v1/complete/sql_complete.cpp index 3fe82f63fea..c9ab8d7eade 100644 --- a/yql/essentials/sql/v1/complete/sql_complete.cpp +++ b/yql/essentials/sql/v1/complete/sql_complete.cpp @@ -17,7 +17,7 @@ namespace NSQLComplete { class TSqlCompletionEngine: public ISqlCompletionEngine { public: - explicit TSqlCompletionEngine( + TSqlCompletionEngine( TLexerSupplier lexer, INameService::TPtr names, ISqlCompletionEngine::TConfiguration configuration) @@ -28,11 +28,12 @@ namespace NSQLComplete { { } - TCompletion Complete(TCompletionInput input) override { - return CompleteAsync(std::move(input), {}).ExtractValueSync(); + TCompletion + Complete(TCompletionInput input, TEnvironment env = {}) override { + return CompleteAsync(input, env).ExtractValueSync(); } - virtual NThreading::TFuture<TCompletion> CompleteAsync(TCompletionInput input, TEnvironment env) override { + NThreading::TFuture<TCompletion> CompleteAsync(TCompletionInput input, TEnvironment env) override { if ( input.CursorPosition < input.Text.length() && IsUTF8ContinuationByte(input.Text.at(input.CursorPosition)) || @@ -285,8 +286,8 @@ namespace NSQLComplete { } // namespace NSQLComplete template <> -void Out<NSQLComplete::ECandidateKind>(IOutputStream& out, NSQLComplete::ECandidateKind kind) { - switch (kind) { +void Out<NSQLComplete::ECandidateKind>(IOutputStream& out, NSQLComplete::ECandidateKind value) { + switch (value) { case NSQLComplete::ECandidateKind::Keyword: out << "Keyword"; break; @@ -321,6 +322,6 @@ void Out<NSQLComplete::ECandidateKind>(IOutputStream& out, NSQLComplete::ECandid } template <> -void Out<NSQLComplete::TCandidate>(IOutputStream& out, const NSQLComplete::TCandidate& candidate) { - out << "{" << candidate.Kind << ", \"" << candidate.Content << "\"}"; +void Out<NSQLComplete::TCandidate>(IOutputStream& out, const NSQLComplete::TCandidate& value) { + out << "{" << value.Kind << ", \"" << value.Content << "\"}"; } |