Skip to content

Commit

Permalink
Merge pull request #2113 from hzeller/feature-20240218-remove-not-needed
Browse files Browse the repository at this point in the history
Remove some unneded includes, add needed ones.
  • Loading branch information
hzeller authored Feb 23, 2024
2 parents 53e8d67 + 4aa55d0 commit 0f97047
Show file tree
Hide file tree
Showing 303 changed files with 462 additions and 873 deletions.
49 changes: 27 additions & 22 deletions common/analysis/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ cc_library(
hdrs = ["citation.h"],
deps = [
"@com_google_absl//absl/strings",
"@com_google_absl//absl/strings:string_view",
],
)

Expand All @@ -38,6 +39,7 @@ cc_library(
"//common/util:logging",
"//common/util:spacer",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/strings:string_view",
],
)

Expand All @@ -47,7 +49,7 @@ cc_library(
deps = [
":lint-rule-status",
"@com_google_absl//absl/status",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/strings:string_view",
],
)

Expand All @@ -74,14 +76,10 @@ cc_library(
"//bazel:flex",
"//common/lexer:flex-lexer-adapter",
"//common/lexer:token-stream-adapter",
"//common/strings:position",
"//common/text:text-structure",
"//common/text:token-info",
"//common/text:token-stream-view",
"//common/util:container-util",
"//common/util:interval-set",
"//common/util:logging",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/strings:string_view",
],
)

Expand All @@ -97,6 +95,7 @@ cc_library(
"//common/util:user-interaction",
"@com_google_absl//absl/status",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/strings:string_view",
],
)

Expand All @@ -108,7 +107,7 @@ cc_test(
":command-file-lexer",
"//common/lexer:lexer-test-util",
"//common/text:token-info",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/strings:string_view",
"@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
Expand All @@ -134,10 +133,11 @@ cc_library(
"//common/util:container-iterator-range",
"//common/util:container-util",
"//common/util:file-util",
"//common/util:interval-set",
"//common/util:iterator-range",
"//common/util:logging",
"@com_google_absl//absl/status",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/strings:string_view",
],
)

Expand All @@ -157,7 +157,7 @@ cc_library(
"//common/util:logging",
"//common/util:spacer",
"@com_google_absl//absl/status",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/strings:string_view",
],
)

Expand All @@ -174,6 +174,7 @@ cc_library(
"//common/util:logging",
"@com_google_absl//absl/status",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/strings:string_view",
"@com_google_googletest//:gtest", # for library testonly
],
)
Expand All @@ -190,7 +191,7 @@ cc_library(
"//common/text:tree-utils",
"//common/util:algorithm",
"//common/util:logging",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/strings:string_view",
"@com_google_googletest//:gtest", # for library testonly
],
)
Expand All @@ -203,7 +204,7 @@ cc_library(
":line-lint-rule",
":lint-rule-status",
"//common/util:logging",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/strings:string_view",
],
)

Expand All @@ -217,7 +218,8 @@ cc_library(
":lint-rule-status",
":linter-test-utils",
"//common/text:text-structure",
"@com_google_absl//absl/strings",
"//common/util:logging",
"@com_google_absl//absl/strings:string_view",
],
)

Expand All @@ -226,7 +228,7 @@ cc_library(
hdrs = ["line_lint_rule.h"],
deps = [
":lint-rule",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/strings:string_view",
],
)

Expand Down Expand Up @@ -257,7 +259,7 @@ cc_library(
":syntax-tree-linter",
"//common/text:text-structure",
"//common/util:logging",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/strings:string_view",
"@com_google_googletest//:gtest", # for library testonly
],
)
Expand Down Expand Up @@ -298,7 +300,7 @@ cc_library(
":text-structure-lint-rule",
"//common/text:text-structure",
"//common/util:logging",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/strings:string_view",
],
)

Expand All @@ -310,9 +312,8 @@ cc_library(
":lint-rule-status",
":linter-test-utils",
":text-structure-linter",
"//common/text:symbol",
"//common/util:logging",
"@com_google_absl//absl/status",
"@com_google_absl//absl/strings:string_view",
"@com_google_googletest//:gtest", # for library testonly
],
)
Expand All @@ -323,7 +324,7 @@ cc_library(
deps = [
":lint-rule",
"//common/text:text-structure",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/strings:string_view",
],
)

Expand All @@ -350,7 +351,7 @@ cc_library(
":token-stream-linter",
"//common/text:text-structure",
"//common/util:logging",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/strings:string_view",
],
)

