Skip to content

Commit

Permalink
Fix missing comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Matts966 committed Apr 21, 2022
1 parent 682bcb4 commit 973eab9
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.0.0
4.1.0
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/external
/bazel-*
/compile_commands.json
/.cache/
16 changes: 16 additions & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,19 @@ git_repository(
remote = "https://github.com/gflags/gflags.git",
tag = "v2.2.2"
)

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

# Hedron's Compile Commands Extractor for Bazel
# https://github.com/hedronvision/bazel-compile-commands-extractor
http_archive(
name = "hedron_compile_commands",

# Replace the commit hash in both places (below) with the latest, rather than using the stale one here.
# Even better, set up Renovate and let it do the work for you (see "Suggestion: Updates" in the README).
url = "https://github.com/hedronvision/bazel-compile-commands-extractor/archive/af9af15f7bc16fc3e407e2231abfcb62907d258f.tar.gz",
strip_prefix = "bazel-compile-commands-extractor-af9af15f7bc16fc3e407e2231abfcb62907d258f",
# When you first run this tool, it'll recommend a sha256 hash to put here with a message like: "DEBUG: Rule 'hedron_compile_commands' indicated that a canonical reproducible form can be obtained by modifying arguments sha256 = ..."
)
load("@hedron_compile_commands//:workspace_setup.bzl", "hedron_compile_commands_setup")
hedron_compile_commands_setup()
1 change: 0 additions & 1 deletion zetasql/public/sql_formatter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ absl::Status FormatSql(absl::string_view sql, std::string* formatted_sql) {
GetParseTokens(options, &location, &parse_tokens);
if (token_status.ok()) {
for (const auto& parse_token : parse_tokens) {
if (parse_token.IsEndOfInput()) break;
if (parse_token.IsComment()) {
comments.push_back(std::make_pair(parse_token.GetSQL(), parse_token.GetLocationRange().start()));
}
Expand Down

0 comments on commit 973eab9

Please sign in to comment.