Expand All @@ -372,6 +373,7 @@ cc_test(
"//common/text:token-info",
"//common/text:tree-builder-test-util",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/strings:string_view",
"@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
Expand Down Expand Up @@ -402,6 +404,7 @@ cc_test(
"//common/text:token-info",
"@com_google_absl//absl/status",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/strings:string_view",
"@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
Expand All @@ -415,6 +418,7 @@ cc_test(
":linter-test-utils",
"//common/util:range",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/strings:string_view",
"@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
Expand All @@ -428,7 +432,7 @@ cc_test(
":line-linter",
":lint-rule-status",
"//common/text:token-info",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/strings:string_view",
"@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
Expand Down Expand Up @@ -458,7 +462,6 @@ cc_test(
srcs = ["syntax_tree_search_test.cc"],
deps = [
":syntax-tree-search",
"//common/analysis/matcher",
"//common/analysis/matcher:matcher-builders",
"//common/text:symbol",
"//common/text:syntax-tree-context",
Expand All @@ -477,6 +480,7 @@ cc_test(
"//common/text:tree-builder-test-util",
"//common/util:range",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/strings:string_view",
"@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
Expand All @@ -492,6 +496,7 @@ cc_test(
"//common/text:text-structure",
"//common/text:token-info",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/strings:string_view",
"@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
Expand All @@ -506,7 +511,7 @@ cc_test(
":token-stream-linter",
"//common/text:token-info",
"//common/text:token-stream-view",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/strings:string_view",
"@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
Expand Down
2 changes: 0 additions & 2 deletions common/analysis/line_lint_rule.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
#ifndef VERIBLE_COMMON_ANALYSIS_LINE_LINT_RULE_H_
#define VERIBLE_COMMON_ANALYSIS_LINE_LINT_RULE_H_

#include <cstddef>

#include "absl/strings/string_view.h"
#include "common/analysis/lint_rule.h"

Expand Down
2 changes: 0 additions & 2 deletions common/analysis/lint_rule.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
#ifndef VERIBLE_COMMON_ANALYSIS_LINT_RULE_H_
#define VERIBLE_COMMON_ANALYSIS_LINT_RULE_H_

#include <string>

#include "absl/status/status.h"
#include "absl/strings/string_view.h"
#include "common/analysis/lint_rule_status.h"
Expand Down
1 change: 0 additions & 1 deletion common/analysis/lint_rule_status.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#ifndef VERIBLE_COMMON_ANALYSIS_LINT_RULE_STATUS_H_
#define VERIBLE_COMMON_ANALYSIS_LINT_RULE_STATUS_H_

#include <fstream>
#include <functional>
#include <initializer_list>
#include <iosfwd>
Expand Down
1 change: 1 addition & 0 deletions common/analysis/lint_waiver.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include <utility>
#include <vector>

#include "absl/status/status.h"
#include "absl/strings/str_cat.h"
#include "absl/strings/str_split.h"
#include "absl/strings/string_view.h"
Expand Down
2 changes: 0 additions & 2 deletions common/analysis/lint_waiver.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#ifndef VERIBLE_COMMON_ANALYSIS_LINT_WAIVER_H_
#define VERIBLE_COMMON_ANALYSIS_LINT_WAIVER_H_

#include <cstddef>
#include <map>
#include <regex> // NOLINT
#include <set>
Expand All @@ -27,7 +26,6 @@
#include "common/strings/position.h"
#include "common/text/text_structure.h"
#include "common/util/container_util.h"
#include "common/util/interval_set.h"

namespace verible {

Expand Down
2 changes: 1 addition & 1 deletion common/analysis/matcher/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ cc_library(
"//common/text:tree-utils",
"//common/text:visitors",
"@com_google_absl//absl/status",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/strings:string_view",
"@com_google_googletest//:gtest", # for library testonly
],
)
2 changes: 0 additions & 2 deletions common/analysis/matcher/matcher_builders.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
#ifndef VERIBLE_COMMON_ANALYSIS_MATCHER_MATCHER_BUILDERS_H_
#define VERIBLE_COMMON_ANALYSIS_MATCHER_MATCHER_BUILDERS_H_

#include <algorithm>
#include <array>
#include <iterator>
#include <utility>

#include "common/analysis/matcher/descent_path.h"
Expand Down
1 change: 0 additions & 1 deletion common/analysis/syntax_tree_linter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include "common/text/concrete_syntax_leaf.h"
#include "common/text/concrete_syntax_tree.h"
#include "common/text/symbol.h"
#include "common/text/syntax_tree_context.h"
#include "common/util/logging.h"

namespace verible {
Expand Down
1 change: 0 additions & 1 deletion common/analysis/syntax_tree_search_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include <memory>
#include <vector>

#include "common/analysis/matcher/matcher.h"
#include "common/analysis/matcher/matcher_builders.h"
#include "common/text/symbol.h"
#include "common/text/syntax_tree_context.h"
Expand Down
2 changes: 0 additions & 2 deletions common/analysis/syntax_tree_search_test_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@
#ifndef VERIBLE_COMMON_ANALYSIS_SYNTAX_TREE_SEARCH_TEST_UTILS_H_
#define VERIBLE_COMMON_ANALYSIS_SYNTAX_TREE_SEARCH_TEST_UTILS_H_

#include <functional>
#include <initializer_list>
#include <iosfwd>
#include <string>
#include <vector>

#include "absl/strings/string_view.h"
Expand Down
3 changes: 0 additions & 3 deletions common/analysis/text_structure_linter_test_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,14 @@
#ifndef VERIBLE_COMMON_ANALYSIS_TEXT_STRUCTURE_LINTER_TEST_UTILS_H_
#define VERIBLE_COMMON_ANALYSIS_TEXT_STRUCTURE_LINTER_TEST_UTILS_H_

#include <cstdint>
#include <memory>
#include <utility>
#include <vector>

#include "absl/status/status.h"
#include "absl/strings/string_view.h"
#include "common/analysis/lint_rule_status.h"
#include "common/analysis/linter_test_utils.h"
#include "common/analysis/text_structure_linter.h"
#include "common/text/symbol.h"
#include "common/util/logging.h"
#include "gtest/gtest.h"

Expand Down
Loading

0 comments on commit 0f97047

Please sign in to comment.