diff --git a/common/analysis/BUILD b/common/analysis/BUILD index 11d3f2d2d..1cc8d8ca3 100644 --- a/common/analysis/BUILD +++ b/common/analysis/BUILD @@ -20,6 +20,7 @@ cc_library( hdrs = ["citation.h"], deps = [ "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) @@ -38,6 +39,7 @@ cc_library( "//common/util:logging", "//common/util:spacer", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) @@ -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", ], ) @@ -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", ], ) @@ -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", ], ) @@ -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", ], @@ -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", ], ) @@ -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", ], ) @@ -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 ], ) @@ -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 ], ) @@ -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", ], ) @@ -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", ], ) @@ -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", ], ) @@ -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 ], ) @@ -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", ], ) @@ -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 ], ) @@ -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", ], ) @@ -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", ], ) @@ -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", ], @@ -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", ], @@ -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", ], @@ -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", ], @@ -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", @@ -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", ], @@ -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", ], @@ -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", ], diff --git a/common/analysis/line_lint_rule.h b/common/analysis/line_lint_rule.h index bf71021a1..9f4adf30e 100644 --- a/common/analysis/line_lint_rule.h +++ b/common/analysis/line_lint_rule.h @@ -19,8 +19,6 @@ #ifndef VERIBLE_COMMON_ANALYSIS_LINE_LINT_RULE_H_ #define VERIBLE_COMMON_ANALYSIS_LINE_LINT_RULE_H_ -#include - #include "absl/strings/string_view.h" #include "common/analysis/lint_rule.h" diff --git a/common/analysis/lint_rule.h b/common/analysis/lint_rule.h index cafdda182..efe47045b 100644 --- a/common/analysis/lint_rule.h +++ b/common/analysis/lint_rule.h @@ -18,8 +18,6 @@ #ifndef VERIBLE_COMMON_ANALYSIS_LINT_RULE_H_ #define VERIBLE_COMMON_ANALYSIS_LINT_RULE_H_ -#include - #include "absl/status/status.h" #include "absl/strings/string_view.h" #include "common/analysis/lint_rule_status.h" diff --git a/common/analysis/lint_rule_status.h b/common/analysis/lint_rule_status.h index ebe5aacaf..cb110632f 100644 --- a/common/analysis/lint_rule_status.h +++ b/common/analysis/lint_rule_status.h @@ -17,7 +17,6 @@ #ifndef VERIBLE_COMMON_ANALYSIS_LINT_RULE_STATUS_H_ #define VERIBLE_COMMON_ANALYSIS_LINT_RULE_STATUS_H_ -#include #include #include #include diff --git a/common/analysis/lint_waiver.cc b/common/analysis/lint_waiver.cc index 4d7ec09a6..7353230a6 100644 --- a/common/analysis/lint_waiver.cc +++ b/common/analysis/lint_waiver.cc @@ -25,6 +25,7 @@ #include #include +#include "absl/status/status.h" #include "absl/strings/str_cat.h" #include "absl/strings/str_split.h" #include "absl/strings/string_view.h" diff --git a/common/analysis/lint_waiver.h b/common/analysis/lint_waiver.h index e9680645c..281cc41f7 100644 --- a/common/analysis/lint_waiver.h +++ b/common/analysis/lint_waiver.h @@ -15,7 +15,6 @@ #ifndef VERIBLE_COMMON_ANALYSIS_LINT_WAIVER_H_ #define VERIBLE_COMMON_ANALYSIS_LINT_WAIVER_H_ -#include #include #include // NOLINT #include @@ -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 { diff --git a/common/analysis/matcher/BUILD b/common/analysis/matcher/BUILD index 8cd601be2..c8d17533b 100644 --- a/common/analysis/matcher/BUILD +++ b/common/analysis/matcher/BUILD @@ -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 ], ) diff --git a/common/analysis/matcher/matcher_builders.h b/common/analysis/matcher/matcher_builders.h index 8888dfa05..e5eaa0b9e 100644 --- a/common/analysis/matcher/matcher_builders.h +++ b/common/analysis/matcher/matcher_builders.h @@ -15,9 +15,7 @@ #ifndef VERIBLE_COMMON_ANALYSIS_MATCHER_MATCHER_BUILDERS_H_ #define VERIBLE_COMMON_ANALYSIS_MATCHER_MATCHER_BUILDERS_H_ -#include #include -#include #include #include "common/analysis/matcher/descent_path.h" diff --git a/common/analysis/syntax_tree_linter.cc b/common/analysis/syntax_tree_linter.cc index c07a4ee49..24390d7e3 100644 --- a/common/analysis/syntax_tree_linter.cc +++ b/common/analysis/syntax_tree_linter.cc @@ -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 { diff --git a/common/analysis/syntax_tree_search_test.cc b/common/analysis/syntax_tree_search_test.cc index b19fc52fd..a8f0becc0 100644 --- a/common/analysis/syntax_tree_search_test.cc +++ b/common/analysis/syntax_tree_search_test.cc @@ -17,7 +17,6 @@ #include #include -#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" diff --git a/common/analysis/syntax_tree_search_test_utils.h b/common/analysis/syntax_tree_search_test_utils.h index 4132562c8..3c720e684 100644 --- a/common/analysis/syntax_tree_search_test_utils.h +++ b/common/analysis/syntax_tree_search_test_utils.h @@ -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 #include #include -#include #include #include "absl/strings/string_view.h" diff --git a/common/analysis/text_structure_linter_test_utils.h b/common/analysis/text_structure_linter_test_utils.h index 2a27192da..1643b7cb3 100644 --- a/common/analysis/text_structure_linter_test_utils.h +++ b/common/analysis/text_structure_linter_test_utils.h @@ -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 #include #include #include -#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" diff --git a/common/formatting/BUILD b/common/formatting/BUILD index 2b9fe70f6..7faddcb7e 100644 --- a/common/formatting/BUILD +++ b/common/formatting/BUILD @@ -18,14 +18,12 @@ cc_library( ":unwrapped-line", "//common/strings:display-utils", "//common/strings:position", - "//common/strings:range", "//common/text:concrete-syntax-leaf", "//common/text:concrete-syntax-tree", "//common/text:token-info", "//common/text:token-stream-view", "//common/text:tree-context-visitor", "//common/text:tree-utils", - "//common/util:algorithm", "//common/util:container-iterator-range", "//common/util:enum-flags", "//common/util:iterator-range", @@ -34,6 +32,7 @@ cc_library( "//common/util:vector-tree", "//common/util:vector-tree-iterators", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) @@ -45,13 +44,17 @@ cc_test( ":format-token", ":token-partition-tree", ":token-partition-tree-test-utils", + ":unwrapped-line", ":unwrapped-line-test-utils", + "//common/strings:position", + "//common/text:token-info", "//common/text:tree-builder-test-util", "//common/util:logging", "//common/util:range", "//common/util:spacer", "//common/util:value-saver", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", ], @@ -63,7 +66,7 @@ cc_library( hdrs = ["basic_format_style.h"], deps = [ "//common/util:enum-flags", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) @@ -98,11 +101,9 @@ cc_library( "//common/text:concrete-syntax-leaf", "//common/text:token-info", "//common/util:container-iterator-range", - "//common/util:iterator-adaptors", "//common/util:logging", "//common/util:spacer", - "@com_google_absl//absl/base:core_headers", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) @@ -111,11 +112,11 @@ cc_test( srcs = ["format_token_test.cc"], deps = [ ":format-token", - ":unwrapped-line", ":unwrapped-line-test-utils", + "//common/strings:position", "//common/text:token-info", "//common/util:range", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", ], @@ -140,6 +141,7 @@ cc_library( "//common/util:vector-tree", "@com_google_absl//absl/container:fixed_array", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) @@ -157,12 +159,14 @@ cc_test( ":unwrapped-line", ":unwrapped-line-test-utils", "//common/strings:split", + "//common/text:token-info", "//common/util:logging", "//common/util:spacer", "//common/util:tree-operations", "//common/util:vector-tree", "@com_google_absl//absl/container:fixed_array", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", ], @@ -182,7 +186,6 @@ cc_library( "//common/strings:display-utils", "//common/strings:position", "//common/strings:range", - "//common/text:tree-utils", "//common/util:algorithm", "//common/util:container-iterator-range", "//common/util:iterator-adaptors", @@ -215,16 +218,20 @@ cc_test( name = "token-partition-tree_test", srcs = ["token_partition_tree_test.cc"], deps = [ + ":basic-format-style", ":format-token", ":token-partition-tree", ":token-partition-tree-test-utils", ":unwrapped-line", ":unwrapped-line-test-utils", + "//common/strings:position", + "//common/text:token-info", "//common/util:container-iterator-range", "//common/util:logging", "//common/util:tree-operations", "//common/util:vector-tree", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", ], @@ -240,6 +247,7 @@ cc_library( ":format-token", "//common/strings:display-utils", "//common/text:symbol", + "//common/text:token-info", "//common/text:tree-utils", "//common/util:container-iterator-range", "//common/util:logging", @@ -257,7 +265,7 @@ cc_library( ":format-token", ":unwrapped-line", "//common/text:token-info", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) @@ -268,6 +276,7 @@ cc_test( ":format-token", ":unwrapped-line", ":unwrapped-line-test-utils", + "//common/text:token-info", "//common/text:tree-builder-test-util", "//common/util:container-iterator-range", "@com_google_absl//absl/strings:string_view", @@ -288,7 +297,6 @@ cc_library( "//common/text:symbol", "//common/text:syntax-tree-context", "//common/text:token-info", - "//common/text:token-stream-view", "//common/text:tree-context-visitor", ], ) @@ -351,6 +359,7 @@ cc_test( "//common/util:container-iterator-range", "//common/util:range", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", ], @@ -367,13 +376,12 @@ cc_library( ":format-token", ":unwrapped-line", "//common/strings:position", - "//common/strings:range", "//common/text:token-info", "//common/util:container-iterator-range", "//common/util:iterator-adaptors", "//common/util:iterator-range", "//common/util:logging", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) @@ -389,7 +397,6 @@ cc_library( "//common/text:token-info", "//common/util:logging", "//common/util:spacer", - "@com_google_absl//absl/strings", ], ) @@ -402,9 +409,9 @@ cc_test( ":state-node", ":unwrapped-line", ":unwrapped-line-test-utils", + "//common/text:token-info", "//common/util:logging", - "@com_google_absl//absl/memory", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", ], @@ -419,6 +426,7 @@ cc_test( ":line-wrap-searcher", ":unwrapped-line", ":unwrapped-line-test-utils", + "//common/text:token-info", "@com_google_absl//absl/strings", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", @@ -434,6 +442,7 @@ cc_library( "//common/strings:position", "@com_google_absl//absl/status", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) diff --git a/common/formatting/align.cc b/common/formatting/align.cc index 9471659e7..bdc7e8de5 100644 --- a/common/formatting/align.cc +++ b/common/formatting/align.cc @@ -35,11 +35,10 @@ #include "common/formatting/token_partition_tree.h" #include "common/formatting/unwrapped_line.h" #include "common/strings/display_utils.h" -#include "common/strings/range.h" +#include "common/strings/position.h" #include "common/text/concrete_syntax_leaf.h" #include "common/text/concrete_syntax_tree.h" #include "common/text/token_info.h" -#include "common/text/token_stream_view.h" #include "common/text/tree_utils.h" #include "common/util/container_iterator_range.h" #include "common/util/enum_flags.h" diff --git a/common/formatting/align_test.cc b/common/formatting/align_test.cc index 4a6809741..53cfdc2b3 100644 --- a/common/formatting/align_test.cc +++ b/common/formatting/align_test.cc @@ -28,7 +28,10 @@ #include "common/formatting/format_token.h" #include "common/formatting/token_partition_tree.h" #include "common/formatting/token_partition_tree_test_utils.h" +#include "common/formatting/unwrapped_line.h" #include "common/formatting/unwrapped_line_test_utils.h" +#include "common/strings/position.h" +#include "common/text/token_info.h" #include "common/text/tree_builder_test_util.h" #include "common/util/logging.h" #include "common/util/range.h" diff --git a/common/formatting/basic_format_style_init.cc b/common/formatting/basic_format_style_init.cc index ff82b196f..b7129bec7 100644 --- a/common/formatting/basic_format_style_init.cc +++ b/common/formatting/basic_format_style_init.cc @@ -15,6 +15,7 @@ #include "common/formatting/basic_format_style_init.h" #include "absl/flags/flag.h" +#include "common/formatting/basic_format_style.h" ABSL_FLAG(int, indentation_spaces, 2, "Each indentation level adds this many spaces."); diff --git a/common/formatting/format_token.cc b/common/formatting/format_token.cc index ed8e5b36a..c76dc4701 100644 --- a/common/formatting/format_token.cc +++ b/common/formatting/format_token.cc @@ -22,9 +22,9 @@ #include #include -#include "absl/base/macros.h" #include "absl/strings/string_view.h" #include "common/strings/display_utils.h" +#include "common/strings/position.h" #include "common/strings/range.h" #include "common/text/token_info.h" #include "common/util/logging.h" diff --git a/common/formatting/format_token.h b/common/formatting/format_token.h index fc48ef2c3..9b7ee3b90 100644 --- a/common/formatting/format_token.h +++ b/common/formatting/format_token.h @@ -15,7 +15,6 @@ #ifndef VERIBLE_COMMON_FORMATTING_FORMAT_TOKEN_H_ #define VERIBLE_COMMON_FORMATTING_FORMAT_TOKEN_H_ -#include #include #include #include diff --git a/common/formatting/format_token_test.cc b/common/formatting/format_token_test.cc index 4e2cab7f2..c1d4bef8c 100644 --- a/common/formatting/format_token_test.cc +++ b/common/formatting/format_token_test.cc @@ -19,8 +19,8 @@ #include #include "absl/strings/string_view.h" -#include "common/formatting/unwrapped_line.h" #include "common/formatting/unwrapped_line_test_utils.h" +#include "common/strings/position.h" #include "common/text/token_info.h" #include "common/util/range.h" #include "gtest/gtest.h" diff --git a/common/formatting/layout_optimizer.cc b/common/formatting/layout_optimizer.cc index 6d172a921..44e740351 100644 --- a/common/formatting/layout_optimizer.cc +++ b/common/formatting/layout_optimizer.cc @@ -31,7 +31,6 @@ #include "absl/container/fixed_array.h" #include "common/formatting/basic_format_style.h" #include "common/formatting/layout_optimizer_internal.h" -#include "common/formatting/line_wrap_searcher.h" #include "common/formatting/token_partition_tree.h" #include "common/formatting/unwrapped_line.h" #include "common/util/container_iterator_range.h" diff --git a/common/formatting/layout_optimizer.h b/common/formatting/layout_optimizer.h index dc84eadda..b603b2093 100644 --- a/common/formatting/layout_optimizer.h +++ b/common/formatting/layout_optimizer.h @@ -20,19 +20,8 @@ #ifndef VERIBLE_VERILOG_FORMATTING_LAYOUT_OPTIMIZER_H_ #define VERIBLE_VERILOG_FORMATTING_LAYOUT_OPTIMIZER_H_ -#include -#include -#include -#include -#include - -#include "absl/container/fixed_array.h" -#include "absl/strings/str_cat.h" -#include "absl/strings/str_join.h" #include "common/formatting/basic_format_style.h" #include "common/formatting/token_partition_tree.h" -#include "common/formatting/unwrapped_line.h" -#include "common/util/vector_tree.h" namespace verible { diff --git a/common/formatting/layout_optimizer_test.cc b/common/formatting/layout_optimizer_test.cc index f40cac57e..4489ce844 100644 --- a/common/formatting/layout_optimizer_test.cc +++ b/common/formatting/layout_optimizer_test.cc @@ -34,6 +34,7 @@ #include "common/formatting/unwrapped_line.h" #include "common/formatting/unwrapped_line_test_utils.h" #include "common/strings/split.h" +#include "common/text/token_info.h" #include "common/util/spacer.h" #include "gtest/gtest.h" diff --git a/common/formatting/line_wrap_searcher_test.cc b/common/formatting/line_wrap_searcher_test.cc index 6aa1c34ad..a1e28b29e 100644 --- a/common/formatting/line_wrap_searcher_test.cc +++ b/common/formatting/line_wrap_searcher_test.cc @@ -23,6 +23,7 @@ #include "common/formatting/format_token.h" #include "common/formatting/unwrapped_line.h" #include "common/formatting/unwrapped_line_test_utils.h" +#include "common/text/token_info.h" #include "gtest/gtest.h" namespace verible { diff --git a/common/formatting/state_node.cc b/common/formatting/state_node.cc index be3d6348b..2163fd533 100644 --- a/common/formatting/state_node.cc +++ b/common/formatting/state_node.cc @@ -25,7 +25,6 @@ #include "common/formatting/format_token.h" #include "common/formatting/unwrapped_line.h" #include "common/strings/position.h" -#include "common/strings/range.h" #include "common/text/token_info.h" #include "common/util/iterator_adaptors.h" #include "common/util/iterator_range.h" diff --git a/common/formatting/state_node.h b/common/formatting/state_node.h index 47e569a41..68c2310f6 100644 --- a/common/formatting/state_node.h +++ b/common/formatting/state_node.h @@ -17,7 +17,6 @@ #include #include -#include #include #include #include diff --git a/common/formatting/state_node_test.cc b/common/formatting/state_node_test.cc index a88a30860..986a1800c 100644 --- a/common/formatting/state_node_test.cc +++ b/common/formatting/state_node_test.cc @@ -21,12 +21,12 @@ #include #include -#include "absl/memory/memory.h" #include "absl/strings/string_view.h" #include "common/formatting/basic_format_style.h" #include "common/formatting/format_token.h" #include "common/formatting/unwrapped_line.h" #include "common/formatting/unwrapped_line_test_utils.h" +#include "common/text/token_info.h" #include "common/util/logging.h" #include "gtest/gtest.h" diff --git a/common/formatting/token_partition_tree.cc b/common/formatting/token_partition_tree.cc index e456c4a80..ae0a7b4c1 100644 --- a/common/formatting/token_partition_tree.cc +++ b/common/formatting/token_partition_tree.cc @@ -23,12 +23,13 @@ #include #include "absl/strings/string_view.h" +#include "common/formatting/basic_format_style.h" #include "common/formatting/format_token.h" #include "common/formatting/line_wrap_searcher.h" #include "common/formatting/unwrapped_line.h" #include "common/strings/display_utils.h" +#include "common/strings/position.h" #include "common/strings/range.h" -#include "common/text/tree_utils.h" #include "common/util/algorithm.h" #include "common/util/container_iterator_range.h" #include "common/util/iterator_adaptors.h" diff --git a/common/formatting/token_partition_tree_test.cc b/common/formatting/token_partition_tree_test.cc index 13555c4a7..0050a8602 100644 --- a/common/formatting/token_partition_tree_test.cc +++ b/common/formatting/token_partition_tree_test.cc @@ -20,10 +20,13 @@ #include "absl/strings/str_split.h" #include "absl/strings/string_view.h" +#include "common/formatting/basic_format_style.h" #include "common/formatting/format_token.h" #include "common/formatting/token_partition_tree_test_utils.h" #include "common/formatting/unwrapped_line.h" #include "common/formatting/unwrapped_line_test_utils.h" +#include "common/strings/position.h" +#include "common/text/token_info.h" #include "common/util/container_iterator_range.h" #include "common/util/logging.h" #include "common/util/tree_operations.h" diff --git a/common/formatting/tree_annotator.cc b/common/formatting/tree_annotator.cc index 4b8a0786d..b6dba928b 100644 --- a/common/formatting/tree_annotator.cc +++ b/common/formatting/tree_annotator.cc @@ -18,7 +18,7 @@ #include #include "common/text/concrete_syntax_leaf.h" -#include "common/text/token_stream_view.h" +#include "common/text/token_info.h" #include "common/text/tree_context_visitor.h" namespace verible { diff --git a/common/formatting/unwrapped_line.cc b/common/formatting/unwrapped_line.cc index bcbc5df51..c41c4f92d 100644 --- a/common/formatting/unwrapped_line.cc +++ b/common/formatting/unwrapped_line.cc @@ -26,6 +26,7 @@ #include "absl/strings/str_join.h" #include "common/formatting/format_token.h" #include "common/strings/display_utils.h" +#include "common/text/token_info.h" #include "common/text/tree_utils.h" #include "common/util/container_iterator_range.h" #include "common/util/logging.h" diff --git a/common/formatting/unwrapped_line.h b/common/formatting/unwrapped_line.h index e16c98167..8c807c40b 100644 --- a/common/formatting/unwrapped_line.h +++ b/common/formatting/unwrapped_line.h @@ -23,6 +23,7 @@ #include "common/formatting/format_token.h" #include "common/text/symbol.h" +#include "common/text/token_info.h" namespace verible { diff --git a/common/formatting/unwrapped_line_test.cc b/common/formatting/unwrapped_line_test.cc index d73bbe2e8..d10134d2a 100644 --- a/common/formatting/unwrapped_line_test.cc +++ b/common/formatting/unwrapped_line_test.cc @@ -21,6 +21,7 @@ #include "absl/strings/string_view.h" #include "common/formatting/format_token.h" #include "common/formatting/unwrapped_line_test_utils.h" +#include "common/text/token_info.h" #include "common/text/tree_builder_test_util.h" #include "common/util/container_iterator_range.h" #include "gtest/gtest.h" diff --git a/common/formatting/unwrapped_line_test_utils.cc b/common/formatting/unwrapped_line_test_utils.cc index 75d75fddb..84b56232d 100644 --- a/common/formatting/unwrapped_line_test_utils.cc +++ b/common/formatting/unwrapped_line_test_utils.cc @@ -17,7 +17,6 @@ #include #include -#include "common/formatting/format_token.h" #include "common/formatting/unwrapped_line.h" #include "common/text/token_info.h" diff --git a/common/lexer/BUILD b/common/lexer/BUILD index 4efb8af57..054b575f5 100644 --- a/common/lexer/BUILD +++ b/common/lexer/BUILD @@ -29,7 +29,7 @@ cc_library( "//common/text:token-info", "//common/text:token-stream-view", "@com_google_absl//absl/status", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) @@ -40,7 +40,7 @@ cc_library( ":lexer", "//common/text:token-info", "//common/util:logging", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) @@ -49,7 +49,7 @@ cc_library( hdrs = ["lexer.h"], deps = [ "//common/text:token-info", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) @@ -63,7 +63,7 @@ cc_library( "//common/text:token-info", "//common/text:token-info-test-util", "//common/util:logging", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", "@com_google_googletest//:gtest", # for library testonly ], ) @@ -75,8 +75,8 @@ cc_test( ":lexer-test-util", "//common/text:constants", "//common/text:token-info", - "//common/util:logging", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", ], diff --git a/common/lexer/flex_lexer_adapter.h b/common/lexer/flex_lexer_adapter.h index 8529aa787..2127ee35e 100644 --- a/common/lexer/flex_lexer_adapter.h +++ b/common/lexer/flex_lexer_adapter.h @@ -32,7 +32,6 @@ #ifndef VERIBLE_COMMON_LEXER_FLEX_LEXER_ADAPTER_H_ #define VERIBLE_COMMON_LEXER_FLEX_LEXER_ADAPTER_H_ -#include #include #include // IWYU pragma: keep // for ostringstream #include diff --git a/common/lexer/lexer_test_util.h b/common/lexer/lexer_test_util.h index bd273d9c8..919810ed9 100644 --- a/common/lexer/lexer_test_util.h +++ b/common/lexer/lexer_test_util.h @@ -25,7 +25,6 @@ #include #include #include -#include #include #include "absl/strings/string_view.h" diff --git a/common/lsp/BUILD b/common/lsp/BUILD index e8e7595c1..44567d426 100644 --- a/common/lsp/BUILD +++ b/common/lsp/BUILD @@ -25,6 +25,7 @@ cc_library( "//common/util:status-macros", "@com_google_absl//absl/status", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) @@ -35,6 +36,7 @@ cc_test( ":message-stream-splitter", "@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", ], @@ -51,7 +53,7 @@ cc_library( features = ["-use_header_modules"], # precompiled headers incompatible with -fexceptions. deps = [ "//common/util:logging", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", "@jsonhpp", ], ) @@ -66,8 +68,7 @@ cc_test( features = ["-use_header_modules"], # precompiled headers incompatible with -fexceptions. deps = [ ":json-rpc-dispatcher", - "@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", "@jsonhpp", @@ -113,6 +114,7 @@ cc_library( "//common/strings:utf8", "@com_google_absl//absl/container:flat_hash_map", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) @@ -124,6 +126,7 @@ cc_test( ":lsp-protocol", ":lsp-text-buffer", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", ], @@ -135,6 +138,7 @@ cc_library( hdrs = ["lsp-file-utils.h"], deps = [ "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) @@ -156,6 +160,7 @@ cc_binary( ":message-stream-splitter", "@com_google_absl//absl/status", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", "@jsonhpp", ], ) diff --git a/common/parser/BUILD b/common/parser/BUILD index 3652dd9cc..d22c2db4a 100644 --- a/common/parser/BUILD +++ b/common/parser/BUILD @@ -19,8 +19,9 @@ cc_library( "//common/lexer:token-generator", "//common/text:concrete-syntax-tree", "//common/text:token-info", + "//common/util:logging", "@com_google_absl//absl/status", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) @@ -72,7 +73,9 @@ cc_library( "//common/text:symbol", "//common/text:token-info", "//common/text:token-info-test-util", + "//common/util:logging", "@com_google_absl//absl/status", + "@com_google_absl//absl/strings:string_view", "@com_google_googletest//:gtest", # for library testonly ], ) @@ -89,7 +92,7 @@ cc_test( "//common/text:concrete-syntax-tree", "//common/text:symbol", "//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", ], diff --git a/common/strings/BUILD b/common/strings/BUILD index 8d6a76353..899c1a43f 100644 --- a/common/strings/BUILD +++ b/common/strings/BUILD @@ -11,9 +11,7 @@ package( cc_library( name = "compare", hdrs = ["compare.h"], - deps = [ - "@com_google_absl//absl/strings", - ], + deps = ["@com_google_absl//absl/strings:string_view"], ) cc_test( @@ -35,6 +33,7 @@ cc_library( "//common/util:logging", "//common/util:range", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) @@ -44,7 +43,7 @@ cc_test( deps = [ ":comment-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", ], @@ -59,7 +58,7 @@ cc_library( ":split", "//common/util:iterator-range", "//external_libs:editscript", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) @@ -68,7 +67,8 @@ cc_test( srcs = ["diff_test.cc"], deps = [ ":diff", - "@com_google_absl//absl/strings", + "//external_libs:editscript", + "@com_google_absl//absl/strings:string_view", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", ], @@ -80,6 +80,7 @@ cc_library( hdrs = ["display_utils.h"], deps = [ "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) @@ -104,6 +105,7 @@ cc_library( "//common/util:logging", "@com_google_absl//absl/status", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) @@ -124,16 +126,17 @@ cc_test( cc_library( name = "mem-block", hdrs = ["mem_block.h"], - deps = [ - "@com_google_absl//absl/strings", - ], + deps = ["@com_google_absl//absl/strings:string_view"], ) cc_library( name = "naming-utils", srcs = ["naming_utils.cc"], hdrs = ["naming_utils.h"], - deps = ["@com_google_absl//absl/strings"], + deps = [ + "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", + ], ) cc_test( @@ -162,10 +165,10 @@ cc_library( "//common/util:logging", "//common/util:status-macros", "//common/util:user-interaction", - "@com_google_absl//absl/base:core_headers", "@com_google_absl//absl/status", "@com_google_absl//absl/status:statusor", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) @@ -177,6 +180,7 @@ cc_test( "@com_google_absl//absl/status", "@com_google_absl//absl/status:statusor", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", ], @@ -188,7 +192,7 @@ cc_library( hdrs = ["position.h"], deps = [ "//common/util:interval-set", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) @@ -210,8 +214,7 @@ cc_library( deps = [ "//common/util:interval-set", "//common/util:logging", - "//common/util:range", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) @@ -232,7 +235,7 @@ cc_library( deps = [ "//common/util:logging", "//common/util:range", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) @@ -254,6 +257,7 @@ cc_library( hdrs = ["split.h"], deps = [ "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) @@ -276,7 +280,7 @@ cc_library( hdrs = ["rebase.h"], deps = [ "//common/util:logging", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) @@ -286,8 +290,7 @@ cc_test( deps = [ ":rebase", "//common/util:range", - "@com_google_absl//absl/base:core_headers", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", ], @@ -296,9 +299,7 @@ cc_test( cc_library( name = "utf8", hdrs = ["utf8.h"], - deps = [ - "@com_google_absl//absl/strings", - ], + deps = ["@com_google_absl//absl/strings:string_view"], ) cc_library( @@ -314,7 +315,7 @@ cc_library( ], deps = [ ":utf8", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) @@ -334,6 +335,7 @@ cc_test( deps = [ ":line-column-map", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", ], @@ -347,7 +349,7 @@ cc_library( "//common/util:interval-map", "//common/util:interval-set", "//common/util:logging", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) @@ -359,7 +361,6 @@ cc_test( ":string-memory-map", "//common/util:logging", "//common/util:range", - "@com_google_absl//absl/memory", "@com_google_absl//absl/strings:string_view", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", diff --git a/common/strings/diff_test.cc b/common/strings/diff_test.cc index 7e657ca4a..90718cb56 100644 --- a/common/strings/diff_test.cc +++ b/common/strings/diff_test.cc @@ -22,6 +22,7 @@ #include #include "absl/strings/string_view.h" +#include "external_libs/editscript.h" #include "gmock/gmock.h" #include "gtest/gtest.h" diff --git a/common/strings/string_memory_map.h b/common/strings/string_memory_map.h index abefff4b8..75f270750 100644 --- a/common/strings/string_memory_map.h +++ b/common/strings/string_memory_map.h @@ -15,7 +15,6 @@ #ifndef VERIBLE_COMMON_STRINGS_STRING_MEMORY_MAP_H_ #define VERIBLE_COMMON_STRINGS_STRING_MEMORY_MAP_H_ -#include #include #include "absl/strings/string_view.h" diff --git a/common/text/BUILD b/common/text/BUILD index 687a0111f..2d6ea2b66 100644 --- a/common/text/BUILD +++ b/common/text/BUILD @@ -26,7 +26,7 @@ cc_library( "//common/util:iterator-range", "//common/util:logging", "//common/util:range", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) @@ -48,7 +48,7 @@ cc_library( deps = [ ":token-info", "//common/util:logging", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) @@ -99,7 +99,7 @@ cc_test( deps = [ ":concrete-syntax-leaf", ":token-info", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", ], @@ -129,6 +129,7 @@ cc_library( "//common/util:logging", "@com_google_absl//absl/status", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) @@ -139,6 +140,7 @@ cc_test( ":config-utils", "@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", ], @@ -170,7 +172,7 @@ cc_library( deps = [ ":symbol", ":token-info", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) @@ -227,6 +229,7 @@ cc_library( "//common/util:type-traits", "//common/util:value-saver", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) @@ -241,7 +244,7 @@ cc_library( ":symbol", ":tree-utils", "//common/util:logging", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) @@ -275,6 +278,7 @@ cc_library( "//common/util:status-macros", "@com_google_absl//absl/status", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) @@ -290,8 +294,8 @@ cc_library( ":token-stream-view", ":tree-builder-test-util", "//common/util:logging", - "@com_google_absl//absl/memory", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) @@ -304,6 +308,7 @@ cc_library( "//common/util:container-util", "@com_google_absl//absl/status", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) @@ -379,8 +384,7 @@ cc_test( ":constants", ":token-info", "//common/util:range", - "@com_google_absl//absl/base:core_headers", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", ], @@ -393,9 +397,10 @@ cc_test( ":constants", ":token-info", ":token-info-json", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", + "@jsonhpp", ], ) @@ -405,8 +410,7 @@ cc_test( deps = [ ":token-info", ":token-info-test-util", - "//common/util:logging", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", ], @@ -457,9 +461,8 @@ cc_test( "//common/util:logging", "//common/util:range", "//common/util:value-saver", - "@com_google_absl//absl/memory", "@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", ], @@ -487,7 +490,7 @@ cc_test( ":token-info", ":token-stream-view", ":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", ], diff --git a/common/text/config_utils.cc b/common/text/config_utils.cc index e02b3a4e8..0e60500b7 100644 --- a/common/text/config_utils.cc +++ b/common/text/config_utils.cc @@ -28,7 +28,6 @@ #include "absl/strings/str_join.h" #include "absl/strings/str_split.h" #include "absl/strings/string_view.h" -#include "absl/strings/strip.h" #include "common/util/logging.h" namespace verible { diff --git a/common/text/symbol.h b/common/text/symbol.h index 7fb711c79..546da90c7 100644 --- a/common/text/symbol.h +++ b/common/text/symbol.h @@ -20,7 +20,6 @@ #include #include -#include #include "common/text/symbol_ptr.h" // IWYU pragma: export #include "common/text/token_info.h" diff --git a/common/text/syntax_tree_context.h b/common/text/syntax_tree_context.h index 45b75dcbe..5e97265fb 100644 --- a/common/text/syntax_tree_context.h +++ b/common/text/syntax_tree_context.h @@ -20,7 +20,6 @@ #include #include #include -#include #include "common/text/concrete_syntax_tree.h" #include "common/util/auto_pop_stack.h" diff --git a/common/text/text_structure.h b/common/text/text_structure.h index 816ef2424..7c6f0c1a0 100644 --- a/common/text/text_structure.h +++ b/common/text/text_structure.h @@ -29,7 +29,6 @@ #include #include #include -#include #include #include "absl/status/status.h" @@ -38,6 +37,7 @@ #include "common/strings/mem_block.h" #include "common/text/concrete_syntax_tree.h" #include "common/text/symbol.h" +#include "common/text/token_info.h" #include "common/text/token_stream_view.h" #include "common/text/tree_utils.h" diff --git a/common/text/text_structure_test.cc b/common/text/text_structure_test.cc index 2e3819a97..a34894d39 100644 --- a/common/text/text_structure_test.cc +++ b/common/text/text_structure_test.cc @@ -22,7 +22,6 @@ #include #include -#include "absl/memory/memory.h" #include "absl/status/status.h" #include "absl/strings/string_view.h" #include "common/strings/line_column_map.h" diff --git a/common/text/text_structure_test_utils.cc b/common/text/text_structure_test_utils.cc index a1c82c6cc..05854d453 100644 --- a/common/text/text_structure_test_utils.cc +++ b/common/text/text_structure_test_utils.cc @@ -21,7 +21,6 @@ #include #include -#include "absl/memory/memory.h" #include "absl/strings/str_join.h" #include "absl/strings/string_view.h" #include "common/text/concrete_syntax_tree.h" diff --git a/common/text/token_info_json.cc b/common/text/token_info_json.cc index 4a9a09589..ff9c202f1 100644 --- a/common/text/token_info_json.cc +++ b/common/text/token_info_json.cc @@ -18,6 +18,7 @@ #include #include "common/text/token_info.h" +#include "nlohmann/json.hpp" namespace verible { diff --git a/common/text/token_info_json_test.cc b/common/text/token_info_json_test.cc index fae8a96d0..7f6986796 100644 --- a/common/text/token_info_json_test.cc +++ b/common/text/token_info_json_test.cc @@ -20,6 +20,7 @@ #include "common/text/constants.h" #include "common/text/token_info.h" #include "gtest/gtest.h" +#include "nlohmann/json.hpp" namespace verible { namespace { diff --git a/common/text/token_info_test.cc b/common/text/token_info_test.cc index bcf63573f..bcb4f42c9 100644 --- a/common/text/token_info_test.cc +++ b/common/text/token_info_test.cc @@ -22,7 +22,6 @@ #include #include -#include "absl/base/macros.h" #include "absl/strings/string_view.h" #include "common/text/constants.h" #include "common/util/range.h" diff --git a/common/text/token_stream_view.h b/common/text/token_stream_view.h index d536950d7..53e604175 100644 --- a/common/text/token_stream_view.h +++ b/common/text/token_stream_view.h @@ -17,7 +17,6 @@ #ifndef VERIBLE_COMMON_TEXT_TOKEN_STREAM_VIEW_H_ #define VERIBLE_COMMON_TEXT_TOKEN_STREAM_VIEW_H_ -#include #include #include diff --git a/common/tools/BUILD b/common/tools/BUILD index 782ad4bfd..c175aed5a 100644 --- a/common/tools/BUILD +++ b/common/tools/BUILD @@ -30,6 +30,7 @@ cc_binary( "@com_google_absl//absl/flags:usage", "@com_google_absl//absl/status", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) @@ -97,5 +98,6 @@ cc_test( "@com_google_absl//absl/strings", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", + "@jsonhpp", ], ) diff --git a/common/tools/jcxxgen_test.cc b/common/tools/jcxxgen_test.cc index 7f04fed1c..768b2353c 100644 --- a/common/tools/jcxxgen_test.cc +++ b/common/tools/jcxxgen_test.cc @@ -17,6 +17,7 @@ #include "absl/strings/match.h" #include "common/tools/jcxxgen_testfile.h" #include "gtest/gtest.h" +#include "nlohmann/json.hpp" namespace verible { diff --git a/common/util/BUILD b/common/util/BUILD index a10bd529c..405315985 100644 --- a/common/util/BUILD +++ b/common/util/BUILD @@ -18,7 +18,6 @@ cc_library( name = "auto-pop-stack", hdrs = ["auto_pop_stack.h"], deps = [ - ":iterator-adaptors", ":logging", "@com_google_absl//absl/base:core_headers", ], @@ -50,6 +49,7 @@ cc_library( "//common/strings:compare", "@com_google_absl//absl/status", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) @@ -74,6 +74,7 @@ cc_library( "@com_google_absl//absl/status", "@com_google_absl//absl/status:statusor", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) @@ -103,18 +104,18 @@ cc_library( hdrs = ["init_command_line.h"], deps = [ # these deps are needed by init_command_line.cc: - ":build-version", # buildcleaner: keep - "@com_google_absl//absl/debugging:failure_signal_handler", # buildcleaner: keep - "@com_google_absl//absl/debugging:symbolize", # buildcleaner: keep - "@com_google_absl//absl/flags:config", # buildcleaner: keep - "@com_google_absl//absl/flags:flag", # buildcleaner: keep - "@com_google_absl//absl/flags:parse", # buildcleaner: keep - "@com_google_absl//absl/flags:usage", # buildcleaner: keep + ":build-version", + "@com_google_absl//absl/debugging:failure_signal_handler", + "@com_google_absl//absl/debugging:symbolize", + "@com_google_absl//absl/flags:config", + "@com_google_absl//absl/flags:parse", + "@com_google_absl//absl/flags:usage", "@com_google_absl//absl/log:globals", "@com_google_absl//absl/base:log_severity", - "@com_google_absl//absl/log:initialize", # buildcleaner: keep + "@com_google_absl//absl/log:initialize", "@com_google_absl//absl/strings", - "@com_google_absl//absl/time", # buildcleaner: keep + "@com_google_absl//absl/strings:string_view", + "@com_google_absl//absl/time", ], ) @@ -124,6 +125,7 @@ cc_library( deps = [ ":forward", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) @@ -146,6 +148,7 @@ cc_library( ":logging", "@com_google_absl//absl/random", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) @@ -232,16 +235,14 @@ cc_library( ":bijective-map", "//common/strings:compare", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) cc_library( name = "bijective-map", hdrs = ["bijective_map.h"], - deps = [ - ":forward", - ":logging", - ], + deps = [":logging"], ) cc_library( @@ -251,7 +252,6 @@ cc_library( ":container-proxy", ":iterator-range", ":logging", - ":type-traits", ], ) @@ -285,7 +285,7 @@ cc_library( deps = [ ":tree-operations", ":vector-tree", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", "@com_google_googletest//:gtest", # for library testonly ], ) @@ -297,7 +297,6 @@ cc_library( ":iterator-range", ":logging", ":tree-operations", - ":vector-tree", ], ) @@ -319,9 +318,7 @@ cc_library( name = "user-interaction", srcs = ["user_interaction.cc"], hdrs = ["user_interaction.h"], - deps = [ - "@com_google_absl//absl/strings", - ], + deps = ["@com_google_absl//absl/strings:string_view"], ) cc_library( @@ -335,7 +332,7 @@ cc_test( deps = [ ":algorithm", ":iterator-range", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", ], @@ -370,6 +367,7 @@ cc_test( "@com_google_absl//absl/status", "@com_google_absl//absl/status:statusor", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", ], @@ -391,7 +389,7 @@ cc_test( deps = [ ":interval-map", ":range", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", ], @@ -403,7 +401,6 @@ cc_test( deps = [ ":interval", ":interval-set", - ":iterator-range", ":logging", "@com_google_absl//absl/strings:string_view", "@com_google_googletest//:gtest", @@ -416,7 +413,7 @@ cc_test( srcs = ["forward_test.cc"], deps = [ ":forward", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", ], @@ -428,7 +425,7 @@ cc_test( deps = [ ":iterator-range", ":range", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", ], @@ -499,6 +496,7 @@ cc_test( ":subcommand", "@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", ], @@ -540,6 +538,7 @@ cc_test( deps = [ ":enum-flags", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", ], @@ -567,6 +566,7 @@ cc_test( ":vector-tree", ":vector-tree-test-util", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", ], @@ -606,6 +606,7 @@ cc_test( ":vector-tree", ":vector-tree-test-util", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", ], @@ -634,7 +635,7 @@ cc_test( deps = [ ":map-tree", ":spacer", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", ], @@ -645,7 +646,6 @@ cc_test( srcs = ["with_reason_test.cc"], deps = [ ":with-reason", - "@com_google_absl//absl/strings", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", ], @@ -681,6 +681,7 @@ cc_library( deps = [ "//third_party/portable_endian", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", "@zlib", ], ) @@ -691,7 +692,7 @@ cc_test( deps = [ ":file-util", ":simple-zip", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", ], @@ -703,6 +704,7 @@ cc_library( hdrs = ["sha256.h"], deps = [ "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) @@ -712,6 +714,7 @@ cc_test( deps = [ ":sha256", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", ], diff --git a/common/util/logging.h b/common/util/logging.h index 50b18b0cb..a49f1dada 100644 --- a/common/util/logging.h +++ b/common/util/logging.h @@ -27,7 +27,6 @@ #include "absl/log/die_if_null.h" // IWYU pragma: export #include "absl/log/log.h" // IWYU pragma: export -#include "absl/log/vlog_is_on.h" // IWYU pragma: export #define CHECK_NOTNULL(p) (void)ABSL_DIE_IF_NULL(p) diff --git a/external_libs/BUILD b/external_libs/BUILD index 99bf8cc40..f57902db9 100644 --- a/external_libs/BUILD +++ b/external_libs/BUILD @@ -22,6 +22,7 @@ cc_test( deps = [ ":editscript", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", ], diff --git a/verilog/CST/BUILD b/verilog/CST/BUILD index e027f71ae..db758f74c 100644 --- a/verilog/CST/BUILD +++ b/verilog/CST/BUILD @@ -79,7 +79,6 @@ cc_test( deps = [ ":verilog-matchers", ":verilog-treebuilder-utils", - "//common/analysis/matcher", "//common/analysis/matcher:core-matchers", "//common/analysis/matcher:matcher-builders", "//common/analysis/matcher:matcher-test-utils", @@ -101,6 +100,7 @@ cc_library( "//common/text:token-info", "//common/util:logging", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) @@ -126,7 +126,7 @@ cc_library( "//common/analysis:syntax-tree-search-test-utils", "//common/text:text-structure", "//verilog/analysis:verilog-analyzer", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", "@com_google_googletest//:gtest", # for library testonly ], ) @@ -147,10 +147,8 @@ cc_library( "//common/text:symbol", "//common/text:token-info", "//common/text:tree-utils", - "//common/util:casts", - "//common/util:logging", "//verilog/parser:verilog-token-enum", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) @@ -160,18 +158,11 @@ cc_test( deps = [ ":constraints", ":match-test-utils", - ":verilog-nonterminals", "//common/analysis:syntax-tree-search-test-utils", - "//common/text:concrete-syntax-leaf", - "//common/text:concrete-syntax-tree", - "//common/text:symbol", "//common/text:text-structure", "//common/text:token-info", - "//common/util:casts", - "//common/util:logging", "//verilog/analysis:verilog-analyzer", - "//verilog/parser:verilog-token-enum", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", ], @@ -206,11 +197,7 @@ cc_test( "//common/analysis:syntax-tree-search", "//common/analysis:syntax-tree-search-test-utils", "//common/text:text-structure", - "//common/text:token-info-test-util", - "//common/text:tree-utils", "//common/util:logging", - "//common/util:range", - "//verilog/analysis:verilog-analyzer", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", ], @@ -262,8 +249,6 @@ cc_library( ":verilog-matchers", # fixdeps: keep ":verilog-nonterminals", "//common/analysis:syntax-tree-search", - "//common/analysis/matcher", - "//common/analysis/matcher:matcher-builders", "//common/text:concrete-syntax-tree", "//common/text:symbol", "//common/text:tree-utils", @@ -277,8 +262,6 @@ cc_test( ":dimensions", ":verilog-matchers", "//common/analysis:syntax-tree-search", - "//common/analysis/matcher", - "//common/analysis/matcher:matcher-builders", "//common/text:concrete-syntax-leaf", "//common/text:concrete-syntax-tree", "//common/text:symbol", @@ -308,10 +291,10 @@ cc_library( "//common/text:token-info", "//common/text:tree-utils", "//common/util:casts", - "//common/util:logging", "//verilog/parser:verilog-token-classifications", "//verilog/parser:verilog-token-enum", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) @@ -322,10 +305,10 @@ cc_test( ":expression", ":match-test-utils", ":verilog-nonterminals", - ":verilog-tree-print", "//common/analysis:syntax-tree-search", "//common/analysis:syntax-tree-search-test-utils", "//common/text:symbol", + "//common/text:token-info", "//common/text:tree-utils", "//common/util:logging", "//verilog/analysis:verilog-analyzer", @@ -345,8 +328,6 @@ cc_library( ":verilog-nonterminals", ":verilog-treebuilder-utils", "//common/analysis:syntax-tree-search", - "//common/analysis/matcher", - "//common/analysis/matcher:matcher-builders", "//common/text:concrete-syntax-tree", "//common/text:symbol", "//common/text:tree-utils", @@ -360,22 +341,17 @@ cc_test( ":functions", ":identifier", ":match-test-utils", + ":verilog-nonterminals", "//common/analysis:syntax-tree-search", "//common/analysis:syntax-tree-search-test-utils", - "//common/analysis/matcher:matcher-builders", "//common/text:concrete-syntax-leaf", - "//common/text:concrete-syntax-tree", - "//common/text:symbol", "//common/text:text-structure", - "//common/text:token-info", "//common/text:token-info-test-util", "//common/text:tree-utils", - "//common/util:casts", "//common/util:logging", - "//common/util:range", "//verilog/analysis:verilog-analyzer", "//verilog/parser:verilog-token-enum", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", ], @@ -389,8 +365,6 @@ cc_library( ":verilog-matchers", # fixdeps: keep ":verilog-nonterminals", "//common/analysis:syntax-tree-search", - "//common/analysis/matcher", - "//common/analysis/matcher:matcher-builders", "//common/text:concrete-syntax-leaf", "//common/text:concrete-syntax-tree", "//common/text:symbol", @@ -412,10 +386,9 @@ cc_test( "//common/analysis:syntax-tree-search-test-utils", "//common/text:concrete-syntax-leaf", "//common/text:text-structure", - "//common/text:token-info", "//common/util:logging", "//verilog/analysis:verilog-analyzer", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", ], @@ -443,7 +416,6 @@ cc_test( deps = [ ":macro", ":match-test-utils", - ":verilog-nonterminals", "//common/analysis:syntax-tree-search", "//common/analysis:syntax-tree-search-test-utils", "//common/text:text-structure", @@ -466,12 +438,9 @@ cc_library( ":verilog-matchers", # fixdeps: keep ":verilog-nonterminals", "//common/analysis:syntax-tree-search", - "//common/analysis/matcher", - "//common/analysis/matcher:matcher-builders", "//common/text:concrete-syntax-leaf", "//common/text:concrete-syntax-tree", "//common/text:symbol", - "//common/text:token-info", "//common/text:tree-utils", ], ) @@ -483,14 +452,8 @@ cc_test( ":class", ":match-test-utils", "//common/analysis:syntax-tree-search-test-utils", - "//common/text:concrete-syntax-tree", - "//common/text:symbol", "//common/text:text-structure", - "//common/text:token-info", - "//common/text:token-info-test-util", - "//common/util:casts", "//common/util:logging", - "//common/util:range", "//verilog/analysis:verilog-analyzer", "@com_google_absl//absl/strings:string_view", "@com_google_googletest//:gtest", @@ -506,8 +469,6 @@ cc_library( ":verilog-matchers", # fixdeps: keep ":verilog-nonterminals", "//common/analysis:syntax-tree-search", - "//common/analysis/matcher", - "//common/analysis/matcher:matcher-builders", "//common/text:concrete-syntax-leaf", "//common/text:concrete-syntax-tree", "//common/text:symbol", @@ -526,14 +487,8 @@ cc_test( ":module", "//common/analysis:syntax-tree-search", "//common/analysis:syntax-tree-search-test-utils", - "//common/text:concrete-syntax-tree", - "//common/text:symbol", "//common/text:text-structure", - "//common/text:token-info", - "//common/text:token-info-test-util", - "//common/util:casts", "//common/util:logging", - "//common/util:range", "//verilog/analysis:verilog-analyzer", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", @@ -550,10 +505,10 @@ cc_library( ":verilog-nonterminals", "//common/analysis:syntax-tree-search", "//common/analysis/matcher", - "//common/analysis/matcher:matcher-builders", "//common/text:concrete-syntax-leaf", "//common/text:concrete-syntax-tree", "//common/text:symbol", + "//common/text:token-info", "//common/text:tree-utils", ], ) @@ -588,10 +543,10 @@ cc_library( ":verilog-nonterminals", "//common/analysis:syntax-tree-search", "//common/analysis/matcher", - "//common/analysis/matcher:matcher-builders", "//common/text:concrete-syntax-leaf", "//common/text:concrete-syntax-tree", "//common/text:symbol", + "//common/text:token-info", "//common/text:tree-utils", ], ) @@ -601,13 +556,9 @@ cc_test( srcs = ["data_test.cc"], deps = [ ":data", - ":verilog-nonterminals", - "//common/analysis:syntax-tree-search", - "//common/text:syntax-tree-context", "//common/text:text-structure", "//common/util:logging", "//verilog/analysis:verilog-analyzer", - "@com_google_absl//absl/strings", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", ], @@ -621,8 +572,6 @@ cc_library( ":verilog-matchers", ":verilog-nonterminals", "//common/analysis:syntax-tree-search", - "//common/analysis/matcher", - "//common/analysis/matcher:matcher-builders", "//common/text:concrete-syntax-leaf", "//common/text:concrete-syntax-tree", "//common/text:symbol", @@ -640,7 +589,6 @@ cc_test( "//common/analysis:syntax-tree-search", "//common/analysis:syntax-tree-search-test-utils", "//common/text:concrete-syntax-tree", - "//common/text:symbol", "//common/text:text-structure", "//common/text:token-info", "//common/util:casts", @@ -661,8 +609,6 @@ cc_library( ":verilog-matchers", # fixdeps: keep ":verilog-nonterminals", "//common/analysis:syntax-tree-search", - "//common/analysis/matcher", - "//common/analysis/matcher:matcher-builders", "//common/text:concrete-syntax-leaf", "//common/text:concrete-syntax-tree", "//common/text:symbol", @@ -671,7 +617,7 @@ cc_library( "//common/util:casts", "//common/util:logging", "//verilog/parser:verilog-token-enum", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) @@ -684,7 +630,6 @@ cc_test( ":verilog-nonterminals", "//common/analysis:syntax-tree-search", "//common/analysis:syntax-tree-search-test-utils", - "//common/text:concrete-syntax-leaf", "//common/text:concrete-syntax-tree", "//common/text:symbol", "//common/text:text-structure", @@ -693,7 +638,7 @@ cc_test( "//common/util:logging", "//verilog/analysis:verilog-analyzer", "//verilog/parser:verilog-token-enum", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", ], @@ -708,8 +653,6 @@ cc_library( ":verilog-matchers", # fixdeps: keep ":verilog-nonterminals", "//common/analysis:syntax-tree-search", - "//common/analysis/matcher", - "//common/analysis/matcher:matcher-builders", "//common/text:concrete-syntax-leaf", "//common/text:concrete-syntax-tree", "//common/text:symbol", @@ -735,6 +678,7 @@ cc_test( "//common/util:logging", "//verilog/analysis:verilog-analyzer", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", ], @@ -745,12 +689,12 @@ cc_library( srcs = ["seq_block.cc"], hdrs = ["seq_block.h"], deps = [ - ":identifier", ":verilog-nonterminals", "//common/text:concrete-syntax-leaf", "//common/text:concrete-syntax-tree", "//common/text:symbol", "//common/text:syntax-tree-context", + "//common/text:token-info", "//common/text:tree-utils", "//common/util:logging", "//verilog/parser:verilog-token-enum", @@ -765,11 +709,9 @@ cc_test( ":verilog-matchers", ":verilog-nonterminals", "//common/analysis:syntax-tree-search", - "//common/text:syntax-tree-context", "//common/text:text-structure", "//common/util:logging", "//verilog/analysis:verilog-analyzer", - "@com_google_absl//absl/strings", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", ], @@ -786,8 +728,6 @@ cc_library( ":verilog-matchers", # fixdeps: keep ":verilog-nonterminals", "//common/analysis:syntax-tree-search", - "//common/analysis/matcher", - "//common/analysis/matcher:matcher-builders", "//common/text:concrete-syntax-leaf", "//common/text:concrete-syntax-tree", "//common/text:symbol", @@ -802,7 +742,6 @@ cc_test( deps = [ ":match-test-utils", ":statement", - ":verilog-matchers", ":verilog-nonterminals", "//common/analysis:syntax-tree-search", "//common/analysis:syntax-tree-search-test-utils", @@ -810,11 +749,7 @@ cc_test( "//common/text:concrete-syntax-tree", "//common/text:symbol", "//common/text:text-structure", - "//common/text:token-info", - "//common/text:token-info-test-util", - "//common/util:casts", "//common/util:logging", - "//common/util:range", "//verilog/analysis:verilog-analyzer", "@com_google_absl//absl/strings:string_view", "@com_google_googletest//:gtest", @@ -831,8 +766,6 @@ cc_library( ":verilog-matchers", # fixdeps: keep ":verilog-nonterminals", "//common/analysis:syntax-tree-search", - "//common/analysis/matcher", - "//common/analysis/matcher:matcher-builders", "//common/text:concrete-syntax-leaf", "//common/text:concrete-syntax-tree", "//common/text:symbol", @@ -852,7 +785,6 @@ cc_test( "//common/analysis:syntax-tree-search-test-utils", "//common/text:concrete-syntax-leaf", "//common/text:concrete-syntax-tree", - "//common/text:symbol", "//common/text:text-structure", "//common/text:token-info", "//common/text:tree-utils", @@ -860,7 +792,7 @@ cc_test( "//common/util:logging", "//verilog/analysis:verilog-analyzer", "//verilog/parser:verilog-token-enum", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", ], @@ -875,14 +807,11 @@ cc_library( ":verilog-matchers", # fixdeps: keep ":verilog-nonterminals", "//common/analysis:syntax-tree-search", - "//common/analysis/matcher", - "//common/analysis/matcher:matcher-builders", "//common/text:concrete-syntax-leaf", "//common/text:concrete-syntax-tree", "//common/text:symbol", "//common/text:symbol-ptr", "//common/text:tree-utils", - "//common/util:iterator-range", "//common/util:logging", "//verilog/parser:verilog-token-enum", ], @@ -925,6 +854,7 @@ cc_library( deps = [ "//common/util:logging", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) @@ -942,6 +872,7 @@ cc_library( "//common/util:value-saver", "//verilog/parser:verilog-parser", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) @@ -959,7 +890,7 @@ cc_library( "//common/util:value-saver", "//verilog/parser:verilog-token", "//verilog/parser:verilog-token-classifications", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", "@jsonhpp", ], ) @@ -985,7 +916,7 @@ cc_test( srcs = ["numbers_test.cc"], deps = [ ":numbers", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", ], @@ -998,7 +929,6 @@ cc_test( ":verilog-tree-print", "//common/text:symbol", "//verilog/analysis:verilog-analyzer", - "@com_google_absl//absl/memory", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", ], @@ -1012,8 +942,8 @@ cc_test( "//common/text:symbol", "//common/util:logging", "//verilog/analysis:verilog-analyzer", - "@com_google_absl//absl/strings", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", + "@jsonhpp", ], ) diff --git a/verilog/CST/DPI_test.cc b/verilog/CST/DPI_test.cc index e69831777..fb15888d0 100644 --- a/verilog/CST/DPI_test.cc +++ b/verilog/CST/DPI_test.cc @@ -19,13 +19,9 @@ #include "common/analysis/syntax_tree_search.h" #include "common/analysis/syntax_tree_search_test_utils.h" #include "common/text/text_structure.h" -#include "common/text/token_info_test_util.h" -#include "common/text/tree_utils.h" #include "common/util/logging.h" -#include "common/util/range.h" #include "gtest/gtest.h" #include "verilog/CST/match_test_utils.h" -#include "verilog/analysis/verilog_analyzer.h" #undef ASSERT_OK #define ASSERT_OK(value) ASSERT_TRUE((value).ok()) diff --git a/verilog/CST/class.cc b/verilog/CST/class.cc index a0ddfe5d9..8a22cee8a 100644 --- a/verilog/CST/class.cc +++ b/verilog/CST/class.cc @@ -16,13 +16,10 @@ #include -#include "common/analysis/matcher/matcher.h" -#include "common/analysis/matcher/matcher_builders.h" #include "common/analysis/syntax_tree_search.h" #include "common/text/concrete_syntax_leaf.h" #include "common/text/concrete_syntax_tree.h" #include "common/text/symbol.h" -#include "common/text/token_info.h" #include "common/text/tree_utils.h" #include "verilog/CST/identifier.h" #include "verilog/CST/verilog_matchers.h" // IWYU pragma: keep diff --git a/verilog/CST/class_test.cc b/verilog/CST/class_test.cc index 537226469..6c660c25e 100644 --- a/verilog/CST/class_test.cc +++ b/verilog/CST/class_test.cc @@ -27,14 +27,8 @@ #include "absl/strings/string_view.h" #include "common/analysis/syntax_tree_search_test_utils.h" -#include "common/text/concrete_syntax_tree.h" -#include "common/text/symbol.h" #include "common/text/text_structure.h" -#include "common/text/token_info.h" -#include "common/text/token_info_test_util.h" -#include "common/util/casts.h" #include "common/util/logging.h" -#include "common/util/range.h" #include "gtest/gtest.h" #include "verilog/CST/match_test_utils.h" #include "verilog/analysis/verilog_analyzer.h" diff --git a/verilog/CST/constraints.cc b/verilog/CST/constraints.cc index 8e4fdfab4..03693bc1f 100644 --- a/verilog/CST/constraints.cc +++ b/verilog/CST/constraints.cc @@ -22,7 +22,6 @@ #include "common/text/symbol.h" #include "common/text/token_info.h" #include "common/text/tree_utils.h" -#include "common/util/casts.h" #include "verilog/CST/identifier.h" #include "verilog/CST/verilog_matchers.h" // IWYU pragma: keep #include "verilog/CST/verilog_nonterminals.h" diff --git a/verilog/CST/constraints.h b/verilog/CST/constraints.h index 47f45a6bb..b03b7fa10 100644 --- a/verilog/CST/constraints.h +++ b/verilog/CST/constraints.h @@ -15,7 +15,6 @@ #ifndef VERIBLE_VERILOG_CST_CONSTRAINTS_H_ #define VERIBLE_VERILOG_CST_CONSTRAINTS_H_ -#include #include #include "absl/strings/string_view.h" diff --git a/verilog/CST/constraints_test.cc b/verilog/CST/constraints_test.cc index 1ee660ecf..0ec06443b 100644 --- a/verilog/CST/constraints_test.cc +++ b/verilog/CST/constraints_test.cc @@ -21,17 +21,11 @@ #include "absl/strings/string_view.h" #include "common/analysis/syntax_tree_search_test_utils.h" -#include "common/text/concrete_syntax_leaf.h" -#include "common/text/concrete_syntax_tree.h" -#include "common/text/symbol.h" #include "common/text/text_structure.h" #include "common/text/token_info.h" -#include "common/util/casts.h" #include "gtest/gtest.h" #include "verilog/CST/match_test_utils.h" -#include "verilog/CST/verilog_nonterminals.h" #include "verilog/analysis/verilog_analyzer.h" -#include "verilog/parser/verilog_token_enum.h" #undef ASSERT_OK #define ASSERT_OK(value) ASSERT_TRUE((value).ok()) diff --git a/verilog/CST/data.cc b/verilog/CST/data.cc index 7812e891e..6f4e20770 100644 --- a/verilog/CST/data.cc +++ b/verilog/CST/data.cc @@ -17,11 +17,11 @@ #include #include "common/analysis/matcher/matcher.h" -#include "common/analysis/matcher/matcher_builders.h" #include "common/analysis/syntax_tree_search.h" #include "common/text/concrete_syntax_leaf.h" #include "common/text/concrete_syntax_tree.h" #include "common/text/symbol.h" +#include "common/text/token_info.h" #include "common/text/tree_utils.h" #include "verilog/CST/identifier.h" #include "verilog/CST/verilog_matchers.h" // IWYU pragma: keep diff --git a/verilog/CST/data.h b/verilog/CST/data.h index 287adcc67..0c2841e4c 100644 --- a/verilog/CST/data.h +++ b/verilog/CST/data.h @@ -20,9 +20,9 @@ #include -#include "common/text/concrete_syntax_leaf.h" #include "common/text/concrete_syntax_tree.h" #include "common/text/symbol.h" +#include "common/text/token_info.h" namespace verilog { diff --git a/verilog/CST/data_test.cc b/verilog/CST/data_test.cc index 8aefd2232..f9c6ba6ee 100644 --- a/verilog/CST/data_test.cc +++ b/verilog/CST/data_test.cc @@ -23,12 +23,9 @@ #include -#include "common/analysis/syntax_tree_search.h" -#include "common/text/syntax_tree_context.h" #include "common/text/text_structure.h" #include "common/util/logging.h" #include "gtest/gtest.h" -#include "verilog/CST/verilog_nonterminals.h" #include "verilog/analysis/verilog_analyzer.h" #undef ASSERT_OK diff --git a/verilog/CST/declaration.h b/verilog/CST/declaration.h index 3b7860b3a..f6dda43dc 100644 --- a/verilog/CST/declaration.h +++ b/verilog/CST/declaration.h @@ -26,6 +26,7 @@ #include "common/text/concrete_syntax_tree.h" #include "common/text/symbol.h" #include "common/text/symbol_ptr.h" // IWYU pragma: export +#include "common/text/token_info.h" #include "common/text/tree_utils.h" #include "verilog/CST/verilog_nonterminals.h" diff --git a/verilog/CST/dimensions.cc b/verilog/CST/dimensions.cc index 6c5baf603..1b3f75672 100644 --- a/verilog/CST/dimensions.cc +++ b/verilog/CST/dimensions.cc @@ -16,8 +16,6 @@ #include -#include "common/analysis/matcher/matcher.h" -#include "common/analysis/matcher/matcher_builders.h" #include "common/analysis/syntax_tree_search.h" #include "common/text/concrete_syntax_tree.h" #include "common/text/symbol.h" diff --git a/verilog/CST/dimensions_test.cc b/verilog/CST/dimensions_test.cc index ca1f747cb..f8164030e 100644 --- a/verilog/CST/dimensions_test.cc +++ b/verilog/CST/dimensions_test.cc @@ -19,8 +19,6 @@ #include #include -#include "common/analysis/matcher/matcher.h" -#include "common/analysis/matcher/matcher_builders.h" #include "common/analysis/syntax_tree_search.h" #include "common/text/concrete_syntax_leaf.h" #include "common/text/concrete_syntax_tree.h" diff --git a/verilog/CST/expression.h b/verilog/CST/expression.h index c1e248cc1..bf6e61aa1 100644 --- a/verilog/CST/expression.h +++ b/verilog/CST/expression.h @@ -25,6 +25,7 @@ #include "common/analysis/syntax_tree_search.h" #include "common/text/concrete_syntax_tree.h" #include "common/text/symbol.h" +#include "common/text/token_info.h" #include "common/text/tree_utils.h" #include "verilog/CST/verilog_nonterminals.h" #include "verilog/parser/verilog_token_classifications.h" diff --git a/verilog/CST/expression_test.cc b/verilog/CST/expression_test.cc index 6221c85a3..3a57893af 100644 --- a/verilog/CST/expression_test.cc +++ b/verilog/CST/expression_test.cc @@ -21,12 +21,12 @@ #include "common/analysis/syntax_tree_search.h" #include "common/analysis/syntax_tree_search_test_utils.h" #include "common/text/symbol.h" +#include "common/text/token_info.h" #include "common/text/tree_utils.h" #include "common/util/logging.h" #include "gtest/gtest.h" #include "verilog/CST/match_test_utils.h" #include "verilog/CST/verilog_nonterminals.h" -#include "verilog/CST/verilog_tree_print.h" #include "verilog/analysis/verilog_analyzer.h" #include "verilog/analysis/verilog_excerpt_parse.h" diff --git a/verilog/CST/functions.cc b/verilog/CST/functions.cc index 60570ba93..4a0c59cf1 100644 --- a/verilog/CST/functions.cc +++ b/verilog/CST/functions.cc @@ -16,8 +16,6 @@ #include -#include "common/analysis/matcher/matcher.h" -#include "common/analysis/matcher/matcher_builders.h" #include "common/analysis/syntax_tree_search.h" #include "common/text/concrete_syntax_tree.h" #include "common/text/symbol.h" diff --git a/verilog/CST/functions_test.cc b/verilog/CST/functions_test.cc index 8202cbe4c..5960b21e8 100644 --- a/verilog/CST/functions_test.cc +++ b/verilog/CST/functions_test.cc @@ -18,22 +18,17 @@ #include #include "absl/strings/string_view.h" -#include "common/analysis/matcher/matcher_builders.h" #include "common/analysis/syntax_tree_search.h" #include "common/analysis/syntax_tree_search_test_utils.h" #include "common/text/concrete_syntax_leaf.h" -#include "common/text/concrete_syntax_tree.h" -#include "common/text/symbol.h" #include "common/text/text_structure.h" -#include "common/text/token_info.h" #include "common/text/token_info_test_util.h" #include "common/text/tree_utils.h" -#include "common/util/casts.h" #include "common/util/logging.h" -#include "common/util/range.h" #include "gtest/gtest.h" #include "verilog/CST/identifier.h" #include "verilog/CST/match_test_utils.h" +#include "verilog/CST/verilog_nonterminals.h" #include "verilog/analysis/verilog_analyzer.h" #include "verilog/parser/verilog_token_enum.h" diff --git a/verilog/CST/identifier.cc b/verilog/CST/identifier.cc index e6a174f8b..3fe5782b2 100644 --- a/verilog/CST/identifier.cc +++ b/verilog/CST/identifier.cc @@ -16,8 +16,6 @@ #include -#include "common/analysis/matcher/matcher.h" -#include "common/analysis/matcher/matcher_builders.h" #include "common/analysis/syntax_tree_search.h" #include "common/text/concrete_syntax_leaf.h" #include "common/text/concrete_syntax_tree.h" diff --git a/verilog/CST/identifier_test.cc b/verilog/CST/identifier_test.cc index fef4a477e..854d4bf90 100644 --- a/verilog/CST/identifier_test.cc +++ b/verilog/CST/identifier_test.cc @@ -23,7 +23,6 @@ #include "common/analysis/syntax_tree_search_test_utils.h" #include "common/text/concrete_syntax_leaf.h" #include "common/text/text_structure.h" -#include "common/text/token_info.h" #include "common/util/logging.h" #include "gtest/gtest.h" #include "verilog/CST/match_test_utils.h" diff --git a/verilog/CST/macro.cc b/verilog/CST/macro.cc index 43dec3f1a..8decc5236 100644 --- a/verilog/CST/macro.cc +++ b/verilog/CST/macro.cc @@ -19,6 +19,7 @@ #include +#include "common/text/token_info.h" #include "common/text/tree_utils.h" #include "common/util/logging.h" #include "verilog/CST/verilog_matchers.h" diff --git a/verilog/CST/macro_test.cc b/verilog/CST/macro_test.cc index 8f8364272..f6b712aa4 100644 --- a/verilog/CST/macro_test.cc +++ b/verilog/CST/macro_test.cc @@ -26,7 +26,6 @@ #include "gmock/gmock.h" #include "gtest/gtest.h" #include "verilog/CST/match_test_utils.h" -#include "verilog/CST/verilog_nonterminals.h" #include "verilog/analysis/verilog_analyzer.h" #undef EXPECT_OK diff --git a/verilog/CST/module.cc b/verilog/CST/module.cc index 11fe5e20d..ecf0c02a5 100644 --- a/verilog/CST/module.cc +++ b/verilog/CST/module.cc @@ -16,8 +16,6 @@ #include -#include "common/analysis/matcher/matcher.h" -#include "common/analysis/matcher/matcher_builders.h" #include "common/analysis/syntax_tree_search.h" #include "common/text/concrete_syntax_leaf.h" #include "common/text/concrete_syntax_tree.h" diff --git a/verilog/CST/module_test.cc b/verilog/CST/module_test.cc index a1b3c567d..31071cfba 100644 --- a/verilog/CST/module_test.cc +++ b/verilog/CST/module_test.cc @@ -27,14 +27,8 @@ #include "common/analysis/syntax_tree_search.h" #include "common/analysis/syntax_tree_search_test_utils.h" -#include "common/text/concrete_syntax_tree.h" -#include "common/text/symbol.h" #include "common/text/text_structure.h" -#include "common/text/token_info.h" -#include "common/text/token_info_test_util.h" -#include "common/util/casts.h" #include "common/util/logging.h" -#include "common/util/range.h" #include "gtest/gtest.h" #include "verilog/CST/match_test_utils.h" #include "verilog/analysis/verilog_analyzer.h" diff --git a/verilog/CST/net.cc b/verilog/CST/net.cc index 6137701d0..5f4403ac9 100644 --- a/verilog/CST/net.cc +++ b/verilog/CST/net.cc @@ -17,11 +17,11 @@ #include #include "common/analysis/matcher/matcher.h" -#include "common/analysis/matcher/matcher_builders.h" #include "common/analysis/syntax_tree_search.h" #include "common/text/concrete_syntax_leaf.h" #include "common/text/concrete_syntax_tree.h" #include "common/text/symbol.h" +#include "common/text/token_info.h" #include "common/text/tree_utils.h" #include "verilog/CST/identifier.h" #include "verilog/CST/verilog_matchers.h" // IWYU pragma: keep diff --git a/verilog/CST/net.h b/verilog/CST/net.h index 151789d51..d3cfad62c 100644 --- a/verilog/CST/net.h +++ b/verilog/CST/net.h @@ -24,6 +24,7 @@ #include "common/text/concrete_syntax_leaf.h" #include "common/text/concrete_syntax_tree.h" #include "common/text/symbol.h" +#include "common/text/token_info.h" namespace verilog { diff --git a/verilog/CST/package.cc b/verilog/CST/package.cc index 9ebfa9b12..c43d69ceb 100644 --- a/verilog/CST/package.cc +++ b/verilog/CST/package.cc @@ -16,8 +16,6 @@ #include -#include "common/analysis/matcher/matcher.h" -#include "common/analysis/matcher/matcher_builders.h" #include "common/analysis/syntax_tree_search.h" #include "common/text/concrete_syntax_leaf.h" #include "common/text/concrete_syntax_tree.h" diff --git a/verilog/CST/package_test.cc b/verilog/CST/package_test.cc index a9dc15ea3..56de13117 100644 --- a/verilog/CST/package_test.cc +++ b/verilog/CST/package_test.cc @@ -29,7 +29,6 @@ #include "common/analysis/syntax_tree_search.h" #include "common/analysis/syntax_tree_search_test_utils.h" #include "common/text/concrete_syntax_tree.h" -#include "common/text/symbol.h" #include "common/text/text_structure.h" #include "common/text/token_info.h" #include "common/util/casts.h" diff --git a/verilog/CST/parameters.cc b/verilog/CST/parameters.cc index f9e4ebe90..34f54135d 100644 --- a/verilog/CST/parameters.cc +++ b/verilog/CST/parameters.cc @@ -17,8 +17,6 @@ #include #include -#include "common/analysis/matcher/matcher.h" -#include "common/analysis/matcher/matcher_builders.h" #include "common/analysis/syntax_tree_search.h" #include "common/text/concrete_syntax_leaf.h" #include "common/text/concrete_syntax_tree.h" diff --git a/verilog/CST/parameters_test.cc b/verilog/CST/parameters_test.cc index 6abc7fcdf..25b49f16e 100644 --- a/verilog/CST/parameters_test.cc +++ b/verilog/CST/parameters_test.cc @@ -21,7 +21,6 @@ #include "absl/strings/string_view.h" #include "common/analysis/syntax_tree_search.h" #include "common/analysis/syntax_tree_search_test_utils.h" -#include "common/text/concrete_syntax_leaf.h" #include "common/text/concrete_syntax_tree.h" #include "common/text/symbol.h" #include "common/text/text_structure.h" diff --git a/verilog/CST/port.cc b/verilog/CST/port.cc index ea4b3c473..cd5e3eff2 100644 --- a/verilog/CST/port.cc +++ b/verilog/CST/port.cc @@ -16,8 +16,6 @@ #include -#include "common/analysis/matcher/matcher.h" -#include "common/analysis/matcher/matcher_builders.h" #include "common/analysis/syntax_tree_search.h" #include "common/text/concrete_syntax_leaf.h" #include "common/text/concrete_syntax_tree.h" diff --git a/verilog/CST/seq_block.cc b/verilog/CST/seq_block.cc index 8171f4026..9b2fddb8b 100644 --- a/verilog/CST/seq_block.cc +++ b/verilog/CST/seq_block.cc @@ -18,9 +18,9 @@ #include "common/text/concrete_syntax_tree.h" #include "common/text/symbol.h" #include "common/text/syntax_tree_context.h" +#include "common/text/token_info.h" #include "common/text/tree_utils.h" #include "common/util/logging.h" -#include "verilog/CST/identifier.h" #include "verilog/CST/verilog_nonterminals.h" #include "verilog/parser/verilog_token_enum.h" diff --git a/verilog/CST/seq_block.h b/verilog/CST/seq_block.h index 72469111f..af0c9696d 100644 --- a/verilog/CST/seq_block.h +++ b/verilog/CST/seq_block.h @@ -18,10 +18,10 @@ #ifndef VERIBLE_VERILOG_CST_SEQ_BLOCK_H_ #define VERIBLE_VERILOG_CST_SEQ_BLOCK_H_ -#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/text/token_info.h" namespace verilog { diff --git a/verilog/CST/seq_block_test.cc b/verilog/CST/seq_block_test.cc index eadec5851..13e31ad04 100644 --- a/verilog/CST/seq_block_test.cc +++ b/verilog/CST/seq_block_test.cc @@ -17,7 +17,6 @@ #include #include "common/analysis/syntax_tree_search.h" -#include "common/text/syntax_tree_context.h" #include "common/text/text_structure.h" #include "common/util/logging.h" #include "gtest/gtest.h" diff --git a/verilog/CST/statement.cc b/verilog/CST/statement.cc index 4f34b96bb..71b9d9d61 100644 --- a/verilog/CST/statement.cc +++ b/verilog/CST/statement.cc @@ -16,13 +16,10 @@ #include -#include "common/analysis/matcher/matcher.h" -#include "common/analysis/matcher/matcher_builders.h" #include "common/analysis/syntax_tree_search.h" #include "common/text/concrete_syntax_leaf.h" #include "common/text/concrete_syntax_tree.h" #include "common/text/symbol.h" -#include "common/text/token_info.h" #include "common/text/tree_utils.h" #include "verilog/CST/declaration.h" #include "verilog/CST/identifier.h" diff --git a/verilog/CST/statement_test.cc b/verilog/CST/statement_test.cc index b3a1458d6..100f63887 100644 --- a/verilog/CST/statement_test.cc +++ b/verilog/CST/statement_test.cc @@ -24,14 +24,9 @@ #include "common/text/concrete_syntax_tree.h" #include "common/text/symbol.h" #include "common/text/text_structure.h" -#include "common/text/token_info.h" -#include "common/text/token_info_test_util.h" -#include "common/util/casts.h" #include "common/util/logging.h" -#include "common/util/range.h" #include "gtest/gtest.h" #include "verilog/CST/match_test_utils.h" -#include "verilog/CST/verilog_matchers.h" #include "verilog/CST/verilog_nonterminals.h" #include "verilog/analysis/verilog_analyzer.h" diff --git a/verilog/CST/tasks.cc b/verilog/CST/tasks.cc index f68e1d1e5..9f99f89d9 100644 --- a/verilog/CST/tasks.cc +++ b/verilog/CST/tasks.cc @@ -16,8 +16,6 @@ #include -#include "common/analysis/matcher/matcher.h" -#include "common/analysis/matcher/matcher_builders.h" #include "common/analysis/syntax_tree_search.h" #include "common/text/concrete_syntax_tree.h" #include "common/text/symbol.h" diff --git a/verilog/CST/tasks_test.cc b/verilog/CST/tasks_test.cc index 6fc7ecbb1..4957bd33f 100644 --- a/verilog/CST/tasks_test.cc +++ b/verilog/CST/tasks_test.cc @@ -22,7 +22,6 @@ #include "common/analysis/syntax_tree_search_test_utils.h" #include "common/text/concrete_syntax_leaf.h" #include "common/text/concrete_syntax_tree.h" -#include "common/text/symbol.h" #include "common/text/text_structure.h" #include "common/text/token_info.h" #include "common/text/tree_utils.h" diff --git a/verilog/CST/type.cc b/verilog/CST/type.cc index fbd45debc..8aed3b9f7 100644 --- a/verilog/CST/type.cc +++ b/verilog/CST/type.cc @@ -17,8 +17,6 @@ #include #include -#include "common/analysis/matcher/matcher.h" -#include "common/analysis/matcher/matcher_builders.h" #include "common/analysis/syntax_tree_search.h" #include "common/text/concrete_syntax_leaf.h" #include "common/text/concrete_syntax_tree.h" diff --git a/verilog/CST/verilog_matchers.cc b/verilog/CST/verilog_matchers.cc index 800cc3d99..1a304dee6 100644 --- a/verilog/CST/verilog_matchers.cc +++ b/verilog/CST/verilog_matchers.cc @@ -12,7 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "verilog/CST/verilog_matchers.h" - // Nothing in here. Just a place-holder so that bazel knows that this header // is C++ and clang-tidy picks up that knowledge. +// If we don't have a *.cc file, bazel will assume this is a C file and put +// that in the compilation DB. TL;DR: hacky workaround. Don't remove. + +#include "verilog/CST/verilog_matchers.h" diff --git a/verilog/CST/verilog_matchers_test.cc b/verilog/CST/verilog_matchers_test.cc index d36f6c7f8..739896a41 100644 --- a/verilog/CST/verilog_matchers_test.cc +++ b/verilog/CST/verilog_matchers_test.cc @@ -15,7 +15,6 @@ #include "verilog/CST/verilog_matchers.h" #include "common/analysis/matcher/core_matchers.h" -#include "common/analysis/matcher/matcher.h" #include "common/analysis/matcher/matcher_builders.h" #include "common/analysis/matcher/matcher_test_utils.h" #include "gtest/gtest.h" diff --git a/verilog/CST/verilog_tree_json.cc b/verilog/CST/verilog_tree_json.cc index 1806047ff..625ef2278 100644 --- a/verilog/CST/verilog_tree_json.cc +++ b/verilog/CST/verilog_tree_json.cc @@ -24,6 +24,7 @@ #include "common/text/token_info.h" #include "common/text/token_info_json.h" #include "common/util/value_saver.h" +#include "nlohmann/json.hpp" #include "verilog/CST/verilog_nonterminals.h" // for NodeEnumToString #include "verilog/parser/verilog_token.h" #include "verilog/parser/verilog_token_classifications.h" diff --git a/verilog/CST/verilog_tree_json_test.cc b/verilog/CST/verilog_tree_json_test.cc index 47b672c04..f9accf931 100644 --- a/verilog/CST/verilog_tree_json_test.cc +++ b/verilog/CST/verilog_tree_json_test.cc @@ -19,6 +19,7 @@ #include "common/text/symbol.h" #include "common/util/logging.h" #include "gtest/gtest.h" +#include "nlohmann/json.hpp" #include "verilog/analysis/verilog_analyzer.h" namespace verilog { diff --git a/verilog/CST/verilog_tree_print_test.cc b/verilog/CST/verilog_tree_print_test.cc index c93b22d30..65fbb0803 100644 --- a/verilog/CST/verilog_tree_print_test.cc +++ b/verilog/CST/verilog_tree_print_test.cc @@ -18,7 +18,6 @@ #include // IWYU pragma: keep // for ostringstream #include -#include "absl/memory/memory.h" #include "common/text/symbol.h" #include "gtest/gtest.h" #include "verilog/analysis/verilog_analyzer.h" diff --git a/verilog/CST/verilog_treebuilder_utils.cc b/verilog/CST/verilog_treebuilder_utils.cc index 1d304b2fa..2af770245 100644 --- a/verilog/CST/verilog_treebuilder_utils.cc +++ b/verilog/CST/verilog_treebuilder_utils.cc @@ -23,7 +23,6 @@ #include "common/text/symbol.h" #include "common/text/token_info.h" #include "common/util/logging.h" -#include "verilog/CST/verilog_nonterminals.h" namespace verilog { diff --git a/verilog/analysis/BUILD b/verilog/analysis/BUILD index 31ef72ba0..1a478f8c3 100644 --- a/verilog/analysis/BUILD +++ b/verilog/analysis/BUILD @@ -34,7 +34,7 @@ cc_test( cc_library( name = "descriptions", hdrs = ["descriptions.h"], - deps = ["@com_google_absl//absl/strings"], + deps = ["@com_google_absl//absl/strings:string_view"], alwayslink = 1, ) @@ -49,7 +49,7 @@ cc_library( "//verilog/CST:module", "//verilog/preprocessor:verilog-preprocess", "@com_google_absl//absl/status", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) @@ -58,7 +58,7 @@ cc_test( srcs = ["extractors_test.cc"], deps = [ ":extractors", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", ], @@ -72,7 +72,7 @@ cc_library( ":verilog-analyzer", "//common/analysis:file-analyzer", "//common/strings:line-column-map", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", "@jsonhpp", ], ) @@ -84,10 +84,9 @@ cc_library( deps = [ "//common/text:token-stream-view", "//common/util:logging", - "//common/util:status-macros", "//verilog/parser:verilog-token-enum", "@com_google_absl//absl/status", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) @@ -97,9 +96,8 @@ cc_test( deps = [ ":flow-tree", "//verilog/parser:verilog-lexer", - "//verilog/parser:verilog-token-enum", "@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", ], @@ -119,7 +117,7 @@ cc_library( "//common/util:container-util", "//common/util:logging", "@com_google_absl//absl/container:node_hash_map", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) @@ -130,7 +128,6 @@ cc_test( ":json-diagnostics", ":verilog-analyzer", "//common/util:logging", - "@com_google_absl//absl/strings", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", "@jsonhpp", @@ -154,6 +151,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", ], @@ -193,6 +191,7 @@ cc_library( "//verilog/preprocessor:verilog-preprocess", "@com_google_absl//absl/status", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) @@ -210,7 +209,7 @@ cc_library( "//verilog/parser:verilog-parser", "//verilog/parser:verilog-token-classifications", "//verilog/parser:verilog-token-enum", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) @@ -233,15 +232,14 @@ cc_library( "@com_google_absl//absl/status", "@com_google_absl//absl/status:statusor", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) cc_library( name = "verilog-linter-constants", hdrs = ["verilog_linter_constants.h"], - deps = [ - "@com_google_absl//absl/strings", - ], + deps = ["@com_google_absl//absl/strings:string_view"], ) cc_library( @@ -254,15 +252,11 @@ cc_library( ":verilog-analyzer", ":verilog-linter-configuration", ":verilog-linter-constants", - "//common/analysis:line-lint-rule", "//common/analysis:line-linter", "//common/analysis:lint-rule-status", "//common/analysis:lint-waiver", - "//common/analysis:syntax-tree-lint-rule", "//common/analysis:syntax-tree-linter", - "//common/analysis:text-structure-lint-rule", "//common/analysis:text-structure-linter", - "//common/analysis:token-stream-lint-rule", "//common/analysis:token-stream-linter", "//common/analysis:violation-handler", "//common/strings:line-column-map", @@ -278,6 +272,7 @@ cc_library( "@com_google_absl//absl/status", "@com_google_absl//absl/status:statusor", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) @@ -290,21 +285,17 @@ cc_test( "//common/strings:display-utils", "//common/text:concrete-syntax-leaf", "//common/text:concrete-syntax-tree", - "//common/text:constants", "//common/text:symbol", "//common/text:text-structure", "//common/text:token-info", "//common/text:token-info-test-util", - "//common/text:token-stream-view", "//common/text:tree-utils", "//common/util:casts", "//common/util:logging", - "//verilog/parser:verilog-parser", "//verilog/parser:verilog-token-enum", - "@com_google_absl//absl/base", "@com_google_absl//absl/status", "@com_google_absl//absl/strings", - "@com_google_absl//absl/types:span", + "@com_google_absl//absl/strings:string_view", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", ], @@ -332,6 +323,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", ], @@ -351,6 +343,7 @@ cc_test( "@com_google_absl//absl/status", "@com_google_absl//absl/status:statusor", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", ], @@ -361,10 +354,8 @@ cc_test( srcs = ["verilog_equivalence_test.cc"], deps = [ ":verilog-equivalence", - "//common/text:token-info", - "//common/util:logging", - "@com_google_absl//absl/status", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", "@com_google_absl//absl/types:span", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", @@ -380,6 +371,7 @@ cc_library( "//common/util:iterator-range", "@com_google_absl//absl/status", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) @@ -409,6 +401,7 @@ cc_library( "@com_google_absl//absl/status", "@com_google_absl//absl/status:statusor", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", "@com_google_absl//absl/time", "@com_google_absl//absl/types:optional", ], @@ -425,6 +418,7 @@ cc_test( "//common/util:range", "//verilog/CST:module", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", ], @@ -470,7 +464,7 @@ cc_library( "//verilog/parser:verilog-token-enum", "@com_google_absl//absl/status", "@com_google_absl//absl/strings", - "@com_google_absl//absl/strings:str_format", + "@com_google_absl//absl/strings:string_view", "@com_google_absl//absl/time", ], ) @@ -489,7 +483,7 @@ cc_test( "//common/util:tree-operations", "@com_google_absl//absl/base:core_headers", "@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", ], @@ -505,7 +499,7 @@ cc_library( "//common/strings:compare", "//common/strings:display-utils", "//common/util:logging", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) @@ -514,6 +508,8 @@ cc_test( srcs = ["dependencies_test.cc"], deps = [ ":dependencies", + ":symbol-table", + ":verilog-project", "//common/util:file-util", "//common/util:logging", "@com_google_absl//absl/status", diff --git a/verilog/analysis/checkers/BUILD b/verilog/analysis/checkers/BUILD index 3cc42194c..cedd704f8 100644 --- a/verilog/analysis/checkers/BUILD +++ b/verilog/analysis/checkers/BUILD @@ -72,6 +72,7 @@ cc_library( ":v2001-generate-begin-rule", ":void-cast-rule", ], + alwayslink = 1, ) cc_library( @@ -82,18 +83,18 @@ cc_library( "//common/analysis:lint-rule-status", "//common/analysis:syntax-tree-lint-rule", "//common/analysis/matcher", - "//common/analysis/matcher:bound-symbol-manager", "//common/analysis/matcher:matcher-builders", - "//common/strings:naming-utils", "//common/text:symbol", "//common/text:syntax-tree-context", - "//verilog/CST:functions", + "//common/text:token-info", "//verilog/CST:module", "//verilog/CST:package", "//verilog/CST:verilog-matchers", + "//verilog/CST:verilog-nonterminals", "//verilog/analysis:descriptions", "//verilog/analysis:lint-rule-registry", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], alwayslink = 1, ) @@ -105,8 +106,6 @@ cc_test( ":banned-declared-name-patterns-rule", "//common/analysis:linter-test-utils", "//common/analysis:syntax-tree-linter-test-utils", - "//common/text:symbol", - "//verilog/CST:verilog-nonterminals", "//verilog/analysis:verilog-analyzer", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", @@ -124,7 +123,7 @@ cc_library( "//verilog/analysis:descriptions", "//verilog/analysis:lint-rule-registry", "//verilog/parser:verilog-token-enum", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], alwayslink = 1, ) @@ -136,7 +135,6 @@ cc_test( ":no-tabs-rule", "//common/analysis:line-linter-test-utils", "//common/analysis:linter-test-utils", - "//common/text:symbol", "//verilog/analysis:verilog-analyzer", "//verilog/parser:verilog-token-enum", "@com_google_googletest//:gtest", @@ -156,6 +154,7 @@ cc_library( "//verilog/analysis:lint-rule-registry", "//verilog/parser:verilog-token-enum", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], alwayslink = 1, ) @@ -167,7 +166,6 @@ cc_test( ":no-trailing-spaces-rule", "//common/analysis:line-linter-test-utils", "//common/analysis:linter-test-utils", - "//common/text:symbol", "//verilog/analysis:verilog-analyzer", "//verilog/parser:verilog-token-enum", "@com_google_googletest//:gtest", @@ -184,7 +182,6 @@ cc_library( "//common/analysis:syntax-tree-lint-rule", "//common/analysis/matcher", "//common/analysis/matcher:bound-symbol-manager", - "//common/strings:naming-utils", "//common/text:symbol", "//common/text:syntax-tree-context", "//common/text:token-info", @@ -192,8 +189,8 @@ cc_library( "//verilog/CST:verilog-matchers", "//verilog/analysis:descriptions", "//verilog/analysis:lint-rule-registry", - "//verilog/parser:verilog-token-enum", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], alwayslink = 1, ) @@ -205,8 +202,6 @@ cc_test( ":positive-meaning-parameter-name-rule", "//common/analysis:linter-test-utils", "//common/analysis:syntax-tree-linter-test-utils", - "//common/text:symbol", - "//verilog/CST:verilog-nonterminals", "//verilog/analysis:verilog-analyzer", "//verilog/parser:verilog-token-enum", "@com_google_googletest//:gtest", @@ -226,7 +221,7 @@ cc_library( "//verilog/analysis:descriptions", "//verilog/analysis:lint-rule-registry", "//verilog/parser:verilog-token-enum", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], alwayslink = 1, ) @@ -238,7 +233,6 @@ cc_test( ":posix-eof-rule", "//common/analysis:linter-test-utils", "//common/analysis:text-structure-linter-test-utils", - "//common/text:symbol", "//verilog/analysis:verilog-analyzer", "//verilog/parser:verilog-token-enum", "@com_google_googletest//:gtest", @@ -268,6 +262,7 @@ cc_library( "//verilog/parser:verilog-token-enum", "@com_google_absl//absl/status", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], alwayslink = 1, ) @@ -279,7 +274,6 @@ cc_test( ":line-length-rule", "//common/analysis:linter-test-utils", "//common/analysis:text-structure-linter-test-utils", - "//common/text:symbol", "//common/util:logging", "//verilog/analysis:verilog-analyzer", "//verilog/parser:verilog-token-enum", @@ -297,14 +291,14 @@ cc_library( "//common/analysis:lint-rule-status", "//common/analysis:syntax-tree-lint-rule", "//common/analysis/matcher", - "//common/analysis/matcher:bound-symbol-manager", "//common/analysis/matcher:matcher-builders", "//common/text:symbol", "//common/text:syntax-tree-context", "//verilog/CST:verilog-matchers", # fixdeps: keep + "//verilog/CST:verilog-nonterminals", "//verilog/analysis:descriptions", "//verilog/analysis:lint-rule-registry", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], alwayslink = 1, ) @@ -316,9 +310,6 @@ cc_test( ":forbid-consecutive-null-statements-rule", "//common/analysis:linter-test-utils", "//common/analysis:syntax-tree-linter-test-utils", - "//common/text:symbol", - "//verilog/CST:verilog-nonterminals", - "//verilog/CST:verilog-treebuilder-utils", "//verilog/analysis:verilog-analyzer", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", @@ -338,9 +329,10 @@ cc_library( "//common/text:syntax-tree-context", "//common/util:logging", "//verilog/CST:verilog-matchers", # fixdeps: keep + "//verilog/CST:verilog-nonterminals", "//verilog/analysis:descriptions", "//verilog/analysis:lint-rule-registry", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], alwayslink = 1, ) @@ -352,8 +344,6 @@ cc_test( ":forbid-defparam-rule", "//common/analysis:linter-test-utils", "//common/analysis:syntax-tree-linter-test-utils", - "//common/text:symbol", - "//verilog/CST:verilog-nonterminals", "//verilog/analysis:verilog-analyzer", "//verilog/parser:verilog-token-enum", "@com_google_googletest//:gtest", @@ -368,19 +358,16 @@ cc_library( deps = [ "//common/analysis:lint-rule-status", "//common/analysis:syntax-tree-lint-rule", - "//common/analysis:syntax-tree-search", "//common/analysis/matcher", "//common/analysis/matcher:bound-symbol-manager", "//common/text:concrete-syntax-tree", "//common/text:symbol", "//common/text:syntax-tree-context", - "//common/text:tree-utils", - "//verilog/CST:identifier", "//verilog/CST:seq-block", "//verilog/CST:verilog-matchers", # fixdeps: keep "//verilog/analysis:descriptions", "//verilog/analysis:lint-rule-registry", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], alwayslink = 1, ) @@ -392,8 +379,6 @@ cc_test( ":mismatched-labels-rule", "//common/analysis:linter-test-utils", "//common/analysis:syntax-tree-linter-test-utils", - "//common/text:symbol", - "//verilog/CST:verilog-nonterminals", "//verilog/analysis:verilog-analyzer", "//verilog/parser:verilog-token-enum", "@com_google_googletest//:gtest", @@ -415,7 +400,7 @@ cc_library( "//verilog/CST:verilog-matchers", # fixdeps: keep "//verilog/analysis:descriptions", "//verilog/analysis:lint-rule-registry", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], alwayslink = 1, ) @@ -427,8 +412,6 @@ cc_test( ":module-begin-block-rule", "//common/analysis:linter-test-utils", "//common/analysis:syntax-tree-linter-test-utils", - "//common/text:symbol", - "//verilog/CST:verilog-nonterminals", "//verilog/analysis:verilog-analyzer", "//verilog/parser:verilog-token-enum", "@com_google_googletest//:gtest", @@ -451,10 +434,11 @@ cc_library( "//common/util:file-util", "//common/util:logging", "//verilog/CST:module", - "//verilog/CST:verilog-matchers", + "//verilog/CST:verilog-nonterminals", "//verilog/analysis:descriptions", "//verilog/analysis:lint-rule-registry", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], alwayslink = 1, ) @@ -466,7 +450,6 @@ cc_test( ":module-filename-rule", "//common/analysis:linter-test-utils", "//common/analysis:text-structure-linter-test-utils", - "//common/text:symbol", "//verilog/analysis:verilog-analyzer", "//verilog/parser:verilog-token-enum", "@com_google_absl//absl/strings:string_view", @@ -491,6 +474,7 @@ cc_library( "//verilog/analysis:descriptions", "//verilog/analysis:lint-rule-registry", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], alwayslink = 1, ) @@ -502,7 +486,6 @@ cc_test( ":package-filename-rule", "//common/analysis:linter-test-utils", "//common/analysis:text-structure-linter-test-utils", - "//common/text:symbol", "//verilog/analysis:verilog-analyzer", "//verilog/parser:verilog-token-enum", "@com_google_absl//absl/strings:string_view", @@ -533,7 +516,7 @@ cc_library( "//verilog/CST:verilog-nonterminals", "//verilog/analysis:descriptions", "//verilog/analysis:lint-rule-registry", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], alwayslink = 1, ) @@ -545,9 +528,6 @@ cc_test( ":module-instantiation-rules", "//common/analysis:linter-test-utils", "//common/analysis:syntax-tree-linter-test-utils", - "//common/text:symbol", - "//verilog/CST:verilog-nonterminals", - "//verilog/CST:verilog-treebuilder-utils", "//verilog/analysis:verilog-analyzer", "//verilog/parser:verilog-token-enum", "@com_google_googletest//:gtest", @@ -563,16 +543,14 @@ cc_library( "//common/analysis:lint-rule-status", "//common/analysis:syntax-tree-search", "//common/analysis:text-structure-lint-rule", - "//common/text:symbol", "//common/text:text-structure", - "//common/text:token-info", - "//common/util:file-util", "//common/util:logging", "//verilog/CST:module", - "//verilog/CST:verilog-matchers", + "//verilog/CST:verilog-nonterminals", "//verilog/analysis:descriptions", "//verilog/analysis:lint-rule-registry", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], alwayslink = 1, ) @@ -584,7 +562,6 @@ cc_test( ":one-module-per-file-rule", "//common/analysis:linter-test-utils", "//common/analysis:text-structure-linter-test-utils", - "//common/text:symbol", "//verilog/analysis:verilog-analyzer", "//verilog/parser:verilog-token-enum", "@com_google_googletest//:gtest", @@ -605,6 +582,7 @@ cc_library( "//verilog/analysis:lint-rule-registry", "//verilog/parser:verilog-token-enum", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], alwayslink = 1, ) @@ -616,7 +594,6 @@ cc_test( ":endif-comment-rule", "//common/analysis:linter-test-utils", "//common/analysis:token-stream-linter-test-utils", - "//common/text:symbol", "//verilog/analysis:verilog-analyzer", "//verilog/parser:verilog-token-enum", "@com_google_googletest//:gtest", @@ -636,9 +613,10 @@ cc_library( "//common/text:symbol", "//common/text:syntax-tree-context", "//verilog/CST:verilog-matchers", + "//verilog/CST:verilog-nonterminals", "//verilog/analysis:descriptions", "//verilog/analysis:lint-rule-registry", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], alwayslink = 1, ) @@ -649,7 +627,6 @@ cc_test( deps = [ ":forbidden-anonymous-enums-rule", "//common/analysis:syntax-tree-linter-test-utils", - "//common/text:symbol", "//verilog/analysis:verilog-analyzer", "//verilog/parser:verilog-token-enum", "@com_google_googletest//:gtest", @@ -675,6 +652,7 @@ cc_library( "//verilog/analysis:descriptions", "//verilog/analysis:lint-rule-registry", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], alwayslink = 1, ) @@ -686,8 +664,6 @@ cc_test( ":enum-name-style-rule", "//common/analysis:linter-test-utils", "//common/analysis:syntax-tree-linter-test-utils", - "//common/text:symbol", - "//verilog/CST:verilog-nonterminals", "//verilog/analysis:verilog-analyzer", "//verilog/parser:verilog-token-enum", "@com_google_googletest//:gtest", @@ -713,7 +689,7 @@ cc_library( "//verilog/CST:verilog-matchers", "//verilog/analysis:descriptions", "//verilog/analysis:lint-rule-registry", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], alwayslink = 1, ) @@ -731,9 +707,10 @@ cc_library( "//common/text:symbol", "//common/text:syntax-tree-context", "//verilog/CST:verilog-matchers", + "//verilog/CST:verilog-nonterminals", "//verilog/analysis:descriptions", "//verilog/analysis:lint-rule-registry", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], alwayslink = 1, ) @@ -744,7 +721,6 @@ cc_test( deps = [ ":forbidden-anonymous-structs-unions-rule", "//common/analysis:syntax-tree-linter-test-utils", - "//common/text:symbol", "//verilog/analysis:verilog-analyzer", "//verilog/parser:verilog-token-enum", "@com_google_absl//absl/strings", @@ -760,8 +736,6 @@ cc_test( ":forbidden-macro-rule", "//common/analysis:linter-test-utils", "//common/analysis:syntax-tree-linter-test-utils", - "//common/text:symbol", - "//verilog/CST:verilog-treebuilder-utils", "//verilog/analysis:verilog-analyzer", "//verilog/parser:verilog-token-enum", "@com_google_googletest//:gtest", @@ -786,7 +760,7 @@ cc_library( "//verilog/CST:verilog-matchers", "//verilog/analysis:descriptions", "//verilog/analysis:lint-rule-registry", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], alwayslink = 1, ) @@ -798,8 +772,6 @@ cc_test( ":forbidden-symbol-rule", "//common/analysis:linter-test-utils", "//common/analysis:syntax-tree-linter-test-utils", - "//common/text:symbol", - "//verilog/CST:verilog-treebuilder-utils", "//verilog/analysis:verilog-analyzer", "//verilog/parser:verilog-token-enum", "@com_google_googletest//:gtest", @@ -822,7 +794,7 @@ cc_library( "//verilog/CST:verilog-matchers", "//verilog/analysis:descriptions", "//verilog/analysis:lint-rule-registry", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], alwayslink = 1, ) @@ -834,9 +806,6 @@ cc_test( ":generate-label-rule", "//common/analysis:linter-test-utils", "//common/analysis:syntax-tree-linter-test-utils", - "//common/text:symbol", - "//verilog/CST:verilog-nonterminals", - "//verilog/CST:verilog-treebuilder-utils", "//verilog/analysis:verilog-analyzer", "//verilog/parser:verilog-token-enum", "@com_google_googletest//:gtest", @@ -853,15 +822,16 @@ cc_library( "//common/analysis:syntax-tree-lint-rule", "//common/analysis/matcher", "//common/analysis/matcher:bound-symbol-manager", - "//common/analysis/matcher:core-matchers", "//common/text:symbol", "//common/text:syntax-tree-context", - "//verilog/CST:identifier", + "//common/text:token-info", "//verilog/CST:seq-block", "//verilog/CST:verilog-matchers", + "//verilog/CST:verilog-nonterminals", "//verilog/analysis:descriptions", "//verilog/analysis:lint-rule-registry", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], alwayslink = 1, ) @@ -873,9 +843,6 @@ cc_test( ":generate-label-prefix-rule", "//common/analysis:linter-test-utils", "//common/analysis:syntax-tree-linter-test-utils", - "//common/text:symbol", - "//verilog/CST:verilog-nonterminals", - "//verilog/CST:verilog-treebuilder-utils", "//verilog/analysis:verilog-analyzer", "//verilog/parser:verilog-token-enum", "@com_google_googletest//:gtest", @@ -900,7 +867,7 @@ cc_library( "//verilog/CST:verilog-matchers", "//verilog/analysis:descriptions", "//verilog/analysis:lint-rule-registry", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], alwayslink = 1, ) @@ -913,9 +880,6 @@ cc_test( ":v2001-generate-begin-rule", "//common/analysis:linter-test-utils", "//common/analysis:syntax-tree-linter-test-utils", - "//common/text:symbol", - "//verilog/CST:verilog-nonterminals", - "//verilog/CST:verilog-treebuilder-utils", "//verilog/analysis:verilog-analyzer", "//verilog/parser:verilog-token-enum", "@com_google_googletest//:gtest", @@ -943,7 +907,7 @@ cc_library( "//verilog/CST:verilog-matchers", "//verilog/analysis:descriptions", "//verilog/analysis:lint-rule-registry", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], alwayslink = 1, ) @@ -955,9 +919,6 @@ cc_test( ":void-cast-rule", "//common/analysis:linter-test-utils", "//common/analysis:syntax-tree-linter-test-utils", - "//common/text:symbol", - "//verilog/CST:verilog-nonterminals", - "//verilog/CST:verilog-treebuilder-utils", "//verilog/analysis:verilog-analyzer", "//verilog/parser:verilog-token-enum", "@com_google_googletest//:gtest", @@ -985,6 +946,7 @@ cc_library( "//verilog/analysis:descriptions", "//verilog/analysis:lint-rule-registry", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], alwayslink = 1, ) @@ -996,8 +958,6 @@ cc_test( ":undersized-binary-literal-rule", "//common/analysis:linter-test-utils", "//common/analysis:syntax-tree-linter-test-utils", - "//common/text:symbol", - "//verilog/CST:verilog-nonterminals", "//verilog/analysis:verilog-analyzer", "//verilog/parser:verilog-token-enum", "@com_google_googletest//:gtest", @@ -1015,17 +975,16 @@ cc_library( "//common/analysis/matcher", "//common/analysis/matcher:bound-symbol-manager", "//common/text:concrete-syntax-leaf", - "//common/text:config-utils", "//common/text:symbol", "//common/text:syntax-tree-context", "//common/text:token-info", - "//common/util:logging", "//verilog/CST:numbers", "//verilog/CST:verilog-matchers", "//verilog/analysis:descriptions", "//verilog/analysis:lint-rule-registry", "@com_google_absl//absl/numeric:int128", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], alwayslink = 1, ) @@ -1037,11 +996,10 @@ cc_test( ":truncated-numeric-literal-rule", "//common/analysis:linter-test-utils", "//common/analysis:syntax-tree-linter-test-utils", - "//common/text:symbol", - "//verilog/CST:verilog-nonterminals", "//verilog/analysis:verilog-analyzer", "//verilog/parser:verilog-token-enum", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", ], @@ -1063,16 +1021,15 @@ cc_library( "//common/text:symbol", "//common/text:syntax-tree-context", "//common/text:token-info", - "//common/text:tree-utils", "//common/util:casts", "//verilog/CST:expression", "//verilog/CST:verilog-matchers", "//verilog/CST:verilog-nonterminals", - "//verilog/CST:verilog-tree-print", "//verilog/analysis:descriptions", "//verilog/analysis:lint-rule-registry", "//verilog/parser:verilog-token-enum", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], alwayslink = 1, ) @@ -1084,8 +1041,6 @@ cc_test( ":create-object-name-match-rule", "//common/analysis:linter-test-utils", "//common/analysis:syntax-tree-linter-test-utils", - "//common/text:symbol", - "//verilog/CST:verilog-treebuilder-utils", "//verilog/analysis:verilog-analyzer", "//verilog/parser:verilog-token-enum", "@com_google_googletest//:gtest", @@ -1108,7 +1063,7 @@ cc_library( "//verilog/CST:verilog-matchers", "//verilog/analysis:descriptions", "//verilog/analysis:lint-rule-registry", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], alwayslink = 1, ) @@ -1120,9 +1075,6 @@ cc_test( ":always-comb-rule", "//common/analysis:linter-test-utils", "//common/analysis:syntax-tree-linter-test-utils", - "//common/text:symbol", - "//verilog/CST:verilog-nonterminals", - "//verilog/CST:verilog-treebuilder-utils", "//verilog/analysis:verilog-analyzer", "//verilog/parser:verilog-token-enum", "@com_google_googletest//:gtest", @@ -1145,6 +1097,7 @@ cc_library( "//verilog/analysis:descriptions", "//verilog/analysis:lint-rule-registry", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], alwayslink = 1, ) @@ -1156,9 +1109,6 @@ cc_test( ":token-stream-lint-rule", "//common/analysis:linter-test-utils", "//common/analysis:syntax-tree-linter-test-utils", - "//common/text:symbol", - "//verilog/CST:verilog-nonterminals", - "//verilog/CST:verilog-treebuilder-utils", "//verilog/analysis:verilog-analyzer", "//verilog/parser:verilog-token-enum", "@com_google_googletest//:gtest", @@ -1172,11 +1122,12 @@ cc_library( hdrs = ["suggest_parentheses_rule.h"], deps = [ "//common/analysis:syntax-tree-lint-rule", + "//common/text:token-info", "//verilog/CST:expression", - "//verilog/CST:verilog-matchers", + "//verilog/CST:verilog-nonterminals", "//verilog/analysis:descriptions", "//verilog/analysis:lint-rule-registry", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], alwayslink = 1, ) @@ -1207,9 +1158,10 @@ cc_library( "//common/text:syntax-tree-context", "//common/util:casts", "//verilog/CST:verilog-matchers", + "//verilog/CST:verilog-nonterminals", "//verilog/analysis:descriptions", "//verilog/analysis:lint-rule-registry", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], alwayslink = 1, ) @@ -1221,9 +1173,6 @@ cc_test( ":always-comb-blocking-rule", "//common/analysis:linter-test-utils", "//common/analysis:syntax-tree-linter-test-utils", - "//common/text:symbol", - "//verilog/CST:verilog-nonterminals", - "//verilog/CST:verilog-treebuilder-utils", "//verilog/analysis:verilog-analyzer", "//verilog/parser:verilog-token-enum", "@com_google_googletest//:gtest", @@ -1247,9 +1196,10 @@ cc_library( "//common/util:casts", "//common/util:logging", "//verilog/CST:verilog-matchers", + "//verilog/CST:verilog-nonterminals", "//verilog/analysis:descriptions", "//verilog/analysis:lint-rule-registry", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], alwayslink = 1, ) @@ -1261,9 +1211,6 @@ cc_test( ":always-ff-non-blocking-rule", "//common/analysis:linter-test-utils", "//common/analysis:syntax-tree-linter-test-utils", - "//common/text:symbol", - "//verilog/CST:verilog-nonterminals", - "//verilog/CST:verilog-treebuilder-utils", "//verilog/analysis:verilog-analyzer", "//verilog/parser:verilog-token-enum", "@com_google_googletest//:gtest", @@ -1282,6 +1229,7 @@ cc_library( "//common/analysis/matcher:bound-symbol-manager", "//common/text:symbol", "//common/text:syntax-tree-context", + "//common/text:token-info", "//common/util:logging", "//verilog/CST:context-functions", "//verilog/CST:functions", @@ -1289,7 +1237,7 @@ cc_library( "//verilog/CST:verilog-matchers", "//verilog/analysis:descriptions", "//verilog/analysis:lint-rule-registry", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], alwayslink = 1, ) @@ -1301,8 +1249,6 @@ cc_test( ":explicit-function-lifetime-rule", "//common/analysis:linter-test-utils", "//common/analysis:syntax-tree-linter-test-utils", - "//common/text:symbol", - "//verilog/CST:verilog-nonterminals", "//verilog/analysis:verilog-analyzer", "//verilog/parser:verilog-token-enum", "@com_google_googletest//:gtest", @@ -1322,6 +1268,7 @@ cc_library( "//common/analysis/matcher:matcher-builders", "//common/text:symbol", "//common/text:syntax-tree-context", + "//common/text:token-info", "//common/text:tree-utils", "//verilog/CST:context-functions", "//verilog/CST:identifier", @@ -1329,7 +1276,7 @@ cc_library( "//verilog/CST:verilog-matchers", "//verilog/analysis:descriptions", "//verilog/analysis:lint-rule-registry", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], alwayslink = 1, ) @@ -1341,8 +1288,6 @@ cc_test( ":explicit-task-lifetime-rule", "//common/analysis:linter-test-utils", "//common/analysis:syntax-tree-linter-test-utils", - "//common/text:symbol", - "//verilog/CST:verilog-nonterminals", "//verilog/analysis:verilog-analyzer", "//verilog/parser:verilog-token-enum", "@com_google_googletest//:gtest", @@ -1361,6 +1306,7 @@ cc_library( "//common/analysis/matcher:bound-symbol-manager", "//common/text:symbol", "//common/text:syntax-tree-context", + "//common/text:token-info", "//common/text:tree-utils", "//common/util:logging", "//verilog/CST:context-functions", @@ -1369,7 +1315,7 @@ cc_library( "//verilog/CST:verilog-matchers", "//verilog/analysis:descriptions", "//verilog/analysis:lint-rule-registry", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], alwayslink = 1, ) @@ -1381,8 +1327,6 @@ cc_test( ":packed-dimensions-rule", "//common/analysis:linter-test-utils", "//common/analysis:syntax-tree-linter-test-utils", - "//common/text:symbol", - "//verilog/CST:verilog-nonterminals", "//verilog/analysis:verilog-analyzer", "//verilog/parser:verilog-token-enum", "@com_google_googletest//:gtest", @@ -1401,14 +1345,16 @@ cc_library( "//common/analysis/matcher:bound-symbol-manager", "//common/text:symbol", "//common/text:syntax-tree-context", + "//common/text:token-info", "//common/util:logging", "//verilog/CST:context-functions", "//verilog/CST:dimensions", "//verilog/CST:expression", "//verilog/CST:verilog-matchers", + "//verilog/CST:verilog-nonterminals", "//verilog/analysis:descriptions", "//verilog/analysis:lint-rule-registry", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], alwayslink = 1, ) @@ -1420,8 +1366,6 @@ cc_test( ":unpacked-dimensions-rule", "//common/analysis:linter-test-utils", "//common/analysis:syntax-tree-linter-test-utils", - "//common/text:symbol", - "//verilog/CST:verilog-nonterminals", "//verilog/analysis:verilog-analyzer", "//verilog/parser:verilog-token-enum", "@com_google_googletest//:gtest", @@ -1440,15 +1384,14 @@ cc_library( "//common/analysis/matcher:bound-symbol-manager", "//common/text:symbol", "//common/text:syntax-tree-context", + "//common/text:token-info", "//common/text:tree-utils", - "//common/util:logging", - "//verilog/CST:context-functions", - "//verilog/CST:dimensions", "//verilog/CST:expression", "//verilog/CST:verilog-matchers", + "//verilog/CST:verilog-nonterminals", "//verilog/analysis:descriptions", "//verilog/analysis:lint-rule-registry", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], alwayslink = 1, ) @@ -1460,8 +1403,6 @@ cc_test( ":forbid-negative-array-dim", "//common/analysis:linter-test-utils", "//common/analysis:syntax-tree-linter-test-utils", - "//common/text:symbol", - "//verilog/CST:verilog-nonterminals", "//verilog/analysis:verilog-analyzer", "//verilog/parser:verilog-token-enum", "@com_google_googletest//:gtest", @@ -1483,9 +1424,10 @@ cc_library( "//common/text:symbol", "//common/text:syntax-tree-context", "//verilog/CST:verilog-matchers", + "//verilog/CST:verilog-nonterminals", "//verilog/analysis:descriptions", "//verilog/analysis:lint-rule-registry", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], alwayslink = 1, ) @@ -1497,8 +1439,6 @@ cc_test( ":case-missing-default-rule", "//common/analysis:linter-test-utils", "//common/analysis:syntax-tree-linter-test-utils", - "//common/text:symbol", - "//verilog/CST:verilog-nonterminals", "//verilog/analysis:verilog-analyzer", "//verilog/parser:verilog-token-enum", "@com_google_googletest//:gtest", @@ -1523,8 +1463,8 @@ cc_library( "//verilog/CST:verilog-matchers", "//verilog/analysis:descriptions", "//verilog/analysis:lint-rule-registry", - "//verilog/parser:verilog-token-enum", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], alwayslink = 1, ) @@ -1536,8 +1476,6 @@ cc_test( ":constraint-name-style-rule", "//common/analysis:linter-test-utils", "//common/analysis:syntax-tree-linter-test-utils", - "//common/text:symbol", - "//verilog/CST:verilog-nonterminals", "//verilog/analysis:verilog-analyzer", "//verilog/parser:verilog-token-enum", "@com_google_googletest//:gtest", @@ -1554,7 +1492,6 @@ cc_library( "//common/analysis:syntax-tree-lint-rule", "//common/analysis/matcher", "//common/analysis/matcher:bound-symbol-manager", - "//common/analysis/matcher:core-matchers", "//common/text:symbol", "//common/text:syntax-tree-context", "//verilog/CST:identifier", @@ -1562,7 +1499,7 @@ cc_library( "//verilog/CST:verilog-nonterminals", "//verilog/analysis:descriptions", "//verilog/analysis:lint-rule-registry", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], alwayslink = 1, ) @@ -1574,9 +1511,6 @@ cc_test( ":disable-statement-rule", "//common/analysis:linter-test-utils", "//common/analysis:syntax-tree-linter-test-utils", - "//common/text:symbol", - "//verilog/CST:verilog-nonterminals", - "//verilog/CST:verilog-treebuilder-utils", "//verilog/analysis:verilog-analyzer", "//verilog/parser:verilog-token-enum", "@com_google_googletest//:gtest", @@ -1599,6 +1533,7 @@ cc_library( "//verilog/parser:verilog-token-classifications", "//verilog/parser:verilog-token-enum", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], alwayslink = 1, ) @@ -1610,7 +1545,6 @@ cc_test( ":macro-name-style-rule", "//common/analysis:linter-test-utils", "//common/analysis:token-stream-linter-test-utils", - "//common/text:symbol", "//verilog/analysis:verilog-analyzer", "//verilog/parser:verilog-token-enum", "@com_google_googletest//:gtest", @@ -1630,7 +1564,7 @@ cc_library( "//verilog/analysis:lint-rule-registry", "//verilog/parser:verilog-lexer", "//verilog/parser:verilog-token-classifications", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], alwayslink = 1, ) @@ -1656,7 +1590,6 @@ cc_library( deps = [ "//common/analysis:lint-rule-status", "//common/analysis:token-stream-lint-rule", - "//common/strings:naming-utils", "//common/text:token-info", "//verilog/analysis:descriptions", "//verilog/analysis:lint-rule-registry", @@ -1664,6 +1597,7 @@ cc_library( "//verilog/parser:verilog-token-classifications", "//verilog/parser:verilog-token-enum", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], alwayslink = 1, ) @@ -1675,7 +1609,6 @@ cc_test( ":numeric-format-string-style-rule", "//common/analysis:linter-test-utils", "//common/analysis:token-stream-linter-test-utils", - "//common/text:symbol", "//verilog/analysis:verilog-analyzer", "//verilog/parser:verilog-token-enum", "@com_google_googletest//:gtest", @@ -1703,6 +1636,7 @@ cc_library( "//verilog/analysis:lint-rule-registry", "//verilog/parser:verilog-token-enum", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], alwayslink = 1, ) @@ -1714,8 +1648,6 @@ cc_test( ":parameter-name-style-rule", "//common/analysis:linter-test-utils", "//common/analysis:syntax-tree-linter-test-utils", - "//common/text:symbol", - "//verilog/CST:verilog-nonterminals", "//verilog/analysis:verilog-analyzer", "//verilog/parser:verilog-token-enum", "@com_google_googletest//:gtest", @@ -1740,8 +1672,8 @@ cc_library( "//verilog/CST:verilog-matchers", "//verilog/analysis:descriptions", "//verilog/analysis:lint-rule-registry", - "//verilog/parser:verilog-token-enum", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], alwayslink = 1, ) @@ -1753,8 +1685,6 @@ cc_test( ":parameter-type-name-style-rule", "//common/analysis:linter-test-utils", "//common/analysis:syntax-tree-linter-test-utils", - "//common/text:symbol", - "//verilog/CST:verilog-nonterminals", "//verilog/analysis:verilog-analyzer", "//verilog/parser:verilog-token-enum", "@com_google_googletest//:gtest", @@ -1779,7 +1709,7 @@ cc_library( "//verilog/analysis:descriptions", "//verilog/analysis:lint-rule-registry", "//verilog/parser:verilog-token-enum", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], alwayslink = 1, ) @@ -1791,8 +1721,6 @@ cc_test( ":proper-parameter-declaration-rule", "//common/analysis:linter-test-utils", "//common/analysis:syntax-tree-linter-test-utils", - "//common/text:symbol", - "//verilog/CST:verilog-nonterminals", "//verilog/analysis:verilog-analyzer", "//verilog/parser:verilog-token-enum", "@com_google_googletest//:gtest", @@ -1817,6 +1745,7 @@ cc_library( "//verilog/analysis:descriptions", "//verilog/analysis:lint-rule-registry", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], alwayslink = 1, ) @@ -1828,8 +1757,6 @@ cc_test( ":plusarg-assignment-rule", "//common/analysis:linter-test-utils", "//common/analysis:syntax-tree-linter-test-utils", - "//common/text:symbol", - "//verilog/CST:verilog-treebuilder-utils", "//verilog/analysis:verilog-analyzer", "//verilog/parser:verilog-token-enum", "@com_google_googletest//:gtest", @@ -1846,18 +1773,16 @@ cc_library( "//common/analysis:syntax-tree-lint-rule", "//common/analysis/matcher", "//common/analysis/matcher:bound-symbol-manager", - "//common/strings:naming-utils", "//common/text:symbol", "//common/text:syntax-tree-context", "//common/text:token-info", "//common/util:logging", - "//verilog/CST:identifier", "//verilog/CST:port", "//verilog/CST:verilog-matchers", "//verilog/analysis:descriptions", "//verilog/analysis:lint-rule-registry", - "//verilog/parser:verilog-token-enum", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], alwayslink = 1, ) @@ -1869,8 +1794,6 @@ cc_test( ":port-name-suffix-rule", "//common/analysis:linter-test-utils", "//common/analysis:syntax-tree-linter-test-utils", - "//common/text:symbol", - "//verilog/CST:verilog-nonterminals", "//verilog/analysis:verilog-analyzer", "//verilog/parser:verilog-token-enum", "@com_google_googletest//:gtest", @@ -1890,12 +1813,14 @@ cc_library( "//common/text:config-utils", "//common/text:symbol", "//common/text:syntax-tree-context", + "//common/text:token-info", "//common/util:logging", "//verilog/CST:parameters", "//verilog/CST:verilog-matchers", # fixdeps: keep "//verilog/analysis:descriptions", "//verilog/analysis:lint-rule-registry", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], alwayslink = 1, ) @@ -1907,8 +1832,6 @@ cc_test( ":explicit-parameter-storage-type-rule", "//common/analysis:linter-test-utils", "//common/analysis:syntax-tree-linter-test-utils", - "//common/text:symbol", - "//verilog/CST:verilog-nonterminals", "//verilog/analysis:verilog-analyzer", "//verilog/parser:verilog-token-enum", "@com_google_absl//absl/strings", @@ -1926,7 +1849,6 @@ cc_library( "//common/analysis:syntax-tree-lint-rule", "//common/analysis/matcher", "//common/analysis/matcher:bound-symbol-manager", - "//common/text:concrete-syntax-leaf", "//common/text:symbol", "//common/text:syntax-tree-context", "//common/util:logging", @@ -1935,7 +1857,7 @@ cc_library( "//verilog/CST:verilog-matchers", "//verilog/analysis:descriptions", "//verilog/analysis:lint-rule-registry", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], alwayslink = 1, ) @@ -1945,17 +1867,10 @@ cc_test( srcs = ["explicit_function_task_parameter_type_rule_test.cc"], deps = [ ":explicit-function-task-parameter-type-rule", - "//common/analysis:lint-rule-status", "//common/analysis:linter-test-utils", - "//common/analysis:syntax-tree-lint-rule", - "//common/analysis:syntax-tree-linter", "//common/analysis:syntax-tree-linter-test-utils", - "//common/text:symbol", - "//common/text:token-info", "//verilog/analysis:verilog-analyzer", "//verilog/parser:verilog-token-enum", - "@com_google_absl//absl/memory", - "@com_google_absl//absl/status", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", ], @@ -1977,13 +1892,12 @@ cc_library( "//common/text:token-info", "//common/util:logging", "//verilog/CST:data", - "//verilog/CST:identifier", "//verilog/CST:net", "//verilog/CST:port", "//verilog/CST:verilog-matchers", "//verilog/analysis:descriptions", "//verilog/analysis:lint-rule-registry", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], alwayslink = 1, ) @@ -1995,8 +1909,6 @@ cc_test( ":signal-name-style-rule", "//common/analysis:linter-test-utils", "//common/analysis:syntax-tree-linter-test-utils", - "//common/text:symbol", - "//verilog/CST:verilog-nonterminals", "//verilog/analysis:verilog-analyzer", "//verilog/parser:verilog-token-enum", "@com_google_googletest//:gtest", @@ -2013,7 +1925,6 @@ cc_library( "//common/analysis:syntax-tree-lint-rule", "//common/analysis/matcher", "//common/analysis/matcher:bound-symbol-manager", - "//common/strings:naming-utils", "//common/text:config-utils", "//common/text:symbol", "//common/text:syntax-tree-context", @@ -2022,7 +1933,9 @@ cc_library( "//verilog/CST:verilog-matchers", "//verilog/analysis:descriptions", "//verilog/analysis:lint-rule-registry", + "@com_google_absl//absl/status", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], alwayslink = 1, ) @@ -2034,11 +1947,10 @@ cc_test( ":struct-union-name-style-rule", "//common/analysis:linter-test-utils", "//common/analysis:syntax-tree-linter-test-utils", - "//common/text:symbol", - "//verilog/CST:verilog-nonterminals", "//verilog/analysis:verilog-analyzer", "//verilog/parser:verilog-token-enum", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", ], @@ -2056,12 +1968,14 @@ cc_library( "//common/strings:naming-utils", "//common/text:symbol", "//common/text:syntax-tree-context", + "//common/text:token-info", "//verilog/CST:module", "//verilog/CST:type", "//verilog/CST:verilog-matchers", "//verilog/analysis:descriptions", "//verilog/analysis:lint-rule-registry", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], alwayslink = 1, ) @@ -2073,8 +1987,6 @@ cc_test( ":interface-name-style-rule", "//common/analysis:linter-test-utils", "//common/analysis:syntax-tree-linter-test-utils", - "//common/text:symbol", - "//verilog/CST:verilog-nonterminals", "//verilog/analysis:verilog-analyzer", "//verilog/parser:verilog-token-enum", "@com_google_googletest//:gtest", @@ -2089,17 +2001,14 @@ cc_library( deps = [ "//common/analysis:lint-rule-status", "//common/analysis:syntax-tree-lint-rule", - "//common/analysis/matcher", - "//common/analysis/matcher:bound-symbol-manager", - "//common/strings:naming-utils", "//common/text:concrete-syntax-tree", "//common/text:symbol", "//common/text:syntax-tree-context", "//verilog/CST:identifier", - "//verilog/CST:verilog-matchers", + "//verilog/CST:verilog-nonterminals", "//verilog/analysis:descriptions", "//verilog/analysis:lint-rule-registry", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], alwayslink = 1, ) @@ -2111,8 +2020,6 @@ cc_test( ":legacy-genvar-declaration-rule", "//common/analysis:linter-test-utils", "//common/analysis:syntax-tree-linter-test-utils", - "//common/text:symbol", - "//verilog/CST:verilog-nonterminals", "//verilog/analysis:verilog-analyzer", "//verilog/parser:verilog-token-enum", "@com_google_googletest//:gtest", @@ -2127,18 +2034,17 @@ cc_library( deps = [ "//common/analysis:lint-rule-status", "//common/analysis:syntax-tree-lint-rule", - "//common/analysis/matcher", - "//common/analysis/matcher:bound-symbol-manager", - "//common/strings:naming-utils", + "//common/analysis/matcher:matcher-builders", "//common/text:concrete-syntax-tree", "//common/text:symbol", "//common/text:syntax-tree-context", "//common/text:tree-utils", "//common/util:logging", - "//verilog/CST:verilog-matchers", + "//verilog/CST:verilog-nonterminals", "//verilog/analysis:descriptions", "//verilog/analysis:lint-rule-registry", - "@com_google_absl//absl/strings", + "//verilog/parser:verilog-token-enum", + "@com_google_absl//absl/strings:string_view", ], alwayslink = 1, ) @@ -2150,7 +2056,6 @@ cc_test( ":legacy-generate-region-rule", "//common/analysis:linter-test-utils", "//common/analysis:syntax-tree-linter-test-utils", - "//verilog/CST:verilog-nonterminals", "//verilog/analysis:verilog-analyzer", "//verilog/parser:verilog-token-enum", "@com_google_googletest//:gtest", @@ -2171,9 +2076,10 @@ cc_library( "//common/text:token-info", "//verilog/CST:context-functions", "//verilog/CST:macro", - "//verilog/CST:verilog-matchers", + "//verilog/CST:verilog-nonterminals", "//verilog/analysis:descriptions", "//verilog/analysis:lint-rule-registry", + "//verilog/parser:verilog-token-enum", "@com_google_absl//absl/strings", ], alwayslink = 1, @@ -2186,8 +2092,6 @@ cc_test( ":uvm-macro-semicolon-rule", "//common/analysis:linter-test-utils", "//common/analysis:syntax-tree-linter-test-utils", - "//common/text:symbol", - "//verilog/CST:verilog-nonterminals", "//verilog/analysis:verilog-analyzer", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", @@ -2210,7 +2114,7 @@ cc_library( "//verilog/CST:verilog-nonterminals", "//verilog/analysis:descriptions", "//verilog/analysis:lint-rule-registry", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], alwayslink = 1, ) diff --git a/verilog/analysis/checkers/always_comb_blocking_rule.cc b/verilog/analysis/checkers/always_comb_blocking_rule.cc index 05eea8928..93d8a6e71 100644 --- a/verilog/analysis/checkers/always_comb_blocking_rule.cc +++ b/verilog/analysis/checkers/always_comb_blocking_rule.cc @@ -26,6 +26,7 @@ #include "common/text/syntax_tree_context.h" #include "common/util/casts.h" #include "verilog/CST/verilog_matchers.h" // IWYU pragma: keep +#include "verilog/CST/verilog_nonterminals.h" #include "verilog/analysis/descriptions.h" #include "verilog/analysis/lint_rule_registry.h" diff --git a/verilog/analysis/checkers/always_comb_blocking_rule.h b/verilog/analysis/checkers/always_comb_blocking_rule.h index b14eab74c..7fe782a70 100644 --- a/verilog/analysis/checkers/always_comb_blocking_rule.h +++ b/verilog/analysis/checkers/always_comb_blocking_rule.h @@ -16,7 +16,6 @@ #define VERIBLE_VERILOG_ANALYSIS_CHECKERS_ALWAYS_COMB_BLOCKING_RULE_H_ #include -#include #include "common/analysis/lint_rule_status.h" #include "common/analysis/syntax_tree_lint_rule.h" diff --git a/verilog/analysis/checkers/always_comb_blocking_rule_test.cc b/verilog/analysis/checkers/always_comb_blocking_rule_test.cc index b1276476d..bc68d1cfa 100644 --- a/verilog/analysis/checkers/always_comb_blocking_rule_test.cc +++ b/verilog/analysis/checkers/always_comb_blocking_rule_test.cc @@ -18,10 +18,7 @@ #include "common/analysis/linter_test_utils.h" #include "common/analysis/syntax_tree_linter_test_utils.h" -#include "common/text/symbol.h" #include "gtest/gtest.h" -#include "verilog/CST/verilog_nonterminals.h" -#include "verilog/CST/verilog_treebuilder_utils.h" #include "verilog/analysis/verilog_analyzer.h" #include "verilog/parser/verilog_token_enum.h" diff --git a/verilog/analysis/checkers/always_comb_rule.h b/verilog/analysis/checkers/always_comb_rule.h index e90107436..608263f32 100644 --- a/verilog/analysis/checkers/always_comb_rule.h +++ b/verilog/analysis/checkers/always_comb_rule.h @@ -16,7 +16,6 @@ #define VERIBLE_VERILOG_ANALYSIS_CHECKERS_ALWAYS_COMB_RULE_H_ #include -#include #include "common/analysis/lint_rule_status.h" #include "common/analysis/syntax_tree_lint_rule.h" diff --git a/verilog/analysis/checkers/always_comb_rule_test.cc b/verilog/analysis/checkers/always_comb_rule_test.cc index 517c87b1a..bc53da3f1 100644 --- a/verilog/analysis/checkers/always_comb_rule_test.cc +++ b/verilog/analysis/checkers/always_comb_rule_test.cc @@ -18,10 +18,7 @@ #include "common/analysis/linter_test_utils.h" #include "common/analysis/syntax_tree_linter_test_utils.h" -#include "common/text/symbol.h" #include "gtest/gtest.h" -#include "verilog/CST/verilog_nonterminals.h" -#include "verilog/CST/verilog_treebuilder_utils.h" #include "verilog/analysis/verilog_analyzer.h" #include "verilog/parser/verilog_token_enum.h" diff --git a/verilog/analysis/checkers/always_ff_non_blocking_rule.cc b/verilog/analysis/checkers/always_ff_non_blocking_rule.cc index 0f07fbfdf..28d05f70e 100644 --- a/verilog/analysis/checkers/always_ff_non_blocking_rule.cc +++ b/verilog/analysis/checkers/always_ff_non_blocking_rule.cc @@ -28,7 +28,8 @@ #include "common/text/syntax_tree_context.h" #include "common/util/casts.h" #include "common/util/logging.h" -#include "verilog/CST/verilog_matchers.h" // IWYU pragma: keep +#include "verilog/CST/verilog_matchers.h" +#include "verilog/CST/verilog_nonterminals.h" #include "verilog/analysis/descriptions.h" #include "verilog/analysis/lint_rule_registry.h" diff --git a/verilog/analysis/checkers/always_ff_non_blocking_rule.h b/verilog/analysis/checkers/always_ff_non_blocking_rule.h index 9bc86ff9a..e5de85883 100644 --- a/verilog/analysis/checkers/always_ff_non_blocking_rule.h +++ b/verilog/analysis/checkers/always_ff_non_blocking_rule.h @@ -18,7 +18,6 @@ #include #include #include -#include #include #include "absl/strings/string_view.h" diff --git a/verilog/analysis/checkers/always_ff_non_blocking_rule_test.cc b/verilog/analysis/checkers/always_ff_non_blocking_rule_test.cc index cec73323c..098d90fac 100644 --- a/verilog/analysis/checkers/always_ff_non_blocking_rule_test.cc +++ b/verilog/analysis/checkers/always_ff_non_blocking_rule_test.cc @@ -18,10 +18,7 @@ #include "common/analysis/linter_test_utils.h" #include "common/analysis/syntax_tree_linter_test_utils.h" -#include "common/text/symbol.h" #include "gtest/gtest.h" -#include "verilog/CST/verilog_nonterminals.h" -#include "verilog/CST/verilog_treebuilder_utils.h" #include "verilog/analysis/verilog_analyzer.h" #include "verilog/parser/verilog_token_enum.h" diff --git a/verilog/analysis/checkers/banned_declared_name_patterns_rule.cc b/verilog/analysis/checkers/banned_declared_name_patterns_rule.cc index 4a2d053de..3165e4e41 100644 --- a/verilog/analysis/checkers/banned_declared_name_patterns_rule.cc +++ b/verilog/analysis/checkers/banned_declared_name_patterns_rule.cc @@ -19,13 +19,12 @@ #include "absl/strings/match.h" #include "absl/strings/string_view.h" #include "common/analysis/lint_rule_status.h" -#include "common/analysis/matcher/bound_symbol_manager.h" -#include "common/strings/naming_utils.h" #include "common/text/symbol.h" #include "common/text/syntax_tree_context.h" -#include "verilog/CST/functions.h" +#include "common/text/token_info.h" #include "verilog/CST/module.h" #include "verilog/CST/package.h" +#include "verilog/CST/verilog_nonterminals.h" #include "verilog/analysis/lint_rule_registry.h" namespace verilog { diff --git a/verilog/analysis/checkers/banned_declared_name_patterns_rule.h b/verilog/analysis/checkers/banned_declared_name_patterns_rule.h index a51ce9161..91dab006a 100644 --- a/verilog/analysis/checkers/banned_declared_name_patterns_rule.h +++ b/verilog/analysis/checkers/banned_declared_name_patterns_rule.h @@ -16,7 +16,6 @@ #define VERIBLE_VERILOG_ANALYSIS_CHECKERS_BANNED_DECLARED_NAME_PATTERNS_RULE_H_ #include -#include #include "common/analysis/lint_rule_status.h" #include "common/analysis/matcher/matcher.h" diff --git a/verilog/analysis/checkers/banned_declared_name_patterns_rule_test.cc b/verilog/analysis/checkers/banned_declared_name_patterns_rule_test.cc index 19d978909..ae982bab3 100644 --- a/verilog/analysis/checkers/banned_declared_name_patterns_rule_test.cc +++ b/verilog/analysis/checkers/banned_declared_name_patterns_rule_test.cc @@ -18,9 +18,7 @@ #include "common/analysis/linter_test_utils.h" #include "common/analysis/syntax_tree_linter_test_utils.h" -#include "common/text/symbol.h" #include "gtest/gtest.h" -#include "verilog/CST/verilog_nonterminals.h" #include "verilog/analysis/verilog_analyzer.h" namespace verilog { diff --git a/verilog/analysis/checkers/case_missing_default_rule.cc b/verilog/analysis/checkers/case_missing_default_rule.cc index 33c8efad6..9faeb4f8e 100644 --- a/verilog/analysis/checkers/case_missing_default_rule.cc +++ b/verilog/analysis/checkers/case_missing_default_rule.cc @@ -25,6 +25,7 @@ #include "common/text/symbol.h" #include "common/text/syntax_tree_context.h" #include "verilog/CST/verilog_matchers.h" +#include "verilog/CST/verilog_nonterminals.h" #include "verilog/analysis/descriptions.h" #include "verilog/analysis/lint_rule_registry.h" diff --git a/verilog/analysis/checkers/case_missing_default_rule.h b/verilog/analysis/checkers/case_missing_default_rule.h index 0f065282c..b191881f9 100644 --- a/verilog/analysis/checkers/case_missing_default_rule.h +++ b/verilog/analysis/checkers/case_missing_default_rule.h @@ -16,7 +16,6 @@ #define VERIBLE_VERILOG_ANALYSIS_CHECKERS_CASE_MISSING_DEFAULT_RULE_H_ #include -#include #include "common/analysis/lint_rule_status.h" #include "common/analysis/syntax_tree_lint_rule.h" diff --git a/verilog/analysis/checkers/case_missing_default_rule_test.cc b/verilog/analysis/checkers/case_missing_default_rule_test.cc index 0a0bb3d6b..cd3513876 100644 --- a/verilog/analysis/checkers/case_missing_default_rule_test.cc +++ b/verilog/analysis/checkers/case_missing_default_rule_test.cc @@ -18,9 +18,7 @@ #include "common/analysis/linter_test_utils.h" #include "common/analysis/syntax_tree_linter_test_utils.h" -#include "common/text/symbol.h" #include "gtest/gtest.h" -#include "verilog/CST/verilog_nonterminals.h" #include "verilog/analysis/verilog_analyzer.h" #include "verilog/parser/verilog_token_enum.h" diff --git a/verilog/analysis/checkers/constraint_name_style_rule.cc b/verilog/analysis/checkers/constraint_name_style_rule.cc index 83e7f81e7..dfe13ecc2 100644 --- a/verilog/analysis/checkers/constraint_name_style_rule.cc +++ b/verilog/analysis/checkers/constraint_name_style_rule.cc @@ -29,7 +29,6 @@ #include "verilog/CST/verilog_matchers.h" #include "verilog/analysis/descriptions.h" #include "verilog/analysis/lint_rule_registry.h" -#include "verilog/parser/verilog_token_enum.h" namespace verilog { namespace analysis { diff --git a/verilog/analysis/checkers/constraint_name_style_rule.h b/verilog/analysis/checkers/constraint_name_style_rule.h index c24ac8c0f..277da1eda 100644 --- a/verilog/analysis/checkers/constraint_name_style_rule.h +++ b/verilog/analysis/checkers/constraint_name_style_rule.h @@ -16,7 +16,6 @@ #define VERIBLE_VERILOG_ANALYSIS_CHECKERS_CONSTRAINT_NAME_STYLE_RULE_H_ #include -#include #include "common/analysis/lint_rule_status.h" #include "common/analysis/syntax_tree_lint_rule.h" diff --git a/verilog/analysis/checkers/constraint_name_style_rule_test.cc b/verilog/analysis/checkers/constraint_name_style_rule_test.cc index 6256b363e..9fa2d291b 100644 --- a/verilog/analysis/checkers/constraint_name_style_rule_test.cc +++ b/verilog/analysis/checkers/constraint_name_style_rule_test.cc @@ -18,9 +18,7 @@ #include "common/analysis/linter_test_utils.h" #include "common/analysis/syntax_tree_linter_test_utils.h" -#include "common/text/symbol.h" #include "gtest/gtest.h" -#include "verilog/CST/verilog_nonterminals.h" #include "verilog/analysis/verilog_analyzer.h" #include "verilog/parser/verilog_token_enum.h" diff --git a/verilog/analysis/checkers/create_object_name_match_rule.cc b/verilog/analysis/checkers/create_object_name_match_rule.cc index 3302d7837..6683ea943 100644 --- a/verilog/analysis/checkers/create_object_name_match_rule.cc +++ b/verilog/analysis/checkers/create_object_name_match_rule.cc @@ -28,12 +28,10 @@ #include "common/text/symbol.h" #include "common/text/syntax_tree_context.h" #include "common/text/token_info.h" -#include "common/text/tree_utils.h" #include "common/util/casts.h" #include "verilog/CST/expression.h" #include "verilog/CST/verilog_matchers.h" #include "verilog/CST/verilog_nonterminals.h" -#include "verilog/CST/verilog_tree_print.h" #include "verilog/analysis/descriptions.h" #include "verilog/analysis/lint_rule_registry.h" #include "verilog/parser/verilog_token_enum.h" diff --git a/verilog/analysis/checkers/create_object_name_match_rule.h b/verilog/analysis/checkers/create_object_name_match_rule.h index de7a9d37f..992a3bf26 100644 --- a/verilog/analysis/checkers/create_object_name_match_rule.h +++ b/verilog/analysis/checkers/create_object_name_match_rule.h @@ -16,7 +16,6 @@ #define VERIBLE_VERILOG_ANALYSIS_CHECKERS_CREATE_OBJECT_NAME_MATCH_RULE_H_ #include -#include #include "common/analysis/lint_rule_status.h" #include "common/analysis/matcher/core_matchers.h" diff --git a/verilog/analysis/checkers/create_object_name_match_rule_test.cc b/verilog/analysis/checkers/create_object_name_match_rule_test.cc index fb4a3669c..05bfe89c1 100644 --- a/verilog/analysis/checkers/create_object_name_match_rule_test.cc +++ b/verilog/analysis/checkers/create_object_name_match_rule_test.cc @@ -18,9 +18,7 @@ #include "common/analysis/linter_test_utils.h" #include "common/analysis/syntax_tree_linter_test_utils.h" -#include "common/text/symbol.h" #include "gtest/gtest.h" -#include "verilog/CST/verilog_treebuilder_utils.h" #include "verilog/analysis/verilog_analyzer.h" #include "verilog/parser/verilog_token_enum.h" diff --git a/verilog/analysis/checkers/disable_statement_rule.cc b/verilog/analysis/checkers/disable_statement_rule.cc index 99133b164..340324fe0 100644 --- a/verilog/analysis/checkers/disable_statement_rule.cc +++ b/verilog/analysis/checkers/disable_statement_rule.cc @@ -20,7 +20,6 @@ #include "absl/strings/string_view.h" #include "common/analysis/lint_rule_status.h" #include "common/analysis/matcher/bound_symbol_manager.h" -#include "common/analysis/matcher/core_matchers.h" #include "common/analysis/matcher/matcher.h" #include "common/text/symbol.h" #include "common/text/syntax_tree_context.h" diff --git a/verilog/analysis/checkers/disable_statement_rule.h b/verilog/analysis/checkers/disable_statement_rule.h index 69328fd7b..cfac05426 100644 --- a/verilog/analysis/checkers/disable_statement_rule.h +++ b/verilog/analysis/checkers/disable_statement_rule.h @@ -16,7 +16,6 @@ #define VERIBLE_VERILOG_ANALYSIS_CHECKERS_DISABLE_NON_SEQ_STATEMENT_H_ #include -#include #include "common/analysis/lint_rule_status.h" #include "common/analysis/syntax_tree_lint_rule.h" diff --git a/verilog/analysis/checkers/disable_statement_rule_test.cc b/verilog/analysis/checkers/disable_statement_rule_test.cc index 3726cc4dc..ede02e05c 100644 --- a/verilog/analysis/checkers/disable_statement_rule_test.cc +++ b/verilog/analysis/checkers/disable_statement_rule_test.cc @@ -18,10 +18,7 @@ #include "common/analysis/linter_test_utils.h" #include "common/analysis/syntax_tree_linter_test_utils.h" -#include "common/text/symbol.h" #include "gtest/gtest.h" -#include "verilog/CST/verilog_nonterminals.h" -#include "verilog/CST/verilog_treebuilder_utils.h" #include "verilog/analysis/verilog_analyzer.h" #include "verilog/parser/verilog_token_enum.h" diff --git a/verilog/analysis/checkers/endif_comment_rule.h b/verilog/analysis/checkers/endif_comment_rule.h index bee2c2401..d01c8bd9d 100644 --- a/verilog/analysis/checkers/endif_comment_rule.h +++ b/verilog/analysis/checkers/endif_comment_rule.h @@ -17,7 +17,6 @@ #include #include -#include #include "common/analysis/lint_rule_status.h" #include "common/analysis/token_stream_lint_rule.h" diff --git a/verilog/analysis/checkers/endif_comment_rule_test.cc b/verilog/analysis/checkers/endif_comment_rule_test.cc index a2335f4fd..52351f3fa 100644 --- a/verilog/analysis/checkers/endif_comment_rule_test.cc +++ b/verilog/analysis/checkers/endif_comment_rule_test.cc @@ -18,7 +18,6 @@ #include "common/analysis/linter_test_utils.h" #include "common/analysis/token_stream_linter_test_utils.h" -#include "common/text/symbol.h" #include "gtest/gtest.h" #include "verilog/analysis/verilog_analyzer.h" #include "verilog/parser/verilog_token_enum.h" diff --git a/verilog/analysis/checkers/enum_name_style_rule.h b/verilog/analysis/checkers/enum_name_style_rule.h index 219d765bc..dcbf4f229 100644 --- a/verilog/analysis/checkers/enum_name_style_rule.h +++ b/verilog/analysis/checkers/enum_name_style_rule.h @@ -16,7 +16,6 @@ #define VERIBLE_VERILOG_ANALYSIS_CHECKERS_ENUM_NAME_STYLE_RULE_H_ #include -#include #include "common/analysis/lint_rule_status.h" #include "common/analysis/syntax_tree_lint_rule.h" diff --git a/verilog/analysis/checkers/enum_name_style_rule_test.cc b/verilog/analysis/checkers/enum_name_style_rule_test.cc index 381349def..517f4ce58 100644 --- a/verilog/analysis/checkers/enum_name_style_rule_test.cc +++ b/verilog/analysis/checkers/enum_name_style_rule_test.cc @@ -18,9 +18,7 @@ #include "common/analysis/linter_test_utils.h" #include "common/analysis/syntax_tree_linter_test_utils.h" -#include "common/text/symbol.h" #include "gtest/gtest.h" -#include "verilog/CST/verilog_nonterminals.h" #include "verilog/analysis/verilog_analyzer.h" #include "verilog/parser/verilog_token_enum.h" diff --git a/verilog/analysis/checkers/explicit_function_lifetime_rule.cc b/verilog/analysis/checkers/explicit_function_lifetime_rule.cc index 45eb83a43..81a7727ce 100644 --- a/verilog/analysis/checkers/explicit_function_lifetime_rule.cc +++ b/verilog/analysis/checkers/explicit_function_lifetime_rule.cc @@ -22,6 +22,7 @@ #include "common/analysis/matcher/matcher.h" #include "common/text/symbol.h" #include "common/text/syntax_tree_context.h" +#include "common/text/token_info.h" #include "common/util/logging.h" #include "verilog/CST/context_functions.h" #include "verilog/CST/functions.h" diff --git a/verilog/analysis/checkers/explicit_function_lifetime_rule.h b/verilog/analysis/checkers/explicit_function_lifetime_rule.h index 168b6a074..e8beb94ef 100644 --- a/verilog/analysis/checkers/explicit_function_lifetime_rule.h +++ b/verilog/analysis/checkers/explicit_function_lifetime_rule.h @@ -16,7 +16,6 @@ #define VERIBLE_VERILOG_ANALYSIS_CHECKERS_EXPLICIT_FUNCTION_LIFETIME_RULE_H_ #include -#include #include "common/analysis/lint_rule_status.h" #include "common/analysis/syntax_tree_lint_rule.h" diff --git a/verilog/analysis/checkers/explicit_function_lifetime_rule_test.cc b/verilog/analysis/checkers/explicit_function_lifetime_rule_test.cc index 4ddb43873..6294282d9 100644 --- a/verilog/analysis/checkers/explicit_function_lifetime_rule_test.cc +++ b/verilog/analysis/checkers/explicit_function_lifetime_rule_test.cc @@ -18,9 +18,7 @@ #include "common/analysis/linter_test_utils.h" #include "common/analysis/syntax_tree_linter_test_utils.h" -#include "common/text/symbol.h" #include "gtest/gtest.h" -#include "verilog/CST/verilog_nonterminals.h" #include "verilog/analysis/verilog_analyzer.h" #include "verilog/parser/verilog_token_enum.h" diff --git a/verilog/analysis/checkers/explicit_function_task_parameter_type_rule.cc b/verilog/analysis/checkers/explicit_function_task_parameter_type_rule.cc index c2a0bb3e1..1b2ae3646 100644 --- a/verilog/analysis/checkers/explicit_function_task_parameter_type_rule.cc +++ b/verilog/analysis/checkers/explicit_function_task_parameter_type_rule.cc @@ -20,7 +20,6 @@ #include "common/analysis/lint_rule_status.h" #include "common/analysis/matcher/bound_symbol_manager.h" #include "common/analysis/matcher/matcher.h" -#include "common/text/concrete_syntax_leaf.h" #include "common/text/symbol.h" #include "common/text/syntax_tree_context.h" #include "common/util/logging.h" diff --git a/verilog/analysis/checkers/explicit_function_task_parameter_type_rule.h b/verilog/analysis/checkers/explicit_function_task_parameter_type_rule.h index 44f2cd92c..85eaffaf7 100644 --- a/verilog/analysis/checkers/explicit_function_task_parameter_type_rule.h +++ b/verilog/analysis/checkers/explicit_function_task_parameter_type_rule.h @@ -16,7 +16,6 @@ #define VERIBLE_VERILOG_ANALYSIS_CHECKERS_EXPLICIT_FUNCTION_TASK_PARAMETER_TYPE_RULE_H_ #include -#include #include "common/analysis/lint_rule_status.h" #include "common/analysis/syntax_tree_lint_rule.h" diff --git a/verilog/analysis/checkers/explicit_function_task_parameter_type_rule_test.cc b/verilog/analysis/checkers/explicit_function_task_parameter_type_rule_test.cc index 0f38a1a67..d27a88f48 100644 --- a/verilog/analysis/checkers/explicit_function_task_parameter_type_rule_test.cc +++ b/verilog/analysis/checkers/explicit_function_task_parameter_type_rule_test.cc @@ -16,15 +16,8 @@ #include -#include "absl/memory/memory.h" -#include "absl/status/status.h" -#include "common/analysis/lint_rule_status.h" #include "common/analysis/linter_test_utils.h" -#include "common/analysis/syntax_tree_lint_rule.h" -#include "common/analysis/syntax_tree_linter.h" #include "common/analysis/syntax_tree_linter_test_utils.h" -#include "common/text/symbol.h" -#include "common/text/token_info.h" #include "gtest/gtest.h" #include "verilog/analysis/verilog_analyzer.h" #include "verilog/parser/verilog_token_enum.h" diff --git a/verilog/analysis/checkers/explicit_parameter_storage_type_rule.cc b/verilog/analysis/checkers/explicit_parameter_storage_type_rule.cc index ef74176bc..ce50d3801 100644 --- a/verilog/analysis/checkers/explicit_parameter_storage_type_rule.cc +++ b/verilog/analysis/checkers/explicit_parameter_storage_type_rule.cc @@ -26,6 +26,7 @@ #include "common/text/config_utils.h" #include "common/text/symbol.h" #include "common/text/syntax_tree_context.h" +#include "common/text/token_info.h" #include "common/util/logging.h" #include "verilog/CST/parameters.h" #include "verilog/CST/verilog_matchers.h" diff --git a/verilog/analysis/checkers/explicit_parameter_storage_type_rule.h b/verilog/analysis/checkers/explicit_parameter_storage_type_rule.h index f1e98ae95..7cb786144 100644 --- a/verilog/analysis/checkers/explicit_parameter_storage_type_rule.h +++ b/verilog/analysis/checkers/explicit_parameter_storage_type_rule.h @@ -16,7 +16,6 @@ #define VERIBLE_VERILOG_ANALYSIS_CHECKERS_EXPLICIT_PARAMETER_STORAGE_TYPE_RULE_H_ #include -#include #include "absl/strings/string_view.h" #include "common/analysis/lint_rule_status.h" diff --git a/verilog/analysis/checkers/explicit_parameter_storage_type_rule_test.cc b/verilog/analysis/checkers/explicit_parameter_storage_type_rule_test.cc index 2c2d53848..84bbb9403 100644 --- a/verilog/analysis/checkers/explicit_parameter_storage_type_rule_test.cc +++ b/verilog/analysis/checkers/explicit_parameter_storage_type_rule_test.cc @@ -19,9 +19,7 @@ #include "absl/strings/match.h" #include "common/analysis/linter_test_utils.h" #include "common/analysis/syntax_tree_linter_test_utils.h" -#include "common/text/symbol.h" #include "gtest/gtest.h" -#include "verilog/CST/verilog_nonterminals.h" #include "verilog/analysis/verilog_analyzer.h" #include "verilog/parser/verilog_token_enum.h" diff --git a/verilog/analysis/checkers/explicit_task_lifetime_rule.cc b/verilog/analysis/checkers/explicit_task_lifetime_rule.cc index bf787680f..e1782b866 100644 --- a/verilog/analysis/checkers/explicit_task_lifetime_rule.cc +++ b/verilog/analysis/checkers/explicit_task_lifetime_rule.cc @@ -22,6 +22,7 @@ #include "common/analysis/matcher/matcher.h" #include "common/text/symbol.h" #include "common/text/syntax_tree_context.h" +#include "common/text/token_info.h" #include "common/text/tree_utils.h" #include "verilog/CST/context_functions.h" #include "verilog/CST/identifier.h" diff --git a/verilog/analysis/checkers/explicit_task_lifetime_rule.h b/verilog/analysis/checkers/explicit_task_lifetime_rule.h index 15c11dd78..889c4e1f6 100644 --- a/verilog/analysis/checkers/explicit_task_lifetime_rule.h +++ b/verilog/analysis/checkers/explicit_task_lifetime_rule.h @@ -16,7 +16,6 @@ #define VERIBLE_VERILOG_ANALYSIS_CHECKERS_EXPLICIT_TASK_LIFETIME_RULE_H_ #include -#include #include "common/analysis/lint_rule_status.h" #include "common/analysis/matcher/matcher.h" diff --git a/verilog/analysis/checkers/explicit_task_lifetime_rule_test.cc b/verilog/analysis/checkers/explicit_task_lifetime_rule_test.cc index cf0844d7e..8224b2a9c 100644 --- a/verilog/analysis/checkers/explicit_task_lifetime_rule_test.cc +++ b/verilog/analysis/checkers/explicit_task_lifetime_rule_test.cc @@ -18,9 +18,7 @@ #include "common/analysis/linter_test_utils.h" #include "common/analysis/syntax_tree_linter_test_utils.h" -#include "common/text/symbol.h" #include "gtest/gtest.h" -#include "verilog/CST/verilog_nonterminals.h" #include "verilog/analysis/verilog_analyzer.h" #include "verilog/parser/verilog_token_enum.h" diff --git a/verilog/analysis/checkers/forbid_consecutive_null_statements_rule.cc b/verilog/analysis/checkers/forbid_consecutive_null_statements_rule.cc index ca47eacd8..467c181ff 100644 --- a/verilog/analysis/checkers/forbid_consecutive_null_statements_rule.cc +++ b/verilog/analysis/checkers/forbid_consecutive_null_statements_rule.cc @@ -18,10 +18,9 @@ #include #include "absl/strings/string_view.h" -#include "common/analysis/matcher/bound_symbol_manager.h" -#include "common/analysis/syntax_tree_lint_rule.h" #include "common/text/symbol.h" #include "common/text/syntax_tree_context.h" +#include "verilog/CST/verilog_nonterminals.h" #include "verilog/analysis/descriptions.h" #include "verilog/analysis/lint_rule_registry.h" diff --git a/verilog/analysis/checkers/forbid_consecutive_null_statements_rule.h b/verilog/analysis/checkers/forbid_consecutive_null_statements_rule.h index d04e3816f..6bbbee32d 100644 --- a/verilog/analysis/checkers/forbid_consecutive_null_statements_rule.h +++ b/verilog/analysis/checkers/forbid_consecutive_null_statements_rule.h @@ -16,7 +16,6 @@ #define VERIBLE_VERILOG_ANALYSIS_CHECKERS_FORBID_CONSECUTIVE_NULL_STATEMENTS_RULE_H_ #include -#include #include "common/analysis/lint_rule_status.h" #include "common/analysis/matcher/matcher.h" diff --git a/verilog/analysis/checkers/forbid_consecutive_null_statements_rule_test.cc b/verilog/analysis/checkers/forbid_consecutive_null_statements_rule_test.cc index bddf5de87..cbde0bf7a 100644 --- a/verilog/analysis/checkers/forbid_consecutive_null_statements_rule_test.cc +++ b/verilog/analysis/checkers/forbid_consecutive_null_statements_rule_test.cc @@ -18,10 +18,7 @@ #include "common/analysis/linter_test_utils.h" #include "common/analysis/syntax_tree_linter_test_utils.h" -#include "common/text/symbol.h" #include "gtest/gtest.h" -#include "verilog/CST/verilog_nonterminals.h" -#include "verilog/CST/verilog_treebuilder_utils.h" #include "verilog/analysis/verilog_analyzer.h" namespace verilog { diff --git a/verilog/analysis/checkers/forbid_defparam_rule.cc b/verilog/analysis/checkers/forbid_defparam_rule.cc index bd6d37a7b..9965a1429 100644 --- a/verilog/analysis/checkers/forbid_defparam_rule.cc +++ b/verilog/analysis/checkers/forbid_defparam_rule.cc @@ -24,6 +24,7 @@ #include "common/text/syntax_tree_context.h" #include "common/util/logging.h" #include "verilog/CST/verilog_matchers.h" +#include "verilog/CST/verilog_nonterminals.h" #include "verilog/analysis/descriptions.h" #include "verilog/analysis/lint_rule_registry.h" diff --git a/verilog/analysis/checkers/forbid_defparam_rule.h b/verilog/analysis/checkers/forbid_defparam_rule.h index ab3144d85..86bc508e7 100644 --- a/verilog/analysis/checkers/forbid_defparam_rule.h +++ b/verilog/analysis/checkers/forbid_defparam_rule.h @@ -16,7 +16,6 @@ #define VERIBLE_VERILOG_ANALYSIS_CHECKERS_FORBID_DEFPARAM_RULE_H_ #include -#include #include "common/analysis/lint_rule_status.h" #include "common/analysis/syntax_tree_lint_rule.h" diff --git a/verilog/analysis/checkers/forbid_defparam_rule_test.cc b/verilog/analysis/checkers/forbid_defparam_rule_test.cc index 68d0cc47f..f829ca7b4 100644 --- a/verilog/analysis/checkers/forbid_defparam_rule_test.cc +++ b/verilog/analysis/checkers/forbid_defparam_rule_test.cc @@ -18,9 +18,7 @@ #include "common/analysis/linter_test_utils.h" #include "common/analysis/syntax_tree_linter_test_utils.h" -#include "common/text/symbol.h" #include "gtest/gtest.h" -#include "verilog/CST/verilog_nonterminals.h" #include "verilog/analysis/verilog_analyzer.h" #include "verilog/parser/verilog_token_enum.h" diff --git a/verilog/analysis/checkers/forbid_negative_array_dim.cc b/verilog/analysis/checkers/forbid_negative_array_dim.cc index 85a0c58d0..c87c77887 100644 --- a/verilog/analysis/checkers/forbid_negative_array_dim.cc +++ b/verilog/analysis/checkers/forbid_negative_array_dim.cc @@ -22,9 +22,11 @@ #include "common/analysis/matcher/matcher.h" #include "common/text/symbol.h" #include "common/text/syntax_tree_context.h" +#include "common/text/token_info.h" #include "common/text/tree_utils.h" #include "verilog/CST/expression.h" #include "verilog/CST/verilog_matchers.h" +#include "verilog/CST/verilog_nonterminals.h" #include "verilog/analysis/descriptions.h" #include "verilog/analysis/lint_rule_registry.h" diff --git a/verilog/analysis/checkers/forbid_negative_array_dim.h b/verilog/analysis/checkers/forbid_negative_array_dim.h index a15077830..e3c4c95f8 100644 --- a/verilog/analysis/checkers/forbid_negative_array_dim.h +++ b/verilog/analysis/checkers/forbid_negative_array_dim.h @@ -16,7 +16,6 @@ #define VERIBLE_VERILOG_ANALYSIS_CHECKERS_FORBID_NEGATIVE_ARRAY_DIM_RULE_H_ #include -#include #include "common/analysis/lint_rule_status.h" #include "common/analysis/syntax_tree_lint_rule.h" diff --git a/verilog/analysis/checkers/forbidden_anonymous_enums_rule.cc b/verilog/analysis/checkers/forbidden_anonymous_enums_rule.cc index ec0d9cae3..d0e27ff34 100644 --- a/verilog/analysis/checkers/forbidden_anonymous_enums_rule.cc +++ b/verilog/analysis/checkers/forbidden_anonymous_enums_rule.cc @@ -23,6 +23,7 @@ #include "common/text/symbol.h" #include "common/text/syntax_tree_context.h" #include "verilog/CST/verilog_matchers.h" +#include "verilog/CST/verilog_nonterminals.h" #include "verilog/analysis/descriptions.h" #include "verilog/analysis/lint_rule_registry.h" diff --git a/verilog/analysis/checkers/forbidden_anonymous_enums_rule.h b/verilog/analysis/checkers/forbidden_anonymous_enums_rule.h index fe3f29335..1f8dfaa39 100644 --- a/verilog/analysis/checkers/forbidden_anonymous_enums_rule.h +++ b/verilog/analysis/checkers/forbidden_anonymous_enums_rule.h @@ -16,7 +16,6 @@ #define VERIBLE_VERILOG_ANALYSIS_CHECKERS_FORBIDDEN_ANONYMOUS_ENUMS_RULE_H_ #include -#include #include "common/analysis/lint_rule_status.h" #include "common/analysis/syntax_tree_lint_rule.h" diff --git a/verilog/analysis/checkers/forbidden_anonymous_enums_rule_test.cc b/verilog/analysis/checkers/forbidden_anonymous_enums_rule_test.cc index d29124d36..5f5ea0182 100644 --- a/verilog/analysis/checkers/forbidden_anonymous_enums_rule_test.cc +++ b/verilog/analysis/checkers/forbidden_anonymous_enums_rule_test.cc @@ -17,7 +17,6 @@ #include #include "common/analysis/syntax_tree_linter_test_utils.h" -#include "common/text/symbol.h" #include "gtest/gtest.h" #include "verilog/analysis/verilog_analyzer.h" #include "verilog/parser/verilog_token_enum.h" diff --git a/verilog/analysis/checkers/forbidden_anonymous_structs_unions_rule.cc b/verilog/analysis/checkers/forbidden_anonymous_structs_unions_rule.cc index 169ff905b..a5948e491 100644 --- a/verilog/analysis/checkers/forbidden_anonymous_structs_unions_rule.cc +++ b/verilog/analysis/checkers/forbidden_anonymous_structs_unions_rule.cc @@ -24,6 +24,7 @@ #include "common/text/symbol.h" #include "common/text/syntax_tree_context.h" #include "verilog/CST/verilog_matchers.h" +#include "verilog/CST/verilog_nonterminals.h" #include "verilog/analysis/descriptions.h" #include "verilog/analysis/lint_rule_registry.h" diff --git a/verilog/analysis/checkers/forbidden_anonymous_structs_unions_rule.h b/verilog/analysis/checkers/forbidden_anonymous_structs_unions_rule.h index 663f1bb94..900ee131e 100644 --- a/verilog/analysis/checkers/forbidden_anonymous_structs_unions_rule.h +++ b/verilog/analysis/checkers/forbidden_anonymous_structs_unions_rule.h @@ -16,7 +16,6 @@ #define VERIBLE_VERILOG_ANALYSIS_CHECKERS_FORBIDDEN_ANONYMOUS_STRUCTS_UNIONS_RULE_H_ // NOLINT #include -#include #include "absl/strings/string_view.h" #include "common/analysis/lint_rule_status.h" diff --git a/verilog/analysis/checkers/forbidden_anonymous_structs_unions_rule_test.cc b/verilog/analysis/checkers/forbidden_anonymous_structs_unions_rule_test.cc index 2cee7749f..7995bf8ba 100644 --- a/verilog/analysis/checkers/forbidden_anonymous_structs_unions_rule_test.cc +++ b/verilog/analysis/checkers/forbidden_anonymous_structs_unions_rule_test.cc @@ -18,7 +18,6 @@ #include "absl/strings/match.h" #include "common/analysis/syntax_tree_linter_test_utils.h" -#include "common/text/symbol.h" #include "gtest/gtest.h" #include "verilog/analysis/verilog_analyzer.h" #include "verilog/parser/verilog_token_enum.h" diff --git a/verilog/analysis/checkers/forbidden_macro_rule_test.cc b/verilog/analysis/checkers/forbidden_macro_rule_test.cc index 55a2acffb..279ecebc9 100644 --- a/verilog/analysis/checkers/forbidden_macro_rule_test.cc +++ b/verilog/analysis/checkers/forbidden_macro_rule_test.cc @@ -18,9 +18,7 @@ #include "common/analysis/linter_test_utils.h" #include "common/analysis/syntax_tree_linter_test_utils.h" -#include "common/text/symbol.h" #include "gtest/gtest.h" -#include "verilog/CST/verilog_treebuilder_utils.h" #include "verilog/analysis/verilog_analyzer.h" #include "verilog/parser/verilog_token_enum.h" diff --git a/verilog/analysis/checkers/forbidden_symbol_rule_test.cc b/verilog/analysis/checkers/forbidden_symbol_rule_test.cc index c9a7bfd2a..3159c19e0 100644 --- a/verilog/analysis/checkers/forbidden_symbol_rule_test.cc +++ b/verilog/analysis/checkers/forbidden_symbol_rule_test.cc @@ -18,9 +18,7 @@ #include "common/analysis/linter_test_utils.h" #include "common/analysis/syntax_tree_linter_test_utils.h" -#include "common/text/symbol.h" #include "gtest/gtest.h" -#include "verilog/CST/verilog_treebuilder_utils.h" #include "verilog/analysis/verilog_analyzer.h" #include "verilog/parser/verilog_token_enum.h" diff --git a/verilog/analysis/checkers/generate_label_prefix_rule.cc b/verilog/analysis/checkers/generate_label_prefix_rule.cc index 54847c9e1..cfeea8338 100644 --- a/verilog/analysis/checkers/generate_label_prefix_rule.cc +++ b/verilog/analysis/checkers/generate_label_prefix_rule.cc @@ -21,9 +21,10 @@ #include "common/analysis/matcher/matcher.h" #include "common/text/symbol.h" #include "common/text/syntax_tree_context.h" -#include "verilog/CST/identifier.h" +#include "common/text/token_info.h" #include "verilog/CST/seq_block.h" #include "verilog/CST/verilog_matchers.h" +#include "verilog/CST/verilog_nonterminals.h" #include "verilog/analysis/descriptions.h" #include "verilog/analysis/lint_rule_registry.h" diff --git a/verilog/analysis/checkers/generate_label_prefix_rule.h b/verilog/analysis/checkers/generate_label_prefix_rule.h index f9abf9f07..ee39665c3 100644 --- a/verilog/analysis/checkers/generate_label_prefix_rule.h +++ b/verilog/analysis/checkers/generate_label_prefix_rule.h @@ -16,10 +16,8 @@ #define VERIBLE_VERILOG_ANALYSIS_CHECKERS_GENERATE_LABEL_PREFIX_RULE_H_ #include -#include #include "common/analysis/lint_rule_status.h" -#include "common/analysis/matcher/core_matchers.h" #include "common/analysis/syntax_tree_lint_rule.h" #include "common/text/symbol.h" #include "common/text/syntax_tree_context.h" diff --git a/verilog/analysis/checkers/generate_label_prefix_rule_test.cc b/verilog/analysis/checkers/generate_label_prefix_rule_test.cc index bbf951eaa..8bc5c7eb9 100644 --- a/verilog/analysis/checkers/generate_label_prefix_rule_test.cc +++ b/verilog/analysis/checkers/generate_label_prefix_rule_test.cc @@ -18,10 +18,7 @@ #include "common/analysis/linter_test_utils.h" #include "common/analysis/syntax_tree_linter_test_utils.h" -#include "common/text/symbol.h" #include "gtest/gtest.h" -#include "verilog/CST/verilog_nonterminals.h" -#include "verilog/CST/verilog_treebuilder_utils.h" #include "verilog/analysis/verilog_analyzer.h" #include "verilog/parser/verilog_token_enum.h" diff --git a/verilog/analysis/checkers/generate_label_rule.h b/verilog/analysis/checkers/generate_label_rule.h index e30fcd368..f2dd0486a 100644 --- a/verilog/analysis/checkers/generate_label_rule.h +++ b/verilog/analysis/checkers/generate_label_rule.h @@ -16,7 +16,6 @@ #define VERIBLE_VERILOG_ANALYSIS_CHECKERS_GENERATE_LABEL_RULE_H_ #include -#include #include "common/analysis/lint_rule_status.h" #include "common/analysis/syntax_tree_lint_rule.h" diff --git a/verilog/analysis/checkers/generate_label_rule_test.cc b/verilog/analysis/checkers/generate_label_rule_test.cc index 12a3e2922..b7f125ff0 100644 --- a/verilog/analysis/checkers/generate_label_rule_test.cc +++ b/verilog/analysis/checkers/generate_label_rule_test.cc @@ -18,10 +18,7 @@ #include "common/analysis/linter_test_utils.h" #include "common/analysis/syntax_tree_linter_test_utils.h" -#include "common/text/symbol.h" #include "gtest/gtest.h" -#include "verilog/CST/verilog_nonterminals.h" -#include "verilog/CST/verilog_treebuilder_utils.h" #include "verilog/analysis/verilog_analyzer.h" #include "verilog/parser/verilog_token_enum.h" diff --git a/verilog/analysis/checkers/interface_name_style_rule.cc b/verilog/analysis/checkers/interface_name_style_rule.cc index 1cf76e779..c8554246e 100644 --- a/verilog/analysis/checkers/interface_name_style_rule.cc +++ b/verilog/analysis/checkers/interface_name_style_rule.cc @@ -24,6 +24,7 @@ #include "common/strings/naming_utils.h" #include "common/text/symbol.h" #include "common/text/syntax_tree_context.h" +#include "common/text/token_info.h" #include "verilog/CST/module.h" #include "verilog/CST/type.h" #include "verilog/CST/verilog_matchers.h" diff --git a/verilog/analysis/checkers/interface_name_style_rule.h b/verilog/analysis/checkers/interface_name_style_rule.h index a393df3d8..5a82a5ace 100644 --- a/verilog/analysis/checkers/interface_name_style_rule.h +++ b/verilog/analysis/checkers/interface_name_style_rule.h @@ -16,7 +16,6 @@ #define VERIBLE_VERILOG_ANALYSIS_CHECKERS_INTERFACE_NAME_STYLE_RULE_H_ #include -#include #include "common/analysis/lint_rule_status.h" #include "common/analysis/syntax_tree_lint_rule.h" diff --git a/verilog/analysis/checkers/interface_name_style_rule_test.cc b/verilog/analysis/checkers/interface_name_style_rule_test.cc index 8fc1b3508..2a9478128 100644 --- a/verilog/analysis/checkers/interface_name_style_rule_test.cc +++ b/verilog/analysis/checkers/interface_name_style_rule_test.cc @@ -18,9 +18,7 @@ #include "common/analysis/linter_test_utils.h" #include "common/analysis/syntax_tree_linter_test_utils.h" -#include "common/text/symbol.h" #include "gtest/gtest.h" -#include "verilog/CST/verilog_nonterminals.h" #include "verilog/analysis/verilog_analyzer.h" #include "verilog/parser/verilog_token_enum.h" diff --git a/verilog/analysis/checkers/legacy_generate_region_rule.cc b/verilog/analysis/checkers/legacy_generate_region_rule.cc index 706efbbe3..b0a3847ed 100644 --- a/verilog/analysis/checkers/legacy_generate_region_rule.cc +++ b/verilog/analysis/checkers/legacy_generate_region_rule.cc @@ -18,14 +18,13 @@ #include "absl/strings/string_view.h" #include "common/analysis/lint_rule_status.h" -#include "common/analysis/matcher/bound_symbol_manager.h" -#include "common/analysis/matcher/matcher.h" -#include "common/strings/naming_utils.h" +#include "common/analysis/matcher/matcher_builders.h" #include "common/text/symbol.h" #include "common/text/tree_utils.h" #include "common/util/logging.h" -#include "verilog/CST/verilog_matchers.h" +#include "verilog/CST/verilog_nonterminals.h" #include "verilog/analysis/lint_rule_registry.h" +#include "verilog/parser/verilog_token_enum.h" namespace verilog { namespace analysis { diff --git a/verilog/analysis/checkers/legacy_generate_region_rule.h b/verilog/analysis/checkers/legacy_generate_region_rule.h index 620cd1cce..8fc748676 100644 --- a/verilog/analysis/checkers/legacy_generate_region_rule.h +++ b/verilog/analysis/checkers/legacy_generate_region_rule.h @@ -16,7 +16,6 @@ #define VERIBLE_VERILOG_ANALYSIS_CHECKERS_LEGACY_GENERATE_REGION_RULE_H_ #include -#include #include "common/analysis/lint_rule_status.h" #include "common/analysis/syntax_tree_lint_rule.h" diff --git a/verilog/analysis/checkers/legacy_generate_region_rule_test.cc b/verilog/analysis/checkers/legacy_generate_region_rule_test.cc index 591f5dfe1..498836307 100644 --- a/verilog/analysis/checkers/legacy_generate_region_rule_test.cc +++ b/verilog/analysis/checkers/legacy_generate_region_rule_test.cc @@ -19,7 +19,6 @@ #include "common/analysis/linter_test_utils.h" #include "common/analysis/syntax_tree_linter_test_utils.h" #include "gtest/gtest.h" -#include "verilog/CST/verilog_nonterminals.h" #include "verilog/analysis/verilog_analyzer.h" #include "verilog/parser/verilog_token_enum.h" diff --git a/verilog/analysis/checkers/legacy_genvar_declaration_rule.cc b/verilog/analysis/checkers/legacy_genvar_declaration_rule.cc index 270d218f1..5c0ff7ccb 100644 --- a/verilog/analysis/checkers/legacy_genvar_declaration_rule.cc +++ b/verilog/analysis/checkers/legacy_genvar_declaration_rule.cc @@ -18,13 +18,10 @@ #include "absl/strings/string_view.h" #include "common/analysis/lint_rule_status.h" -#include "common/analysis/matcher/bound_symbol_manager.h" -#include "common/analysis/matcher/matcher.h" -#include "common/strings/naming_utils.h" #include "common/text/symbol.h" #include "common/text/syntax_tree_context.h" #include "verilog/CST/identifier.h" -#include "verilog/CST/verilog_matchers.h" +#include "verilog/CST/verilog_nonterminals.h" #include "verilog/analysis/lint_rule_registry.h" namespace verilog { diff --git a/verilog/analysis/checkers/legacy_genvar_declaration_rule.h b/verilog/analysis/checkers/legacy_genvar_declaration_rule.h index 062bb8faa..121d7f448 100644 --- a/verilog/analysis/checkers/legacy_genvar_declaration_rule.h +++ b/verilog/analysis/checkers/legacy_genvar_declaration_rule.h @@ -16,7 +16,6 @@ #define VERIBLE_VERILOG_ANALYSIS_CHECKERS_LEGACY_GENVAR_DECLARATION_RULE_H_ #include -#include #include "common/analysis/lint_rule_status.h" #include "common/analysis/syntax_tree_lint_rule.h" diff --git a/verilog/analysis/checkers/legacy_genvar_declaration_rule_test.cc b/verilog/analysis/checkers/legacy_genvar_declaration_rule_test.cc index 5f394e017..6c7f30e7f 100644 --- a/verilog/analysis/checkers/legacy_genvar_declaration_rule_test.cc +++ b/verilog/analysis/checkers/legacy_genvar_declaration_rule_test.cc @@ -18,9 +18,7 @@ #include "common/analysis/linter_test_utils.h" #include "common/analysis/syntax_tree_linter_test_utils.h" -#include "common/text/symbol.h" #include "gtest/gtest.h" -#include "verilog/CST/verilog_nonterminals.h" #include "verilog/analysis/verilog_analyzer.h" #include "verilog/parser/verilog_token_enum.h" diff --git a/verilog/analysis/checkers/line_length_rule.cc b/verilog/analysis/checkers/line_length_rule.cc index 550e6616e..6c92d47f4 100644 --- a/verilog/analysis/checkers/line_length_rule.cc +++ b/verilog/analysis/checkers/line_length_rule.cc @@ -18,7 +18,6 @@ #include #include -#include "absl/strings/ascii.h" #include "absl/strings/match.h" #include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" diff --git a/verilog/analysis/checkers/line_length_rule.h b/verilog/analysis/checkers/line_length_rule.h index 75552285b..6c312dd2a 100644 --- a/verilog/analysis/checkers/line_length_rule.h +++ b/verilog/analysis/checkers/line_length_rule.h @@ -16,7 +16,6 @@ #define VERIBLE_VERILOG_ANALYSIS_CHECKERS_LINE_LENGTH_RULE_H_ #include -#include #include "absl/status/status.h" #include "absl/strings/string_view.h" diff --git a/verilog/analysis/checkers/line_length_rule_test.cc b/verilog/analysis/checkers/line_length_rule_test.cc index 904140a12..9a38f8517 100644 --- a/verilog/analysis/checkers/line_length_rule_test.cc +++ b/verilog/analysis/checkers/line_length_rule_test.cc @@ -20,7 +20,6 @@ #include "absl/strings/match.h" #include "common/analysis/linter_test_utils.h" #include "common/analysis/text_structure_linter_test_utils.h" -#include "common/text/symbol.h" #include "common/util/logging.h" #include "gtest/gtest.h" #include "verilog/analysis/verilog_analyzer.h" diff --git a/verilog/analysis/checkers/macro_name_style_rule.h b/verilog/analysis/checkers/macro_name_style_rule.h index 2f59f0fb7..969d4ad24 100644 --- a/verilog/analysis/checkers/macro_name_style_rule.h +++ b/verilog/analysis/checkers/macro_name_style_rule.h @@ -16,7 +16,6 @@ #define VERIBLE_VERILOG_ANALYSIS_CHECKERS_MACRO_NAME_STYLE_RULE_H_ #include -#include #include "common/analysis/lint_rule_status.h" #include "common/analysis/token_stream_lint_rule.h" diff --git a/verilog/analysis/checkers/macro_name_style_rule_test.cc b/verilog/analysis/checkers/macro_name_style_rule_test.cc index 14b269d51..1a643a25b 100644 --- a/verilog/analysis/checkers/macro_name_style_rule_test.cc +++ b/verilog/analysis/checkers/macro_name_style_rule_test.cc @@ -18,7 +18,6 @@ #include "common/analysis/linter_test_utils.h" #include "common/analysis/token_stream_linter_test_utils.h" -#include "common/text/symbol.h" #include "gtest/gtest.h" #include "verilog/analysis/verilog_analyzer.h" #include "verilog/parser/verilog_token_enum.h" diff --git a/verilog/analysis/checkers/macro_string_concatenation_rule.h b/verilog/analysis/checkers/macro_string_concatenation_rule.h index 4d359c9c9..069edaa03 100644 --- a/verilog/analysis/checkers/macro_string_concatenation_rule.h +++ b/verilog/analysis/checkers/macro_string_concatenation_rule.h @@ -16,7 +16,6 @@ #define VERIBLE_VERILOG_ANALYSIS_CHECKERS_MACRO_STRING_CONCATENATION_RULE_H_ #include -#include #include "common/analysis/token_stream_lint_rule.h" #include "common/text/token_info.h" diff --git a/verilog/analysis/checkers/mismatched_labels_rule.cc b/verilog/analysis/checkers/mismatched_labels_rule.cc index 070c40f07..6496287c4 100644 --- a/verilog/analysis/checkers/mismatched_labels_rule.cc +++ b/verilog/analysis/checkers/mismatched_labels_rule.cc @@ -20,12 +20,9 @@ #include "common/analysis/lint_rule_status.h" #include "common/analysis/matcher/bound_symbol_manager.h" #include "common/analysis/matcher/matcher.h" -#include "common/analysis/syntax_tree_search.h" #include "common/text/concrete_syntax_tree.h" #include "common/text/symbol.h" #include "common/text/syntax_tree_context.h" -#include "common/text/tree_utils.h" -#include "verilog/CST/identifier.h" #include "verilog/CST/seq_block.h" #include "verilog/CST/verilog_matchers.h" #include "verilog/analysis/descriptions.h" diff --git a/verilog/analysis/checkers/mismatched_labels_rule.h b/verilog/analysis/checkers/mismatched_labels_rule.h index f55b47826..b44101eab 100644 --- a/verilog/analysis/checkers/mismatched_labels_rule.h +++ b/verilog/analysis/checkers/mismatched_labels_rule.h @@ -16,7 +16,6 @@ #define VERIBLE_VERILOG_ANALYSIS_CHECKERS_MISMATCHED_LABELS_RULE_H_ #include -#include #include "common/analysis/lint_rule_status.h" #include "common/analysis/syntax_tree_lint_rule.h" diff --git a/verilog/analysis/checkers/mismatched_labels_rule_test.cc b/verilog/analysis/checkers/mismatched_labels_rule_test.cc index f9fff7990..53b3ca0e2 100644 --- a/verilog/analysis/checkers/mismatched_labels_rule_test.cc +++ b/verilog/analysis/checkers/mismatched_labels_rule_test.cc @@ -18,9 +18,7 @@ #include "common/analysis/linter_test_utils.h" #include "common/analysis/syntax_tree_linter_test_utils.h" -#include "common/text/symbol.h" #include "gtest/gtest.h" -#include "verilog/CST/verilog_nonterminals.h" #include "verilog/analysis/verilog_analyzer.h" #include "verilog/parser/verilog_token_enum.h" diff --git a/verilog/analysis/checkers/module_begin_block_rule.h b/verilog/analysis/checkers/module_begin_block_rule.h index d0e5abf42..a0e3ae919 100644 --- a/verilog/analysis/checkers/module_begin_block_rule.h +++ b/verilog/analysis/checkers/module_begin_block_rule.h @@ -16,7 +16,6 @@ #define VERIBLE_VERILOG_ANALYSIS_CHECKERS_MODULE_BEGIN_BLOCK_RULE_H_ #include -#include #include "common/analysis/lint_rule_status.h" #include "common/analysis/syntax_tree_lint_rule.h" diff --git a/verilog/analysis/checkers/module_begin_block_rule_test.cc b/verilog/analysis/checkers/module_begin_block_rule_test.cc index f2f3496f1..de6e22606 100644 --- a/verilog/analysis/checkers/module_begin_block_rule_test.cc +++ b/verilog/analysis/checkers/module_begin_block_rule_test.cc @@ -18,9 +18,7 @@ #include "common/analysis/linter_test_utils.h" #include "common/analysis/syntax_tree_linter_test_utils.h" -#include "common/text/symbol.h" #include "gtest/gtest.h" -#include "verilog/CST/verilog_nonterminals.h" #include "verilog/analysis/verilog_analyzer.h" #include "verilog/parser/verilog_token_enum.h" diff --git a/verilog/analysis/checkers/module_filename_rule.cc b/verilog/analysis/checkers/module_filename_rule.cc index f4220723e..624c9bf43 100644 --- a/verilog/analysis/checkers/module_filename_rule.cc +++ b/verilog/analysis/checkers/module_filename_rule.cc @@ -33,7 +33,7 @@ #include "common/util/file_util.h" #include "common/util/logging.h" #include "verilog/CST/module.h" -#include "verilog/CST/verilog_matchers.h" +#include "verilog/CST/verilog_nonterminals.h" #include "verilog/analysis/descriptions.h" #include "verilog/analysis/lint_rule_registry.h" diff --git a/verilog/analysis/checkers/module_filename_rule.h b/verilog/analysis/checkers/module_filename_rule.h index 9fa26bc13..81ada8a5d 100644 --- a/verilog/analysis/checkers/module_filename_rule.h +++ b/verilog/analysis/checkers/module_filename_rule.h @@ -16,7 +16,6 @@ #define VERIBLE_VERILOG_ANALYSIS_CHECKERS_MODULE_FILENAME_RULE_H_ #include -#include #include "absl/strings/string_view.h" #include "common/analysis/lint_rule_status.h" diff --git a/verilog/analysis/checkers/module_filename_rule_test.cc b/verilog/analysis/checkers/module_filename_rule_test.cc index eb5c591bf..b4bd5a1e5 100644 --- a/verilog/analysis/checkers/module_filename_rule_test.cc +++ b/verilog/analysis/checkers/module_filename_rule_test.cc @@ -20,7 +20,6 @@ #include "absl/strings/string_view.h" #include "common/analysis/linter_test_utils.h" #include "common/analysis/text_structure_linter_test_utils.h" -#include "common/text/symbol.h" #include "gtest/gtest.h" #include "verilog/analysis/verilog_analyzer.h" #include "verilog/parser/verilog_token_enum.h" diff --git a/verilog/analysis/checkers/module_instantiation_rules.h b/verilog/analysis/checkers/module_instantiation_rules.h index dbc6c0fb6..1aea8a841 100644 --- a/verilog/analysis/checkers/module_instantiation_rules.h +++ b/verilog/analysis/checkers/module_instantiation_rules.h @@ -16,7 +16,6 @@ #define VERIBLE_VERILOG_ANALYSIS_CHECKERS_MODULE_INSTANTIATION_RULES_H_ #include -#include #include "common/analysis/lint_rule_status.h" #include "common/analysis/syntax_tree_lint_rule.h" diff --git a/verilog/analysis/checkers/module_instantiation_rules_test.cc b/verilog/analysis/checkers/module_instantiation_rules_test.cc index 785dcd29c..ae4a92cbd 100644 --- a/verilog/analysis/checkers/module_instantiation_rules_test.cc +++ b/verilog/analysis/checkers/module_instantiation_rules_test.cc @@ -18,10 +18,7 @@ #include "common/analysis/linter_test_utils.h" #include "common/analysis/syntax_tree_linter_test_utils.h" -#include "common/text/symbol.h" #include "gtest/gtest.h" -#include "verilog/CST/verilog_nonterminals.h" -#include "verilog/CST/verilog_treebuilder_utils.h" #include "verilog/analysis/verilog_analyzer.h" #include "verilog/parser/verilog_token_enum.h" diff --git a/verilog/analysis/checkers/no_tabs_rule.h b/verilog/analysis/checkers/no_tabs_rule.h index f16a06783..615168810 100644 --- a/verilog/analysis/checkers/no_tabs_rule.h +++ b/verilog/analysis/checkers/no_tabs_rule.h @@ -15,9 +15,7 @@ #ifndef VERIBLE_VERILOG_ANALYSIS_CHECKERS_NO_TABS_RULE_H_ #define VERIBLE_VERILOG_ANALYSIS_CHECKERS_NO_TABS_RULE_H_ -#include #include -#include #include "absl/strings/string_view.h" #include "common/analysis/line_lint_rule.h" diff --git a/verilog/analysis/checkers/no_tabs_rule_test.cc b/verilog/analysis/checkers/no_tabs_rule_test.cc index 4196297de..c22cec6e0 100644 --- a/verilog/analysis/checkers/no_tabs_rule_test.cc +++ b/verilog/analysis/checkers/no_tabs_rule_test.cc @@ -18,7 +18,6 @@ #include "common/analysis/line_linter_test_utils.h" #include "common/analysis/linter_test_utils.h" -#include "common/text/symbol.h" #include "gtest/gtest.h" #include "verilog/analysis/verilog_analyzer.h" #include "verilog/parser/verilog_token_enum.h" diff --git a/verilog/analysis/checkers/no_trailing_spaces_rule.h b/verilog/analysis/checkers/no_trailing_spaces_rule.h index be5684b12..4b9fa598a 100644 --- a/verilog/analysis/checkers/no_trailing_spaces_rule.h +++ b/verilog/analysis/checkers/no_trailing_spaces_rule.h @@ -15,9 +15,7 @@ #ifndef VERIBLE_VERILOG_ANALYSIS_CHECKERS_NO_TRAILING_SPACES_RULE_H_ #define VERIBLE_VERILOG_ANALYSIS_CHECKERS_NO_TRAILING_SPACES_RULE_H_ -#include #include -#include #include "absl/strings/string_view.h" #include "common/analysis/line_lint_rule.h" diff --git a/verilog/analysis/checkers/no_trailing_spaces_rule_test.cc b/verilog/analysis/checkers/no_trailing_spaces_rule_test.cc index 149b98fad..6bb50f88b 100644 --- a/verilog/analysis/checkers/no_trailing_spaces_rule_test.cc +++ b/verilog/analysis/checkers/no_trailing_spaces_rule_test.cc @@ -18,7 +18,6 @@ #include "common/analysis/line_linter_test_utils.h" #include "common/analysis/linter_test_utils.h" -#include "common/text/symbol.h" #include "gtest/gtest.h" #include "verilog/analysis/verilog_analyzer.h" #include "verilog/parser/verilog_token_enum.h" diff --git a/verilog/analysis/checkers/numeric_format_string_style_rule.h b/verilog/analysis/checkers/numeric_format_string_style_rule.h index 89a9b7b41..433489f86 100644 --- a/verilog/analysis/checkers/numeric_format_string_style_rule.h +++ b/verilog/analysis/checkers/numeric_format_string_style_rule.h @@ -18,7 +18,6 @@ #include #include #include -#include #include "common/analysis/lint_rule_status.h" #include "common/analysis/token_stream_lint_rule.h" diff --git a/verilog/analysis/checkers/one_module_per_file_rule.cc b/verilog/analysis/checkers/one_module_per_file_rule.cc index 8a4c9aaea..3e31fbaec 100644 --- a/verilog/analysis/checkers/one_module_per_file_rule.cc +++ b/verilog/analysis/checkers/one_module_per_file_rule.cc @@ -24,13 +24,10 @@ #include "absl/strings/string_view.h" #include "common/analysis/lint_rule_status.h" #include "common/analysis/syntax_tree_search.h" -#include "common/text/symbol.h" #include "common/text/text_structure.h" -#include "common/text/token_info.h" -#include "common/util/file_util.h" #include "common/util/logging.h" #include "verilog/CST/module.h" -#include "verilog/CST/verilog_matchers.h" +#include "verilog/CST/verilog_nonterminals.h" #include "verilog/analysis/descriptions.h" #include "verilog/analysis/lint_rule_registry.h" diff --git a/verilog/analysis/checkers/one_module_per_file_rule.h b/verilog/analysis/checkers/one_module_per_file_rule.h index 98304a7f9..fdb0001e4 100644 --- a/verilog/analysis/checkers/one_module_per_file_rule.h +++ b/verilog/analysis/checkers/one_module_per_file_rule.h @@ -16,7 +16,6 @@ #define VERIBLE_VERILOG_ANALYSIS_CHECKERS_ONE_MODULE_PER_FILE_RULE_H_ #include -#include #include "absl/strings/string_view.h" #include "common/analysis/lint_rule_status.h" diff --git a/verilog/analysis/checkers/one_module_per_file_rule_test.cc b/verilog/analysis/checkers/one_module_per_file_rule_test.cc index 731f8d215..d494ac084 100644 --- a/verilog/analysis/checkers/one_module_per_file_rule_test.cc +++ b/verilog/analysis/checkers/one_module_per_file_rule_test.cc @@ -18,7 +18,6 @@ #include "common/analysis/linter_test_utils.h" #include "common/analysis/text_structure_linter_test_utils.h" -#include "common/text/symbol.h" #include "gtest/gtest.h" #include "verilog/analysis/verilog_analyzer.h" #include "verilog/parser/verilog_token_enum.h" diff --git a/verilog/analysis/checkers/package_filename_rule.cc b/verilog/analysis/checkers/package_filename_rule.cc index c216ce73f..f5c1b2fb3 100644 --- a/verilog/analysis/checkers/package_filename_rule.cc +++ b/verilog/analysis/checkers/package_filename_rule.cc @@ -23,7 +23,6 @@ #include "absl/strings/str_cat.h" #include "absl/strings/str_split.h" #include "absl/strings/string_view.h" -#include "absl/strings/strip.h" #include "common/analysis/lint_rule_status.h" #include "common/analysis/syntax_tree_search.h" #include "common/text/config_utils.h" diff --git a/verilog/analysis/checkers/package_filename_rule.h b/verilog/analysis/checkers/package_filename_rule.h index c78e0c957..a6376f969 100644 --- a/verilog/analysis/checkers/package_filename_rule.h +++ b/verilog/analysis/checkers/package_filename_rule.h @@ -16,7 +16,6 @@ #define VERIBLE_VERILOG_ANALYSIS_CHECKERS_PACKAGE_FILENAME_RULE_H_ #include -#include #include "absl/strings/string_view.h" #include "common/analysis/lint_rule_status.h" diff --git a/verilog/analysis/checkers/package_filename_rule_test.cc b/verilog/analysis/checkers/package_filename_rule_test.cc index 36a0698ca..3608104cc 100644 --- a/verilog/analysis/checkers/package_filename_rule_test.cc +++ b/verilog/analysis/checkers/package_filename_rule_test.cc @@ -20,7 +20,6 @@ #include "absl/strings/string_view.h" #include "common/analysis/linter_test_utils.h" #include "common/analysis/text_structure_linter_test_utils.h" -#include "common/text/symbol.h" #include "gtest/gtest.h" #include "verilog/analysis/verilog_analyzer.h" #include "verilog/parser/verilog_token_enum.h" diff --git a/verilog/analysis/checkers/packed_dimensions_rule.cc b/verilog/analysis/checkers/packed_dimensions_rule.cc index e95bced51..1e0b146a3 100644 --- a/verilog/analysis/checkers/packed_dimensions_rule.cc +++ b/verilog/analysis/checkers/packed_dimensions_rule.cc @@ -22,6 +22,7 @@ #include "common/analysis/matcher/matcher.h" #include "common/text/symbol.h" #include "common/text/syntax_tree_context.h" +#include "common/text/token_info.h" #include "common/text/tree_utils.h" #include "common/util/logging.h" #include "verilog/CST/context_functions.h" diff --git a/verilog/analysis/checkers/packed_dimensions_rule.h b/verilog/analysis/checkers/packed_dimensions_rule.h index f9851c834..179ebd4b5 100644 --- a/verilog/analysis/checkers/packed_dimensions_rule.h +++ b/verilog/analysis/checkers/packed_dimensions_rule.h @@ -16,7 +16,6 @@ #define VERIBLE_VERILOG_ANALYSIS_CHECKERS_PACKED_DIMENSIONS_RULE_H_ #include -#include #include "common/analysis/lint_rule_status.h" #include "common/analysis/syntax_tree_lint_rule.h" diff --git a/verilog/analysis/checkers/packed_dimensions_rule_test.cc b/verilog/analysis/checkers/packed_dimensions_rule_test.cc index b2a06e4c1..edc1dab2e 100644 --- a/verilog/analysis/checkers/packed_dimensions_rule_test.cc +++ b/verilog/analysis/checkers/packed_dimensions_rule_test.cc @@ -18,9 +18,7 @@ #include "common/analysis/linter_test_utils.h" #include "common/analysis/syntax_tree_linter_test_utils.h" -#include "common/text/symbol.h" #include "gtest/gtest.h" -#include "verilog/CST/verilog_nonterminals.h" #include "verilog/analysis/verilog_analyzer.h" #include "verilog/parser/verilog_token_enum.h" diff --git a/verilog/analysis/checkers/parameter_name_style_rule_test.cc b/verilog/analysis/checkers/parameter_name_style_rule_test.cc index 1b2c11d71..1160ed231 100644 --- a/verilog/analysis/checkers/parameter_name_style_rule_test.cc +++ b/verilog/analysis/checkers/parameter_name_style_rule_test.cc @@ -18,9 +18,7 @@ #include "common/analysis/linter_test_utils.h" #include "common/analysis/syntax_tree_linter_test_utils.h" -#include "common/text/symbol.h" #include "gtest/gtest.h" -#include "verilog/CST/verilog_nonterminals.h" #include "verilog/analysis/verilog_analyzer.h" #include "verilog/parser/verilog_token_enum.h" diff --git a/verilog/analysis/checkers/parameter_type_name_style_rule.cc b/verilog/analysis/checkers/parameter_type_name_style_rule.cc index e041f533e..502d77d92 100644 --- a/verilog/analysis/checkers/parameter_type_name_style_rule.cc +++ b/verilog/analysis/checkers/parameter_type_name_style_rule.cc @@ -29,7 +29,6 @@ #include "verilog/CST/verilog_matchers.h" #include "verilog/analysis/descriptions.h" #include "verilog/analysis/lint_rule_registry.h" -#include "verilog/parser/verilog_token_enum.h" namespace verilog { namespace analysis { diff --git a/verilog/analysis/checkers/parameter_type_name_style_rule.h b/verilog/analysis/checkers/parameter_type_name_style_rule.h index a99d46d22..92f0b0365 100644 --- a/verilog/analysis/checkers/parameter_type_name_style_rule.h +++ b/verilog/analysis/checkers/parameter_type_name_style_rule.h @@ -16,7 +16,6 @@ #define VERIBLE_VERILOG_ANALYSIS_CHECKERS_PARAMETER_TYPE_NAME_STYLE_RULE_H_ #include -#include #include "common/analysis/lint_rule_status.h" #include "common/analysis/syntax_tree_lint_rule.h" diff --git a/verilog/analysis/checkers/parameter_type_name_style_rule_test.cc b/verilog/analysis/checkers/parameter_type_name_style_rule_test.cc index 8c9a4c312..03ee571ae 100644 --- a/verilog/analysis/checkers/parameter_type_name_style_rule_test.cc +++ b/verilog/analysis/checkers/parameter_type_name_style_rule_test.cc @@ -18,9 +18,7 @@ #include "common/analysis/linter_test_utils.h" #include "common/analysis/syntax_tree_linter_test_utils.h" -#include "common/text/symbol.h" #include "gtest/gtest.h" -#include "verilog/CST/verilog_nonterminals.h" #include "verilog/analysis/verilog_analyzer.h" #include "verilog/parser/verilog_token_enum.h" diff --git a/verilog/analysis/checkers/plusarg_assignment_rule_test.cc b/verilog/analysis/checkers/plusarg_assignment_rule_test.cc index fab0d8387..35a0682eb 100644 --- a/verilog/analysis/checkers/plusarg_assignment_rule_test.cc +++ b/verilog/analysis/checkers/plusarg_assignment_rule_test.cc @@ -18,9 +18,7 @@ #include "common/analysis/linter_test_utils.h" #include "common/analysis/syntax_tree_linter_test_utils.h" -#include "common/text/symbol.h" #include "gtest/gtest.h" -#include "verilog/CST/verilog_treebuilder_utils.h" #include "verilog/analysis/verilog_analyzer.h" #include "verilog/parser/verilog_token_enum.h" diff --git a/verilog/analysis/checkers/port_name_suffix_rule.cc b/verilog/analysis/checkers/port_name_suffix_rule.cc index 76e6e444e..ffbc6ef6f 100644 --- a/verilog/analysis/checkers/port_name_suffix_rule.cc +++ b/verilog/analysis/checkers/port_name_suffix_rule.cc @@ -24,17 +24,14 @@ #include "common/analysis/lint_rule_status.h" #include "common/analysis/matcher/bound_symbol_manager.h" #include "common/analysis/matcher/matcher.h" -#include "common/strings/naming_utils.h" #include "common/text/symbol.h" #include "common/text/syntax_tree_context.h" #include "common/text/token_info.h" #include "common/util/logging.h" -#include "verilog/CST/identifier.h" #include "verilog/CST/port.h" #include "verilog/CST/verilog_matchers.h" #include "verilog/analysis/descriptions.h" #include "verilog/analysis/lint_rule_registry.h" -#include "verilog/parser/verilog_token_enum.h" namespace verilog { namespace analysis { diff --git a/verilog/analysis/checkers/port_name_suffix_rule.h b/verilog/analysis/checkers/port_name_suffix_rule.h index eb5d27dad..c02e48b29 100644 --- a/verilog/analysis/checkers/port_name_suffix_rule.h +++ b/verilog/analysis/checkers/port_name_suffix_rule.h @@ -16,13 +16,13 @@ #define VERIBLE_VERILOG_ANALYSIS_CHECKERS_PORT_NAME_SUFFIX_RULE_H_ #include -#include #include "absl/strings/string_view.h" #include "common/analysis/lint_rule_status.h" #include "common/analysis/syntax_tree_lint_rule.h" #include "common/text/symbol.h" #include "common/text/syntax_tree_context.h" +#include "common/text/token_info.h" #include "verilog/analysis/descriptions.h" namespace verilog { diff --git a/verilog/analysis/checkers/port_name_suffix_rule_test.cc b/verilog/analysis/checkers/port_name_suffix_rule_test.cc index 0ef405593..8e36a5475 100644 --- a/verilog/analysis/checkers/port_name_suffix_rule_test.cc +++ b/verilog/analysis/checkers/port_name_suffix_rule_test.cc @@ -18,9 +18,7 @@ #include "common/analysis/linter_test_utils.h" #include "common/analysis/syntax_tree_linter_test_utils.h" -#include "common/text/symbol.h" #include "gtest/gtest.h" -#include "verilog/CST/verilog_nonterminals.h" #include "verilog/analysis/verilog_analyzer.h" #include "verilog/parser/verilog_token_enum.h" diff --git a/verilog/analysis/checkers/positive_meaning_parameter_name_rule.cc b/verilog/analysis/checkers/positive_meaning_parameter_name_rule.cc index d2f763aac..91594bde1 100644 --- a/verilog/analysis/checkers/positive_meaning_parameter_name_rule.cc +++ b/verilog/analysis/checkers/positive_meaning_parameter_name_rule.cc @@ -22,7 +22,6 @@ #include "common/analysis/lint_rule_status.h" #include "common/analysis/matcher/bound_symbol_manager.h" #include "common/analysis/matcher/matcher.h" -#include "common/strings/naming_utils.h" #include "common/text/symbol.h" #include "common/text/syntax_tree_context.h" #include "common/text/token_info.h" @@ -30,7 +29,6 @@ #include "verilog/CST/verilog_matchers.h" #include "verilog/analysis/descriptions.h" #include "verilog/analysis/lint_rule_registry.h" -#include "verilog/parser/verilog_token_enum.h" namespace verilog { namespace analysis { diff --git a/verilog/analysis/checkers/positive_meaning_parameter_name_rule.h b/verilog/analysis/checkers/positive_meaning_parameter_name_rule.h index a353d376d..0471b5d8b 100644 --- a/verilog/analysis/checkers/positive_meaning_parameter_name_rule.h +++ b/verilog/analysis/checkers/positive_meaning_parameter_name_rule.h @@ -16,7 +16,6 @@ #define VERIBLE_VERILOG_ANALYSIS_CHECKERS_POSITIVE_MEANING_PARAMETER_NAME_RULE_H_ // NOLINT #include -#include #include "common/analysis/lint_rule_status.h" #include "common/analysis/syntax_tree_lint_rule.h" diff --git a/verilog/analysis/checkers/positive_meaning_parameter_name_rule_test.cc b/verilog/analysis/checkers/positive_meaning_parameter_name_rule_test.cc index dbbe4691b..5d82bf352 100644 --- a/verilog/analysis/checkers/positive_meaning_parameter_name_rule_test.cc +++ b/verilog/analysis/checkers/positive_meaning_parameter_name_rule_test.cc @@ -18,9 +18,7 @@ #include "common/analysis/linter_test_utils.h" #include "common/analysis/syntax_tree_linter_test_utils.h" -#include "common/text/symbol.h" #include "gtest/gtest.h" -#include "verilog/CST/verilog_nonterminals.h" #include "verilog/analysis/verilog_analyzer.h" #include "verilog/parser/verilog_token_enum.h" diff --git a/verilog/analysis/checkers/posix_eof_rule.h b/verilog/analysis/checkers/posix_eof_rule.h index 9870ad5ef..1241ef2d6 100644 --- a/verilog/analysis/checkers/posix_eof_rule.h +++ b/verilog/analysis/checkers/posix_eof_rule.h @@ -16,7 +16,6 @@ #define VERIBLE_VERILOG_ANALYSIS_CHECKERS_POSIX_EOF_RULE_H_ #include -#include #include "absl/strings/string_view.h" #include "common/analysis/lint_rule_status.h" diff --git a/verilog/analysis/checkers/posix_eof_rule_test.cc b/verilog/analysis/checkers/posix_eof_rule_test.cc index ce487a3dc..7ff0c4321 100644 --- a/verilog/analysis/checkers/posix_eof_rule_test.cc +++ b/verilog/analysis/checkers/posix_eof_rule_test.cc @@ -18,7 +18,6 @@ #include "common/analysis/linter_test_utils.h" #include "common/analysis/text_structure_linter_test_utils.h" -#include "common/text/symbol.h" #include "gtest/gtest.h" #include "verilog/analysis/verilog_analyzer.h" #include "verilog/parser/verilog_token_enum.h" diff --git a/verilog/analysis/checkers/proper_parameter_declaration_rule.h b/verilog/analysis/checkers/proper_parameter_declaration_rule.h index a7e0c2fd9..a53e63b7c 100644 --- a/verilog/analysis/checkers/proper_parameter_declaration_rule.h +++ b/verilog/analysis/checkers/proper_parameter_declaration_rule.h @@ -16,7 +16,6 @@ #define VERIBLE_VERILOG_ANALYSIS_CHECKERS_PROPER_PARAMETER_DECLARATION_RULE_H_ #include -#include #include "common/analysis/lint_rule_status.h" #include "common/analysis/syntax_tree_lint_rule.h" diff --git a/verilog/analysis/checkers/proper_parameter_declaration_rule_test.cc b/verilog/analysis/checkers/proper_parameter_declaration_rule_test.cc index 5977fd444..fba4b3b1c 100644 --- a/verilog/analysis/checkers/proper_parameter_declaration_rule_test.cc +++ b/verilog/analysis/checkers/proper_parameter_declaration_rule_test.cc @@ -18,9 +18,7 @@ #include "common/analysis/linter_test_utils.h" #include "common/analysis/syntax_tree_linter_test_utils.h" -#include "common/text/symbol.h" #include "gtest/gtest.h" -#include "verilog/CST/verilog_nonterminals.h" #include "verilog/analysis/verilog_analyzer.h" #include "verilog/parser/verilog_token_enum.h" diff --git a/verilog/analysis/checkers/signal_name_style_rule.cc b/verilog/analysis/checkers/signal_name_style_rule.cc index 49e13d3d4..a38598e2b 100644 --- a/verilog/analysis/checkers/signal_name_style_rule.cc +++ b/verilog/analysis/checkers/signal_name_style_rule.cc @@ -27,7 +27,6 @@ #include "common/text/token_info.h" #include "common/util/logging.h" #include "verilog/CST/data.h" -#include "verilog/CST/identifier.h" #include "verilog/CST/net.h" #include "verilog/CST/port.h" #include "verilog/CST/verilog_matchers.h" diff --git a/verilog/analysis/checkers/signal_name_style_rule.h b/verilog/analysis/checkers/signal_name_style_rule.h index f9d22fbc8..ae77af3fd 100644 --- a/verilog/analysis/checkers/signal_name_style_rule.h +++ b/verilog/analysis/checkers/signal_name_style_rule.h @@ -16,7 +16,6 @@ #define VERIBLE_VERILOG_ANALYSIS_CHECKERS_SIGNAL_NAME_STYLE_RULE_H_ #include -#include #include "common/analysis/lint_rule_status.h" #include "common/analysis/syntax_tree_lint_rule.h" diff --git a/verilog/analysis/checkers/signal_name_style_rule_test.cc b/verilog/analysis/checkers/signal_name_style_rule_test.cc index b45ff7055..62fb4fa4d 100644 --- a/verilog/analysis/checkers/signal_name_style_rule_test.cc +++ b/verilog/analysis/checkers/signal_name_style_rule_test.cc @@ -18,9 +18,7 @@ #include "common/analysis/linter_test_utils.h" #include "common/analysis/syntax_tree_linter_test_utils.h" -#include "common/text/symbol.h" #include "gtest/gtest.h" -#include "verilog/CST/verilog_nonterminals.h" #include "verilog/analysis/verilog_analyzer.h" #include "verilog/parser/verilog_token_enum.h" diff --git a/verilog/analysis/checkers/struct_union_name_style_rule.cc b/verilog/analysis/checkers/struct_union_name_style_rule.cc index df5eba8e3..b5af60161 100644 --- a/verilog/analysis/checkers/struct_union_name_style_rule.cc +++ b/verilog/analysis/checkers/struct_union_name_style_rule.cc @@ -18,6 +18,7 @@ #include #include +#include "absl/status/status.h" #include "absl/strings/match.h" #include "absl/strings/str_cat.h" #include "absl/strings/str_split.h" @@ -25,7 +26,6 @@ #include "common/analysis/lint_rule_status.h" #include "common/analysis/matcher/bound_symbol_manager.h" #include "common/analysis/matcher/matcher.h" -#include "common/strings/naming_utils.h" #include "common/text/config_utils.h" #include "common/text/symbol.h" #include "common/text/syntax_tree_context.h" diff --git a/verilog/analysis/checkers/struct_union_name_style_rule_test.cc b/verilog/analysis/checkers/struct_union_name_style_rule_test.cc index cc521916e..37b8a15a4 100644 --- a/verilog/analysis/checkers/struct_union_name_style_rule_test.cc +++ b/verilog/analysis/checkers/struct_union_name_style_rule_test.cc @@ -20,9 +20,7 @@ #include "absl/strings/string_view.h" #include "common/analysis/linter_test_utils.h" #include "common/analysis/syntax_tree_linter_test_utils.h" -#include "common/text/symbol.h" #include "gtest/gtest.h" -#include "verilog/CST/verilog_nonterminals.h" #include "verilog/analysis/verilog_analyzer.h" #include "verilog/parser/verilog_token_enum.h" diff --git a/verilog/analysis/checkers/suggest_parentheses_rule.cc b/verilog/analysis/checkers/suggest_parentheses_rule.cc index b8247f558..448b056ad 100644 --- a/verilog/analysis/checkers/suggest_parentheses_rule.cc +++ b/verilog/analysis/checkers/suggest_parentheses_rule.cc @@ -15,8 +15,9 @@ #include "verilog/analysis/checkers/suggest_parentheses_rule.h" #include "absl/strings/string_view.h" +#include "common/text/token_info.h" #include "verilog/CST/expression.h" -#include "verilog/CST/verilog_matchers.h" +#include "verilog/CST/verilog_nonterminals.h" #include "verilog/analysis/lint_rule_registry.h" namespace verilog { diff --git a/verilog/analysis/checkers/suggest_parentheses_rule_test.cc b/verilog/analysis/checkers/suggest_parentheses_rule_test.cc index ef0d93edd..9acd0af8c 100644 --- a/verilog/analysis/checkers/suggest_parentheses_rule_test.cc +++ b/verilog/analysis/checkers/suggest_parentheses_rule_test.cc @@ -17,6 +17,7 @@ #include #include "common/analysis/syntax_tree_linter_test_utils.h" +#include "gtest/gtest.h" #include "verilog/analysis/verilog_analyzer.h" namespace verilog { diff --git a/verilog/analysis/checkers/token_stream_lint_rule.h b/verilog/analysis/checkers/token_stream_lint_rule.h index 699fc3c5a..0f2408efd 100644 --- a/verilog/analysis/checkers/token_stream_lint_rule.h +++ b/verilog/analysis/checkers/token_stream_lint_rule.h @@ -16,7 +16,6 @@ #define VERIBLE_VERILOG_ANALYSIS_CHECKERS_TOKEN_STREAM_LINT_RULE_H_ #include -#include #include "common/analysis/lint_rule_status.h" #include "common/analysis/syntax_tree_lint_rule.h" diff --git a/verilog/analysis/checkers/token_stream_lint_rule_test.cc b/verilog/analysis/checkers/token_stream_lint_rule_test.cc index 2c27d696b..eb145d3ae 100644 --- a/verilog/analysis/checkers/token_stream_lint_rule_test.cc +++ b/verilog/analysis/checkers/token_stream_lint_rule_test.cc @@ -18,10 +18,7 @@ #include "common/analysis/linter_test_utils.h" #include "common/analysis/syntax_tree_linter_test_utils.h" -#include "common/text/symbol.h" #include "gtest/gtest.h" -#include "verilog/CST/verilog_nonterminals.h" -#include "verilog/CST/verilog_treebuilder_utils.h" #include "verilog/analysis/verilog_analyzer.h" #include "verilog/parser/verilog_token_enum.h" diff --git a/verilog/analysis/checkers/truncated_numeric_literal_rule.cc b/verilog/analysis/checkers/truncated_numeric_literal_rule.cc index b18fb52d3..59f2321f8 100644 --- a/verilog/analysis/checkers/truncated_numeric_literal_rule.cc +++ b/verilog/analysis/checkers/truncated_numeric_literal_rule.cc @@ -28,7 +28,6 @@ #include "common/analysis/matcher/bound_symbol_manager.h" #include "common/analysis/matcher/matcher.h" #include "common/text/concrete_syntax_leaf.h" -#include "common/text/config_utils.h" #include "common/text/symbol.h" #include "common/text/syntax_tree_context.h" #include "common/text/token_info.h" diff --git a/verilog/analysis/checkers/truncated_numeric_literal_rule.h b/verilog/analysis/checkers/truncated_numeric_literal_rule.h index 282d84b46..128c6d307 100644 --- a/verilog/analysis/checkers/truncated_numeric_literal_rule.h +++ b/verilog/analysis/checkers/truncated_numeric_literal_rule.h @@ -16,7 +16,6 @@ #define VERIBLE_VERILOG_ANALYSIS_CHECKERS_TRUNCATED_NUMERIC_LITERAL_RULE_H_ #include -#include #include "absl/strings/string_view.h" #include "common/analysis/lint_rule_status.h" diff --git a/verilog/analysis/checkers/truncated_numeric_literal_rule_test.cc b/verilog/analysis/checkers/truncated_numeric_literal_rule_test.cc index 980c1b6bf..bc9cbb319 100644 --- a/verilog/analysis/checkers/truncated_numeric_literal_rule_test.cc +++ b/verilog/analysis/checkers/truncated_numeric_literal_rule_test.cc @@ -21,9 +21,7 @@ #include "absl/strings/string_view.h" #include "common/analysis/linter_test_utils.h" #include "common/analysis/syntax_tree_linter_test_utils.h" -#include "common/text/symbol.h" #include "gtest/gtest.h" -#include "verilog/CST/verilog_nonterminals.h" #include "verilog/analysis/verilog_analyzer.h" #include "verilog/parser/verilog_token_enum.h" diff --git a/verilog/analysis/checkers/undersized_binary_literal_rule_test.cc b/verilog/analysis/checkers/undersized_binary_literal_rule_test.cc index 45cc9fc4f..e8c1b67af 100644 --- a/verilog/analysis/checkers/undersized_binary_literal_rule_test.cc +++ b/verilog/analysis/checkers/undersized_binary_literal_rule_test.cc @@ -18,9 +18,7 @@ #include "common/analysis/linter_test_utils.h" #include "common/analysis/syntax_tree_linter_test_utils.h" -#include "common/text/symbol.h" #include "gtest/gtest.h" -#include "verilog/CST/verilog_nonterminals.h" #include "verilog/analysis/verilog_analyzer.h" #include "verilog/parser/verilog_token_enum.h" diff --git a/verilog/analysis/checkers/unpacked_dimensions_rule.cc b/verilog/analysis/checkers/unpacked_dimensions_rule.cc index 8ea1cd072..9782bcaf4 100644 --- a/verilog/analysis/checkers/unpacked_dimensions_rule.cc +++ b/verilog/analysis/checkers/unpacked_dimensions_rule.cc @@ -22,11 +22,13 @@ #include "common/analysis/matcher/matcher.h" #include "common/text/symbol.h" #include "common/text/syntax_tree_context.h" +#include "common/text/token_info.h" #include "common/util/logging.h" #include "verilog/CST/context_functions.h" #include "verilog/CST/dimensions.h" #include "verilog/CST/expression.h" #include "verilog/CST/verilog_matchers.h" +#include "verilog/CST/verilog_nonterminals.h" #include "verilog/analysis/descriptions.h" #include "verilog/analysis/lint_rule_registry.h" diff --git a/verilog/analysis/checkers/unpacked_dimensions_rule.h b/verilog/analysis/checkers/unpacked_dimensions_rule.h index 0311fdca2..447b4e86b 100644 --- a/verilog/analysis/checkers/unpacked_dimensions_rule.h +++ b/verilog/analysis/checkers/unpacked_dimensions_rule.h @@ -16,7 +16,6 @@ #define VERIBLE_VERILOG_ANALYSIS_CHECKERS_UNPACKED_DIMENSIONS_RULE_H_ #include -#include #include "common/analysis/lint_rule_status.h" #include "common/analysis/syntax_tree_lint_rule.h" diff --git a/verilog/analysis/checkers/unpacked_dimensions_rule_test.cc b/verilog/analysis/checkers/unpacked_dimensions_rule_test.cc index 15f74f839..25e3dcc11 100644 --- a/verilog/analysis/checkers/unpacked_dimensions_rule_test.cc +++ b/verilog/analysis/checkers/unpacked_dimensions_rule_test.cc @@ -18,9 +18,7 @@ #include "common/analysis/linter_test_utils.h" #include "common/analysis/syntax_tree_linter_test_utils.h" -#include "common/text/symbol.h" #include "gtest/gtest.h" -#include "verilog/CST/verilog_nonterminals.h" #include "verilog/analysis/verilog_analyzer.h" #include "verilog/parser/verilog_token_enum.h" diff --git a/verilog/analysis/checkers/uvm_macro_semicolon_rule.cc b/verilog/analysis/checkers/uvm_macro_semicolon_rule.cc index 379dcb268..1cf8e2fe4 100644 --- a/verilog/analysis/checkers/uvm_macro_semicolon_rule.cc +++ b/verilog/analysis/checkers/uvm_macro_semicolon_rule.cc @@ -25,8 +25,10 @@ #include "common/text/token_info.h" #include "verilog/CST/context_functions.h" #include "verilog/CST/macro.h" +#include "verilog/CST/verilog_nonterminals.h" #include "verilog/analysis/descriptions.h" #include "verilog/analysis/lint_rule_registry.h" +#include "verilog/parser/verilog_token_enum.h" namespace verilog { namespace analysis { diff --git a/verilog/analysis/checkers/uvm_macro_semicolon_rule.h b/verilog/analysis/checkers/uvm_macro_semicolon_rule.h index d06915546..a58efdae2 100644 --- a/verilog/analysis/checkers/uvm_macro_semicolon_rule.h +++ b/verilog/analysis/checkers/uvm_macro_semicolon_rule.h @@ -16,14 +16,12 @@ #define VERIBLE_VERILOG_ANALYSIS_CHECKERS_UVM_MACRO_SEMICOLON_RULE_H_ #include -#include #include "common/analysis/lint_rule_status.h" #include "common/analysis/syntax_tree_lint_rule.h" #include "common/text/concrete_syntax_leaf.h" -#include "common/text/symbol.h" #include "common/text/syntax_tree_context.h" -#include "verilog/CST/verilog_matchers.h" +#include "common/text/token_info.h" #include "verilog/analysis/descriptions.h" namespace verilog { diff --git a/verilog/analysis/checkers/uvm_macro_semicolon_rule_test.cc b/verilog/analysis/checkers/uvm_macro_semicolon_rule_test.cc index 1ac39f425..9478c89db 100644 --- a/verilog/analysis/checkers/uvm_macro_semicolon_rule_test.cc +++ b/verilog/analysis/checkers/uvm_macro_semicolon_rule_test.cc @@ -18,9 +18,7 @@ #include "common/analysis/linter_test_utils.h" #include "common/analysis/syntax_tree_linter_test_utils.h" -#include "common/text/symbol.h" #include "gtest/gtest.h" -#include "verilog/CST/verilog_nonterminals.h" #include "verilog/analysis/verilog_analyzer.h" namespace verilog { diff --git a/verilog/analysis/checkers/v2001_generate_begin_rule.h b/verilog/analysis/checkers/v2001_generate_begin_rule.h index c7fffd744..bb64af63d 100644 --- a/verilog/analysis/checkers/v2001_generate_begin_rule.h +++ b/verilog/analysis/checkers/v2001_generate_begin_rule.h @@ -16,7 +16,6 @@ #define VERIBLE_VERILOG_ANALYSIS_CHECKERS_V2001_GENERATE_BEGIN_RULE_H_ #include -#include #include "common/analysis/lint_rule_status.h" #include "common/analysis/syntax_tree_lint_rule.h" diff --git a/verilog/analysis/checkers/v2001_generate_begin_rule_test.cc b/verilog/analysis/checkers/v2001_generate_begin_rule_test.cc index 4143fef51..b9e1f2940 100644 --- a/verilog/analysis/checkers/v2001_generate_begin_rule_test.cc +++ b/verilog/analysis/checkers/v2001_generate_begin_rule_test.cc @@ -18,10 +18,7 @@ #include "common/analysis/linter_test_utils.h" #include "common/analysis/syntax_tree_linter_test_utils.h" -#include "common/text/symbol.h" #include "gtest/gtest.h" -#include "verilog/CST/verilog_nonterminals.h" -#include "verilog/CST/verilog_treebuilder_utils.h" #include "verilog/analysis/verilog_analyzer.h" #include "verilog/parser/verilog_token_enum.h" diff --git a/verilog/analysis/checkers/void_cast_rule_test.cc b/verilog/analysis/checkers/void_cast_rule_test.cc index 9b15a3c28..5ef1a4566 100644 --- a/verilog/analysis/checkers/void_cast_rule_test.cc +++ b/verilog/analysis/checkers/void_cast_rule_test.cc @@ -18,10 +18,7 @@ #include "common/analysis/linter_test_utils.h" #include "common/analysis/syntax_tree_linter_test_utils.h" -#include "common/text/symbol.h" #include "gtest/gtest.h" -#include "verilog/CST/verilog_nonterminals.h" -#include "verilog/CST/verilog_treebuilder_utils.h" #include "verilog/analysis/verilog_analyzer.h" #include "verilog/parser/verilog_token_enum.h" diff --git a/verilog/analysis/dependencies.cc b/verilog/analysis/dependencies.cc index 48d05ea9e..a4d737e3f 100644 --- a/verilog/analysis/dependencies.cc +++ b/verilog/analysis/dependencies.cc @@ -18,7 +18,6 @@ #include #include "absl/strings/string_view.h" -#include "common/strings/compare.h" #include "common/strings/display_utils.h" #include "common/util/logging.h" #include "verilog/analysis/symbol_table.h" diff --git a/verilog/analysis/dependencies_test.cc b/verilog/analysis/dependencies_test.cc index fec6e4cb8..9166023a7 100644 --- a/verilog/analysis/dependencies_test.cc +++ b/verilog/analysis/dependencies_test.cc @@ -24,6 +24,8 @@ #include "common/util/logging.h" #include "gmock/gmock.h" #include "gtest/gtest.h" +#include "verilog/analysis/symbol_table.h" +#include "verilog/analysis/verilog_project.h" namespace verilog { namespace { diff --git a/verilog/analysis/flow_tree.cc b/verilog/analysis/flow_tree.cc index d7451ace2..ddd927e33 100644 --- a/verilog/analysis/flow_tree.cc +++ b/verilog/analysis/flow_tree.cc @@ -20,7 +20,6 @@ #include "absl/status/status.h" #include "absl/strings/string_view.h" #include "common/util/logging.h" -#include "common/util/status_macros.h" #include "verilog/parser/verilog_token_enum.h" namespace verilog { diff --git a/verilog/analysis/flow_tree.h b/verilog/analysis/flow_tree.h index c492ff5a5..70d3a1607 100644 --- a/verilog/analysis/flow_tree.h +++ b/verilog/analysis/flow_tree.h @@ -18,7 +18,6 @@ #include #include #include -#include #include #include diff --git a/verilog/analysis/flow_tree_test.cc b/verilog/analysis/flow_tree_test.cc index 59db4f3a9..1872539f0 100644 --- a/verilog/analysis/flow_tree_test.cc +++ b/verilog/analysis/flow_tree_test.cc @@ -21,7 +21,6 @@ #include "gmock/gmock.h" #include "gtest/gtest.h" #include "verilog/parser/verilog_lexer.h" -#include "verilog/parser/verilog_token_enum.h" namespace verilog { namespace { diff --git a/verilog/analysis/json_diagnostics.cc b/verilog/analysis/json_diagnostics.cc index d33e21f0a..0988caa29 100644 --- a/verilog/analysis/json_diagnostics.cc +++ b/verilog/analysis/json_diagnostics.cc @@ -21,6 +21,7 @@ #include "absl/strings/string_view.h" #include "common/analysis/file_analyzer.h" #include "common/strings/line_column_map.h" +#include "nlohmann/json.hpp" #include "verilog/analysis/verilog_analyzer.h" using nlohmann::json; diff --git a/verilog/analysis/lint_rule_registry.h b/verilog/analysis/lint_rule_registry.h index dbeb66afc..bfb21d9bc 100644 --- a/verilog/analysis/lint_rule_registry.h +++ b/verilog/analysis/lint_rule_registry.h @@ -32,7 +32,6 @@ #include #include #include -#include #include #include "absl/strings/string_view.h" diff --git a/verilog/analysis/symbol_table.cc b/verilog/analysis/symbol_table.cc index 69da13076..a24038b07 100644 --- a/verilog/analysis/symbol_table.cc +++ b/verilog/analysis/symbol_table.cc @@ -27,7 +27,6 @@ #include "absl/status/status.h" #include "absl/strings/str_cat.h" -#include "absl/strings/str_format.h" #include "absl/strings/str_join.h" #include "absl/strings/string_view.h" #include "absl/time/clock.h" diff --git a/verilog/analysis/verilog_analyzer.h b/verilog/analysis/verilog_analyzer.h index 068364538..c03c4768e 100644 --- a/verilog/analysis/verilog_analyzer.h +++ b/verilog/analysis/verilog_analyzer.h @@ -16,9 +16,7 @@ #define VERIBLE_VERILOG_ANALYSIS_VERILOG_ANALYZER_H_ #include -#include #include -#include #include #include "absl/status/status.h" diff --git a/verilog/analysis/verilog_analyzer_test.cc b/verilog/analysis/verilog_analyzer_test.cc index 7193eccf3..bb54b58ee 100644 --- a/verilog/analysis/verilog_analyzer_test.cc +++ b/verilog/analysis/verilog_analyzer_test.cc @@ -19,21 +19,17 @@ #include #include -#include "absl/base/casts.h" #include "absl/status/status.h" #include "absl/strings/match.h" #include "absl/strings/string_view.h" -#include "absl/types/span.h" #include "common/analysis/file_analyzer.h" #include "common/strings/display_utils.h" #include "common/text/concrete_syntax_leaf.h" #include "common/text/concrete_syntax_tree.h" -#include "common/text/constants.h" #include "common/text/symbol.h" #include "common/text/text_structure.h" #include "common/text/token_info.h" #include "common/text/token_info_test_util.h" -#include "common/text/token_stream_view.h" #include "common/text/tree_utils.h" #include "common/util/casts.h" #include "common/util/logging.h" diff --git a/verilog/analysis/verilog_equivalence_test.cc b/verilog/analysis/verilog_equivalence_test.cc index dcf8a6123..1d8aa59bc 100644 --- a/verilog/analysis/verilog_equivalence_test.cc +++ b/verilog/analysis/verilog_equivalence_test.cc @@ -20,11 +20,9 @@ #include #include -#include "absl/status/status.h" #include "absl/strings/match.h" #include "absl/strings/string_view.h" #include "absl/types/span.h" -#include "common/text/token_info.h" #include "gtest/gtest.h" #undef EXPECT_OK diff --git a/verilog/analysis/verilog_linter.cc b/verilog/analysis/verilog_linter.cc index 7800b5c36..3c402988d 100644 --- a/verilog/analysis/verilog_linter.cc +++ b/verilog/analysis/verilog_linter.cc @@ -30,15 +30,11 @@ #include "absl/status/statusor.h" #include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" -#include "common/analysis/line_lint_rule.h" #include "common/analysis/line_linter.h" #include "common/analysis/lint_rule_status.h" #include "common/analysis/lint_waiver.h" -#include "common/analysis/syntax_tree_lint_rule.h" #include "common/analysis/syntax_tree_linter.h" -#include "common/analysis/text_structure_lint_rule.h" #include "common/analysis/text_structure_linter.h" -#include "common/analysis/token_stream_lint_rule.h" #include "common/analysis/token_stream_linter.h" #include "common/strings/line_column_map.h" #include "common/text/concrete_syntax_tree.h" diff --git a/verilog/analysis/verilog_linter.h b/verilog/analysis/verilog_linter.h index 417e22c06..872934581 100644 --- a/verilog/analysis/verilog_linter.h +++ b/verilog/analysis/verilog_linter.h @@ -17,7 +17,6 @@ #include #include -#include #include #include "absl/flags/declare.h" diff --git a/verilog/analysis/verilog_linter_configuration.cc b/verilog/analysis/verilog_linter_configuration.cc index 15ecb3000..8a976617f 100644 --- a/verilog/analysis/verilog_linter_configuration.cc +++ b/verilog/analysis/verilog_linter_configuration.cc @@ -25,6 +25,7 @@ #include #include "absl/status/status.h" +#include "absl/status/statusor.h" #include "absl/strings/match.h" #include "absl/strings/str_cat.h" #include "absl/strings/str_join.h" diff --git a/verilog/formatting/BUILD b/verilog/formatting/BUILD index f5b6fb959..705e493df 100644 --- a/verilog/formatting/BUILD +++ b/verilog/formatting/BUILD @@ -37,7 +37,7 @@ cc_library( "//verilog/CST:verilog-nonterminals", "//verilog/parser:verilog-token-classifications", "//verilog/parser:verilog-token-enum", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) @@ -67,19 +67,15 @@ cc_library( "//common/util:enum-flags", "//common/util:logging", "//common/util:tree-operations", - "//common/util:value-saver", - "//common/util:vector-tree-iterators", "//verilog/CST:declaration", - "//verilog/CST:functions", "//verilog/CST:macro", "//verilog/CST:statement", "//verilog/CST:verilog-nonterminals", "//verilog/parser:verilog-parser", # only for verilog_symbol_name "//verilog/parser:verilog-token-classifications", "//verilog/parser:verilog-token-enum", - "@com_google_absl//absl/base:core_headers", - "@com_google_absl//absl/container:inlined_vector", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) @@ -87,8 +83,8 @@ cc_test( name = "tree-unwrapper_test", srcs = ["tree_unwrapper_test.cc"], deps = [ + ":format-style", ":tree-unwrapper", - "//common/formatting:basic-format-style", "//common/formatting:format-token", "//common/formatting:token-partition-tree", "//common/formatting:unwrapped-line", @@ -101,6 +97,7 @@ cc_test( "//verilog/analysis:verilog-analyzer", "@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", ], @@ -159,13 +156,11 @@ cc_library( "//common/util:interval", "//common/util:iterator-range", "//common/util:logging", - "//common/util:range", "//common/util:spacer", "//common/util:tree-operations", "//common/util:vector-tree", "//common/util:vector-tree-iterators", "//verilog/CST:declaration", - "//verilog/CST:module", "//verilog/CST:verilog-nonterminals", "//verilog/analysis:verilog-analyzer", "//verilog/analysis:verilog-equivalence", @@ -174,6 +169,7 @@ cc_library( "@com_google_absl//absl/status", "@com_google_absl//absl/status:statusor", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) @@ -191,6 +187,7 @@ cc_test( "//verilog/analysis:verilog-analyzer", "@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", ], @@ -205,7 +202,7 @@ cc_test( "//common/strings:position", "//common/util:logging", "@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", ], @@ -220,6 +217,7 @@ cc_library( "//common/strings:display-utils", "//common/strings:line-column-map", "//common/strings:position", + "//common/text:token-info", "//common/text:token-stream-view", "//common/util:interval-set", "//common/util:logging", @@ -229,6 +227,7 @@ cc_library( "//verilog/parser:verilog-token-classifications", "//verilog/parser:verilog-token-enum", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) @@ -238,9 +237,11 @@ cc_test( deps = [ ":comment-controls", "//common/strings:line-column-map", + "//common/strings:position", "//common/text:token-info-test-util", "//verilog/analysis:verilog-analyzer", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", ], @@ -252,7 +253,6 @@ cc_library( deps = [ "//common/formatting:align", "//common/formatting:basic-format-style", - "@com_google_absl//absl/strings", ], ) @@ -281,14 +281,13 @@ cc_library( "//common/text:syntax-tree-context", "//common/text:text-structure", "//common/text:token-info", - "//common/util:iterator-range", "//common/util:logging", "//common/util:with-reason", "//verilog/CST:verilog-nonterminals", "//verilog/parser:verilog-parser", "//verilog/parser:verilog-token-classifications", "//verilog/parser:verilog-token-enum", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) @@ -303,15 +302,14 @@ cc_test( "//common/formatting:unwrapped-line", "//common/formatting:unwrapped-line-test-utils", "//common/text:syntax-tree-context", + "//common/text:token-info", "//common/text:token-info-test-util", - "//common/text:tree-builder-test-util", "//common/util:casts", "//common/util:iterator-adaptors", "//common/util:logging", "//verilog/CST:verilog-nonterminals", - "//verilog/parser:verilog-parser", "//verilog/parser:verilog-token-enum", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", ], diff --git a/verilog/formatting/align.cc b/verilog/formatting/align.cc index 931ef1460..68d9745f1 100644 --- a/verilog/formatting/align.cc +++ b/verilog/formatting/align.cc @@ -25,6 +25,7 @@ #include "common/formatting/format_token.h" #include "common/formatting/token_partition_tree.h" #include "common/formatting/unwrapped_line.h" +#include "common/strings/position.h" #include "common/text/concrete_syntax_leaf.h" #include "common/text/concrete_syntax_tree.h" #include "common/text/symbol.h" @@ -36,6 +37,7 @@ #include "verilog/CST/context_functions.h" #include "verilog/CST/declaration.h" #include "verilog/CST/verilog_nonterminals.h" +#include "verilog/formatting/format_style.h" #include "verilog/parser/verilog_token_classifications.h" #include "verilog/parser/verilog_token_enum.h" diff --git a/verilog/formatting/align.h b/verilog/formatting/align.h index 03fa9ac91..6910a71a4 100644 --- a/verilog/formatting/align.h +++ b/verilog/formatting/align.h @@ -15,10 +15,7 @@ #ifndef VERIBLE_VERILOG_FORMATTING_ALIGN_H_ #define VERIBLE_VERILOG_FORMATTING_ALIGN_H_ -#include - #include "absl/strings/string_view.h" -#include "common/formatting/format_token.h" #include "common/formatting/token_partition_tree.h" #include "common/strings/position.h" // for ByteOffsetSet #include "verilog/formatting/format_style.h" diff --git a/verilog/formatting/comment_controls.cc b/verilog/formatting/comment_controls.cc index 4b276f279..c5ee1889a 100644 --- a/verilog/formatting/comment_controls.cc +++ b/verilog/formatting/comment_controls.cc @@ -26,6 +26,8 @@ #include "common/strings/comment_utils.h" #include "common/strings/display_utils.h" #include "common/strings/line_column_map.h" +#include "common/strings/position.h" +#include "common/text/token_info.h" #include "common/util/logging.h" #include "common/util/range.h" #include "common/util/spacer.h" diff --git a/verilog/formatting/comment_controls_test.cc b/verilog/formatting/comment_controls_test.cc index 1225ab07d..792dddf81 100644 --- a/verilog/formatting/comment_controls_test.cc +++ b/verilog/formatting/comment_controls_test.cc @@ -21,6 +21,7 @@ #include "absl/strings/str_join.h" #include "absl/strings/string_view.h" #include "common/strings/line_column_map.h" +#include "common/strings/position.h" #include "common/text/token_info_test_util.h" #include "gmock/gmock.h" #include "gtest/gtest.h" diff --git a/verilog/formatting/format_style.h b/verilog/formatting/format_style.h index a9a020ba7..1de9ddf01 100644 --- a/verilog/formatting/format_style.h +++ b/verilog/formatting/format_style.h @@ -15,10 +15,6 @@ #ifndef VERIBLE_VERILOG_FORMATTING_FORMAT_STYLE_H_ #define VERIBLE_VERILOG_FORMATTING_FORMAT_STYLE_H_ -#include -#include - -#include "absl/strings/string_view.h" #include "common/formatting/align.h" #include "common/formatting/basic_format_style.h" diff --git a/verilog/formatting/formatter.cc b/verilog/formatting/formatter.cc index 3432bd4bc..5f91c08da 100644 --- a/verilog/formatting/formatter.cc +++ b/verilog/formatting/formatter.cc @@ -45,13 +45,11 @@ #include "common/util/interval.h" #include "common/util/iterator_range.h" #include "common/util/logging.h" -#include "common/util/range.h" #include "common/util/spacer.h" #include "common/util/tree_operations.h" #include "common/util/vector_tree.h" #include "common/util/vector_tree_iterators.h" #include "verilog/CST/declaration.h" -#include "verilog/CST/module.h" #include "verilog/CST/verilog_nonterminals.h" #include "verilog/analysis/verilog_analyzer.h" #include "verilog/analysis/verilog_equivalence.h" diff --git a/verilog/formatting/formatter.h b/verilog/formatting/formatter.h index 0f1aebc9f..ac8e2fad2 100644 --- a/verilog/formatting/formatter.h +++ b/verilog/formatting/formatter.h @@ -17,7 +17,6 @@ #include #include -#include #include "absl/status/status.h" #include "absl/strings/string_view.h" diff --git a/verilog/formatting/token_annotator_test.cc b/verilog/formatting/token_annotator_test.cc index 16c70a193..b8699f782 100644 --- a/verilog/formatting/token_annotator_test.cc +++ b/verilog/formatting/token_annotator_test.cc @@ -25,8 +25,8 @@ #include "common/formatting/unwrapped_line.h" #include "common/formatting/unwrapped_line_test_utils.h" #include "common/text/syntax_tree_context.h" +#include "common/text/token_info.h" #include "common/text/token_info_test_util.h" -#include "common/text/tree_builder_test_util.h" #include "common/util/casts.h" #include "common/util/iterator_adaptors.h" #include "common/util/logging.h" @@ -34,7 +34,6 @@ #include "verilog/CST/verilog_nonterminals.h" #include "verilog/formatting/format_style.h" #include "verilog/formatting/verilog_token.h" -#include "verilog/parser/verilog_parser.h" #include "verilog/parser/verilog_token_enum.h" namespace verilog { diff --git a/verilog/formatting/tree_unwrapper.cc b/verilog/formatting/tree_unwrapper.cc index f122500d4..41eea3bef 100644 --- a/verilog/formatting/tree_unwrapper.cc +++ b/verilog/formatting/tree_unwrapper.cc @@ -25,10 +25,8 @@ #include #include -#include "absl/base/macros.h" #include "absl/strings/match.h" #include "absl/strings/string_view.h" -#include "common/formatting/basic_format_style.h" #include "common/formatting/format_token.h" #include "common/formatting/token_partition_tree.h" #include "common/formatting/tree_unwrapper.h" @@ -47,12 +45,11 @@ #include "common/util/enum_flags.h" #include "common/util/logging.h" #include "common/util/tree_operations.h" -#include "common/util/value_saver.h" #include "verilog/CST/declaration.h" -#include "verilog/CST/functions.h" #include "verilog/CST/macro.h" #include "verilog/CST/statement.h" #include "verilog/CST/verilog_nonterminals.h" +#include "verilog/formatting/format_style.h" #include "verilog/formatting/verilog_token.h" #include "verilog/parser/verilog_parser.h" #include "verilog/parser/verilog_token_classifications.h" diff --git a/verilog/formatting/tree_unwrapper.h b/verilog/formatting/tree_unwrapper.h index 204b97543..5f0b07231 100644 --- a/verilog/formatting/tree_unwrapper.h +++ b/verilog/formatting/tree_unwrapper.h @@ -16,7 +16,6 @@ #define VERIBLE_VERILOG_FORMATTING_TREE_UNWRAPPER_H_ #include -#include #include #include diff --git a/verilog/formatting/tree_unwrapper_test.cc b/verilog/formatting/tree_unwrapper_test.cc index b3f143f04..6d40aac5e 100644 --- a/verilog/formatting/tree_unwrapper_test.cc +++ b/verilog/formatting/tree_unwrapper_test.cc @@ -26,7 +26,6 @@ #include "absl/status/status.h" #include "absl/strings/str_join.h" #include "absl/strings/string_view.h" -#include "common/formatting/basic_format_style.h" #include "common/formatting/format_token.h" #include "common/formatting/token_partition_tree.h" #include "common/formatting/unwrapped_line.h" @@ -38,6 +37,7 @@ #include "common/util/vector_tree.h" #include "gtest/gtest.h" #include "verilog/analysis/verilog_analyzer.h" +#include "verilog/formatting/format_style.h" #undef EXPECT_OK #define EXPECT_OK(value) EXPECT_TRUE((value).ok()) diff --git a/verilog/parser/BUILD b/verilog/parser/BUILD index f72c1a515..862b11556 100644 --- a/verilog/parser/BUILD +++ b/verilog/parser/BUILD @@ -41,7 +41,7 @@ cc_library( "//bazel:flex", "//common/lexer:flex-lexer-adapter", "//common/text:token-info", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) @@ -54,7 +54,7 @@ cc_test( ":verilog-token-enum", "//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", ], @@ -137,7 +137,6 @@ cc_library( ], }), deps = [ - ":verilog-token-enum", "//common/parser:bison-parser-common", "//common/parser:parser-param", "//common/text:tree-utils", @@ -154,6 +153,7 @@ cc_library( "//verilog/CST:verilog-nonterminals", "//verilog/CST:verilog-treebuilder-utils", ], + alwayslink = 1, ) cc_library( @@ -161,14 +161,13 @@ cc_library( srcs = ["verilog_parser.cc"], hdrs = ["verilog_parser.h"], deps = [ - ":verilog-y-cc", # fixdeps: keep + ":verilog-y-cc", "//common/parser:bison-parser-adapter", "//common/parser:parse", "//common/parser:parser-param", "//common/util:value-saver", "@com_google_absl//absl/flags:flag", ], - alwayslink = 1, ) cc_library( @@ -189,7 +188,6 @@ cc_test( size = "small", srcs = ["verilog_parser_unittest.cc"], deps = [ - ":verilog-parser", ":verilog-token-enum", "//common/parser:bison-parser-common", "//common/parser:parser-test-util", @@ -202,6 +200,7 @@ cc_test( "//verilog/analysis:verilog-analyzer", "@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", ], @@ -220,6 +219,7 @@ cc_test( "//common/util:logging", "//verilog/analysis:verilog-analyzer", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", ], @@ -252,6 +252,6 @@ cc_library( deps = [ ":verilog-parser", ":verilog-token-enum", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) diff --git a/verilog/parser/verilog_lexical_context.h b/verilog/parser/verilog_lexical_context.h index 7e891e55a..f66be1b9d 100644 --- a/verilog/parser/verilog_lexical_context.h +++ b/verilog/parser/verilog_lexical_context.h @@ -16,7 +16,6 @@ #define VERIBLE_VERILOG_PARSER_VERILOG_LEXICAL_CONTEXT_H_ #include -#include #include #include diff --git a/verilog/preprocessor/BUILD b/verilog/preprocessor/BUILD index f7ff02c0c..d82827a87 100644 --- a/verilog/preprocessor/BUILD +++ b/verilog/preprocessor/BUILD @@ -21,7 +21,6 @@ cc_library( "//common/text:token-info", "//common/text:token-stream-view", "//common/util:container-util", - "//common/util:file-util", "//common/util:logging", "//common/util:status-macros", "//verilog/analysis:verilog-filelist", @@ -31,6 +30,7 @@ cc_library( "@com_google_absl//absl/status", "@com_google_absl//absl/status:statusor", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) @@ -50,6 +50,7 @@ cc_test( "//verilog/parser:verilog-token-enum", "@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", ], diff --git a/verilog/preprocessor/verilog_preprocess.cc b/verilog/preprocessor/verilog_preprocess.cc index 97f31a1db..17da89a3f 100644 --- a/verilog/preprocessor/verilog_preprocess.cc +++ b/verilog/preprocessor/verilog_preprocess.cc @@ -31,7 +31,6 @@ #include "common/text/token_info.h" #include "common/text/token_stream_view.h" #include "common/util/container_util.h" -#include "common/util/file_util.h" #include "common/util/logging.h" #include "common/util/status_macros.h" #include "verilog/parser/verilog_lexer.h" diff --git a/verilog/tools/diff/BUILD b/verilog/tools/diff/BUILD index 4013baece..997b379ec 100644 --- a/verilog/tools/diff/BUILD +++ b/verilog/tools/diff/BUILD @@ -16,7 +16,6 @@ cc_binary( features = STATIC_EXECUTABLES_FEATURE, visibility = ["//visibility:public"], deps = [ - "//common/strings:obfuscator", "//common/util:enum-flags", "//common/util:file-util", "//common/util:init-command-line", @@ -24,6 +23,7 @@ cc_binary( "//verilog/analysis:verilog-equivalence", "@com_google_absl//absl/flags:flag", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) diff --git a/verilog/tools/diff/verilog_diff.cc b/verilog/tools/diff/verilog_diff.cc index 30bff7835..195175e48 100644 --- a/verilog/tools/diff/verilog_diff.cc +++ b/verilog/tools/diff/verilog_diff.cc @@ -30,7 +30,6 @@ #include "absl/flags/flag.h" #include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" -#include "common/strings/obfuscator.h" #include "common/util/enum_flags.h" #include "common/util/file_util.h" #include "common/util/init_command_line.h" diff --git a/verilog/tools/formatter/BUILD b/verilog/tools/formatter/BUILD index 979a0d551..d16b184ed 100644 --- a/verilog/tools/formatter/BUILD +++ b/verilog/tools/formatter/BUILD @@ -20,7 +20,6 @@ cc_binary( "//common/util:file-util", "//common/util:init-command-line", "//common/util:interval-set", - "//common/util:logging", "//verilog/formatting:format-style", "//verilog/formatting:format-style-init", "//verilog/formatting:formatter", @@ -28,6 +27,7 @@ cc_binary( "@com_google_absl//absl/flags:usage", "@com_google_absl//absl/status", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) diff --git a/verilog/tools/kythe/BUILD b/verilog/tools/kythe/BUILD index 8bd1a5576..00bf1743c 100644 --- a/verilog/tools/kythe/BUILD +++ b/verilog/tools/kythe/BUILD @@ -32,6 +32,7 @@ cc_library( "@com_google_absl//absl/hash", "@com_google_absl//absl/log:check", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) @@ -56,6 +57,7 @@ cc_library( "@com_google_absl//absl/container:flat_hash_set", "@com_google_absl//absl/container:node_hash_map", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) @@ -65,7 +67,7 @@ cc_test( deps = [ ":kythe-facts", ":scope-resolver", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", ], @@ -77,13 +79,14 @@ cc_library( deps = [ ":indexing-facts-tree", "//common/util:auto-pop-stack", + "//common/util:logging", ], ) cc_library( name = "kythe-schema-constants", hdrs = ["kythe_schema_constants.h"], - deps = ["@com_google_absl//absl/strings"], + deps = ["@com_google_absl//absl/strings:string_view"], ) cc_library( @@ -100,11 +103,11 @@ cc_library( "//common/util:logging", "//common/util:tree-operations", "//verilog/analysis:verilog-project", - "@com_google_absl//absl/container:btree", "@com_google_absl//absl/container:flat_hash_set", "@com_google_absl//absl/container:node_hash_set", "@com_google_absl//absl/hash", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", "@com_google_absl//absl/time", ], ) @@ -129,12 +132,10 @@ cc_library( deps = [ ":verilog-extractor-indexing-fact-type", "//common/text:token-info", - "//common/util:range", "//common/util:tree-operations", "//common/util:vector-tree", - "@com_google_absl//absl/memory", "@com_google_absl//absl/strings", - "@com_google_absl//absl/strings:str_format", + "@com_google_absl//absl/strings:string_view", ], ) @@ -144,10 +145,8 @@ cc_test( deps = [ ":indexing-facts-tree", ":verilog-extractor-indexing-fact-type", - "//common/text:token-info", "//common/util:range", - "@com_google_absl//absl/memory", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", ], @@ -160,11 +159,11 @@ cc_library( deps = [ ":indexing-facts-tree", ":indexing-facts-tree-context", + ":verilog-extractor-indexing-fact-type", "//common/text:concrete-syntax-tree", + "//common/text:token-info", "//common/text:tree-context-visitor", "//common/text:tree-utils", - "//common/util:file-util", - "//common/util:iterator-range", "//common/util:logging", "//common/util:tree-operations", "//verilog/CST:class", @@ -182,11 +181,10 @@ cc_library( "//verilog/CST:type", "//verilog/CST:verilog-matchers", "//verilog/CST:verilog-nonterminals", - "//verilog/CST:verilog-tree-print", - "//verilog/analysis:verilog-analyzer", "//verilog/analysis:verilog-project", "@com_google_absl//absl/status", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) @@ -198,15 +196,13 @@ cc_test( ":indexing-facts-tree-extractor", ":verilog-extractor-indexing-fact-type", "//common/analysis:syntax-tree-search-test-utils", - "//common/text:concrete-syntax-tree", "//common/util:file-util", "//common/util:logging", - "//common/util:range", "//common/util:tree-operations", - "//verilog/analysis:verilog-analyzer", "//verilog/analysis:verilog-project", "@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", ], @@ -234,6 +230,7 @@ cc_binary( features = STATIC_EXECUTABLES_FEATURE, visibility = ["//visibility:public"], deps = [ + ":indexing-facts-tree", ":indexing-facts-tree-extractor", ":kythe-facts-extractor", ":kythe-proto-output", @@ -250,6 +247,7 @@ cc_binary( "@com_google_absl//absl/flags:flag", "@com_google_absl//absl/status", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", "@com_google_absl//absl/types:span", ], ) @@ -287,7 +285,7 @@ cc_library( "//common/util:simple-zip", "//third_party/proto/kythe:analysis_cc_proto", "@com_google_absl//absl/status", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) @@ -307,5 +305,6 @@ cc_binary( "//verilog/analysis:verilog-filelist", "@com_google_absl//absl/flags:flag", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) diff --git a/verilog/tools/kythe/indexing_facts_tree.cc b/verilog/tools/kythe/indexing_facts_tree.cc index c03506593..10de8a8f0 100644 --- a/verilog/tools/kythe/indexing_facts_tree.cc +++ b/verilog/tools/kythe/indexing_facts_tree.cc @@ -19,11 +19,8 @@ #include #include -#include "absl/memory/memory.h" #include "absl/strings/str_cat.h" -#include "absl/strings/str_format.h" #include "absl/strings/str_join.h" -#include "common/util/range.h" #include "common/util/tree_operations.h" namespace verilog { diff --git a/verilog/tools/kythe/indexing_facts_tree.h b/verilog/tools/kythe/indexing_facts_tree.h index eaf56c68e..3b3e2aef4 100644 --- a/verilog/tools/kythe/indexing_facts_tree.h +++ b/verilog/tools/kythe/indexing_facts_tree.h @@ -16,7 +16,6 @@ #define VERIBLE_VERILOG_TOOLS_KYTHE_INDEXING_FACTS_TREE_H_ #include -#include #include #include #include diff --git a/verilog/tools/kythe/indexing_facts_tree_extractor.cc b/verilog/tools/kythe/indexing_facts_tree_extractor.cc index 9f35d03e6..1bd966df3 100644 --- a/verilog/tools/kythe/indexing_facts_tree_extractor.cc +++ b/verilog/tools/kythe/indexing_facts_tree_extractor.cc @@ -25,9 +25,9 @@ #include "absl/strings/string_view.h" #include "absl/strings/strip.h" #include "common/text/concrete_syntax_tree.h" +#include "common/text/token_info.h" #include "common/text/tree_context_visitor.h" #include "common/text/tree_utils.h" -#include "common/util/file_util.h" #include "common/util/logging.h" #include "common/util/tree_operations.h" #include "verilog/CST/class.h" @@ -45,11 +45,10 @@ #include "verilog/CST/type.h" #include "verilog/CST/verilog_matchers.h" #include "verilog/CST/verilog_nonterminals.h" -#include "verilog/CST/verilog_tree_print.h" -#include "verilog/analysis/verilog_analyzer.h" #include "verilog/analysis/verilog_project.h" #include "verilog/tools/kythe/indexing_facts_tree.h" #include "verilog/tools/kythe/indexing_facts_tree_context.h" +#include "verilog/tools/kythe/verilog_extractor_indexing_fact_type.h" namespace verilog { namespace kythe { diff --git a/verilog/tools/kythe/indexing_facts_tree_extractor_test.cc b/verilog/tools/kythe/indexing_facts_tree_extractor_test.cc index 8b92a3939..1a1d0c49a 100644 --- a/verilog/tools/kythe/indexing_facts_tree_extractor_test.cc +++ b/verilog/tools/kythe/indexing_facts_tree_extractor_test.cc @@ -22,13 +22,10 @@ #include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" #include "common/analysis/syntax_tree_search_test_utils.h" -#include "common/text/concrete_syntax_tree.h" #include "common/util/file_util.h" #include "common/util/logging.h" -#include "common/util/range.h" #include "common/util/tree_operations.h" #include "gtest/gtest.h" -#include "verilog/analysis/verilog_analyzer.h" #include "verilog/analysis/verilog_project.h" #include "verilog/tools/kythe/indexing_facts_tree.h" #include "verilog/tools/kythe/verilog_extractor_indexing_fact_type.h" diff --git a/verilog/tools/kythe/indexing_facts_tree_test.cc b/verilog/tools/kythe/indexing_facts_tree_test.cc index feb7d8a67..f2e7b135f 100644 --- a/verilog/tools/kythe/indexing_facts_tree_test.cc +++ b/verilog/tools/kythe/indexing_facts_tree_test.cc @@ -17,9 +17,7 @@ #include #include -#include "absl/memory/memory.h" #include "absl/strings/string_view.h" -#include "common/text/token_info.h" #include "common/util/range.h" #include "gtest/gtest.h" #include "verilog/tools/kythe/verilog_extractor_indexing_fact_type.h" diff --git a/verilog/tools/kythe/kythe_facts_extractor.cc b/verilog/tools/kythe/kythe_facts_extractor.cc index 61044ab27..90f3c45f5 100644 --- a/verilog/tools/kythe/kythe_facts_extractor.cc +++ b/verilog/tools/kythe/kythe_facts_extractor.cc @@ -31,6 +31,8 @@ #include "common/util/auto_pop_stack.h" #include "common/util/logging.h" #include "common/util/tree_operations.h" +#include "verilog/tools/kythe/indexing_facts_tree.h" +#include "verilog/tools/kythe/kythe_facts.h" #include "verilog/tools/kythe/kythe_schema_constants.h" #include "verilog/tools/kythe/scope_resolver.h" #include "verilog/tools/kythe/verilog_extractor_indexing_fact_type.h" diff --git a/verilog/tools/kythe/kythe_facts_extractor.h b/verilog/tools/kythe/kythe_facts_extractor.h index 31b61ff82..9fb163efd 100644 --- a/verilog/tools/kythe/kythe_facts_extractor.h +++ b/verilog/tools/kythe/kythe_facts_extractor.h @@ -16,7 +16,6 @@ #define VERIBLE_VERILOG_TOOLS_KYTHE_KYTHE_FACTS_EXTRACTOR_H_ #include -#include #include "verilog/analysis/verilog_project.h" #include "verilog/tools/kythe/indexing_facts_tree.h" diff --git a/verilog/tools/kythe/kythe_proto_output.cc b/verilog/tools/kythe/kythe_proto_output.cc index 65a295f79..89e7bcf19 100644 --- a/verilog/tools/kythe/kythe_proto_output.cc +++ b/verilog/tools/kythe/kythe_proto_output.cc @@ -20,7 +20,6 @@ #include "google/protobuf/io/zero_copy_stream_impl.h" #include "third_party/proto/kythe/storage.pb.h" #include "verilog/tools/kythe/kythe_facts.h" -#include "verilog/tools/kythe/kythe_facts_extractor.h" namespace verilog { namespace kythe { diff --git a/verilog/tools/kythe/scope_resolver.h b/verilog/tools/kythe/scope_resolver.h index 5deba61c8..33f6151fa 100644 --- a/verilog/tools/kythe/scope_resolver.h +++ b/verilog/tools/kythe/scope_resolver.h @@ -15,12 +15,9 @@ #ifndef VERIBLE_VERILOG_TOOLS_KYTHE_SCOPE_RESOLVER_H_ #define VERIBLE_VERILOG_TOOLS_KYTHE_SCOPE_RESOLVER_H_ -#include #include -#include #include #include -#include #include "absl/container/flat_hash_map.h" #include "absl/container/flat_hash_set.h" diff --git a/verilog/tools/kythe/verilog_kythe_extractor.cc b/verilog/tools/kythe/verilog_kythe_extractor.cc index f81b95fe4..573b835e6 100644 --- a/verilog/tools/kythe/verilog_kythe_extractor.cc +++ b/verilog/tools/kythe/verilog_kythe_extractor.cc @@ -21,14 +21,12 @@ #include "absl/status/status.h" #include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" -#include "absl/strings/substitute.h" #include "common/util/enum_flags.h" -#include "common/util/file_util.h" #include "common/util/init_command_line.h" #include "common/util/logging.h" -#include "common/util/tree_operations.h" -#include "verilog/analysis/verilog_analyzer.h" +#include "common/util/tree_operations.h" // Keep. Figure out what needed #include "verilog/analysis/verilog_project.h" +#include "verilog/tools/kythe/indexing_facts_tree.h" #include "verilog/tools/kythe/indexing_facts_tree_extractor.h" #include "verilog/tools/kythe/kythe_facts_extractor.h" #include "verilog/tools/kythe/kythe_proto_output.h" diff --git a/verilog/tools/kythe/verilog_kythe_kzip_writer.cc b/verilog/tools/kythe/verilog_kythe_kzip_writer.cc index 541cc1381..f4725a088 100644 --- a/verilog/tools/kythe/verilog_kythe_kzip_writer.cc +++ b/verilog/tools/kythe/verilog_kythe_kzip_writer.cc @@ -16,8 +16,6 @@ #include #include "absl/flags/flag.h" -#include "absl/strings/ascii.h" -#include "absl/strings/escaping.h" #include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" #include "common/util/file_util.h" diff --git a/verilog/tools/lint/verilog_lint.cc b/verilog/tools/lint/verilog_lint.cc index 81fc2ff09..fb59aadeb 100644 --- a/verilog/tools/lint/verilog_lint.cc +++ b/verilog/tools/lint/verilog_lint.cc @@ -32,7 +32,6 @@ #include "absl/strings/string_view.h" #include "common/analysis/violation_handler.h" #include "common/util/enum_flags.h" -#include "common/util/file_util.h" #include "common/util/init_command_line.h" #include "common/util/logging.h" // for operator<<, LOG, LogMessage, etc #include "verilog/analysis/verilog_linter.h" diff --git a/verilog/tools/ls/BUILD b/verilog/tools/ls/BUILD index 29ff1924b..ed3e55dbd 100644 --- a/verilog/tools/ls/BUILD +++ b/verilog/tools/ls/BUILD @@ -20,6 +20,7 @@ cc_library( ":symbol-table-handler", "//common/lsp:lsp-protocol", "//common/text:text-structure", + "//common/text:token-info", "//common/util:logging", "//verilog/CST:declaration", "//verilog/CST:dimensions", @@ -32,12 +33,14 @@ cc_library( "//verilog/CST:verilog-matchers", "//verilog/CST:verilog-nonterminals", "//verilog/analysis:symbol-table", + "//verilog/formatting:format-style", "//verilog/formatting:format-style-init", "//verilog/formatting:formatter", "@com_google_absl//absl/container:flat_hash_map", "@com_google_absl//absl/container:flat_hash_set", "@com_google_absl//absl/container:node_hash_map", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", "@com_googlesource_code_re2//:re2", ], ) @@ -83,12 +86,15 @@ cc_library( "//common/lsp:lsp-protocol-enums", "//common/lsp:lsp-protocol-operators", "//common/text:text-structure", + "//common/text:token-info", "//verilog/analysis:verilog-analyzer", "//verilog/analysis:verilog-linter", + "//verilog/formatting:format-style", "//verilog/formatting:format-style-init", "//verilog/formatting:formatter", "//verilog/parser:verilog-token-enum", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", "@jsonhpp", ], ) @@ -111,6 +117,7 @@ cc_library( "//common/lsp:lsp-protocol", "//common/lsp:lsp-protocol-enums", "//common/text:text-structure", + "//common/text:token-info", "//common/text:visitors", "//common/util:value-saver", "//verilog/CST:class", @@ -120,6 +127,7 @@ cc_library( "//verilog/CST:seq-block", "//verilog/CST:verilog-nonterminals", "@com_google_absl//absl/flags:flag", + "@jsonhpp", ], ) @@ -149,6 +157,7 @@ cc_library( "@com_google_absl//absl/status", "@com_google_absl//absl/strings", "@com_google_absl//absl/strings:str_format", + "@com_google_absl//absl/strings:string_view", "@com_google_absl//absl/time", "@com_google_absl//absl/types:optional", ], @@ -165,6 +174,7 @@ cc_test( "//common/util:file-util", "//verilog/analysis:verilog-project", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", ], @@ -189,6 +199,8 @@ cc_library( "@com_google_absl//absl/flags:flag", "@com_google_absl//absl/status", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", + "@jsonhpp", ], ) @@ -203,9 +215,12 @@ cc_test( "//common/util:file-util", "//verilog/analysis:verilog-linter", "@com_google_absl//absl/flags:flag", + "@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", + "@jsonhpp", ], ) @@ -218,7 +233,7 @@ cc_binary( ":verilog-language-server", "//common/util:init-command-line", "@com_google_absl//absl/status", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) @@ -245,10 +260,13 @@ cc_test( ":verible-lsp-adapter", "//common/lsp:lsp-protocol", "//common/lsp:lsp-text-buffer", + "//verilog/formatting:format-style", "//verilog/formatting:format-style-init", "//verilog/formatting:formatter", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", + "@jsonhpp", ], ) diff --git a/verilog/tools/ls/autoexpand.cc b/verilog/tools/ls/autoexpand.cc index 1ba6bd997..1d5010ddc 100644 --- a/verilog/tools/ls/autoexpand.cc +++ b/verilog/tools/ls/autoexpand.cc @@ -36,6 +36,7 @@ #include "absl/strings/string_view.h" #include "common/lsp/lsp-protocol.h" #include "common/text/text_structure.h" +#include "common/text/token_info.h" #include "common/util/logging.h" #include "re2/re2.h" #include "verilog/CST/declaration.h" @@ -46,6 +47,7 @@ #include "verilog/CST/type.h" #include "verilog/CST/verilog_matchers.h" // IWYU pragma: keep #include "verilog/CST/verilog_nonterminals.h" +#include "verilog/formatting/format_style.h" #include "verilog/formatting/format_style_init.h" #include "verilog/formatting/formatter.h" diff --git a/verilog/tools/ls/autoexpand_test.cc b/verilog/tools/ls/autoexpand_test.cc index aca08bee7..7353641de 100644 --- a/verilog/tools/ls/autoexpand_test.cc +++ b/verilog/tools/ls/autoexpand_test.cc @@ -28,6 +28,8 @@ #include "common/lsp/lsp-protocol.h" #include "common/lsp/lsp-text-buffer.h" #include "gtest/gtest.h" +#include "nlohmann/json.hpp" +#include "verilog/formatting/format_style.h" #include "verilog/formatting/format_style_init.h" #include "verilog/formatting/formatter.h" diff --git a/verilog/tools/ls/document-symbol-filler.cc b/verilog/tools/ls/document-symbol-filler.cc index bf460183c..dcbd3b4ab 100644 --- a/verilog/tools/ls/document-symbol-filler.cc +++ b/verilog/tools/ls/document-symbol-filler.cc @@ -16,10 +16,11 @@ #include -#include "absl/flags/flag.h" #include "common/lsp/lsp-protocol-enums.h" #include "common/lsp/lsp-protocol.h" +#include "common/text/token_info.h" #include "common/util/value_saver.h" +#include "nlohmann/json.hpp" #include "verilog/CST/class.h" #include "verilog/CST/functions.h" #include "verilog/CST/module.h" diff --git a/verilog/tools/ls/document-symbol-filler.h b/verilog/tools/ls/document-symbol-filler.h index 68e563392..f6ad2bc36 100644 --- a/verilog/tools/ls/document-symbol-filler.h +++ b/verilog/tools/ls/document-symbol-filler.h @@ -17,6 +17,7 @@ #include "common/lsp/lsp-protocol.h" #include "common/text/text_structure.h" +#include "common/text/token_info.h" #include "common/text/visitors.h" namespace verilog { diff --git a/verilog/tools/ls/symbol-table-handler.cc b/verilog/tools/ls/symbol-table-handler.cc index ccf2c841b..78f2c0a98 100644 --- a/verilog/tools/ls/symbol-table-handler.cc +++ b/verilog/tools/ls/symbol-table-handler.cc @@ -25,13 +25,13 @@ #include "absl/container/flat_hash_map.h" #include "absl/flags/flag.h" +#include "absl/status/status.h" #include "absl/strings/str_format.h" #include "absl/strings/string_view.h" #include "absl/time/clock.h" #include "absl/time/time.h" #include "common/lsp/lsp-file-utils.h" #include "common/lsp/lsp-protocol.h" -#include "common/lsp/lsp-text-buffer.h" #include "common/strings/line_column_map.h" #include "common/text/text_structure.h" #include "common/text/token_info.h" @@ -39,6 +39,7 @@ #include "common/util/iterator_adaptors.h" #include "common/util/logging.h" #include "common/util/range.h" +#include "verilog/analysis/symbol_table.h" #include "verilog/analysis/verilog_filelist.h" #include "verilog/tools/ls/lsp-conversion.h" #include "verilog/tools/ls/lsp-parse-buffer.h" diff --git a/verilog/tools/ls/symbol-table-handler.h b/verilog/tools/ls/symbol-table-handler.h index 4f2d57ed2..b928bab24 100644 --- a/verilog/tools/ls/symbol-table-handler.h +++ b/verilog/tools/ls/symbol-table-handler.h @@ -22,11 +22,11 @@ #include #include -#include "absl/container/flat_hash_set.h" #include "absl/status/status.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" #include "common/lsp/lsp-protocol.h" +#include "common/text/token_info.h" #include "verilog/analysis/symbol_table.h" #include "verilog/analysis/verilog_project.h" #include "verilog/tools/ls/lsp-parse-buffer.h" diff --git a/verilog/tools/ls/verible-lsp-adapter.cc b/verilog/tools/ls/verible-lsp-adapter.cc index 3aaf946f4..1a37770f8 100644 --- a/verilog/tools/ls/verible-lsp-adapter.cc +++ b/verilog/tools/ls/verible-lsp-adapter.cc @@ -25,9 +25,11 @@ #include "common/lsp/lsp-protocol-operators.h" #include "common/lsp/lsp-protocol.h" #include "common/text/text_structure.h" +#include "common/text/token_info.h" #include "nlohmann/json.hpp" #include "verilog/analysis/verilog_analyzer.h" #include "verilog/analysis/verilog_linter.h" +#include "verilog/formatting/format_style.h" #include "verilog/formatting/format_style_init.h" #include "verilog/formatting/formatter.h" #include "verilog/parser/verilog_token_enum.h" diff --git a/verilog/tools/ls/verilog-language-server.cc b/verilog/tools/ls/verilog-language-server.cc index 1453dc541..db4a3b787 100644 --- a/verilog/tools/ls/verilog-language-server.cc +++ b/verilog/tools/ls/verilog-language-server.cc @@ -28,6 +28,7 @@ #include "common/util/file_util.h" #include "common/util/init_command_line.h" #include "common/util/logging.h" +#include "nlohmann/json.hpp" #include "verilog/tools/ls/verible-lsp-adapter.h" ABSL_FLAG(bool, variables_in_outline, true, diff --git a/verilog/tools/ls/verilog-language-server_test.cc b/verilog/tools/ls/verilog-language-server_test.cc index d715bbd77..2c9f4a5bf 100644 --- a/verilog/tools/ls/verilog-language-server_test.cc +++ b/verilog/tools/ls/verilog-language-server_test.cc @@ -22,6 +22,7 @@ #include #include "absl/flags/flag.h" +#include "absl/status/status.h" #include "absl/strings/match.h" #include "absl/strings/str_cat.h" #include "absl/strings/str_replace.h" @@ -31,6 +32,7 @@ #include "common/lsp/lsp-protocol.h" #include "common/util/file_util.h" #include "gtest/gtest.h" +#include "nlohmann/json.hpp" #include "verilog/analysis/verilog_linter.h" #undef ASSERT_OK diff --git a/verilog/tools/obfuscator/BUILD b/verilog/tools/obfuscator/BUILD index e8eac7a45..b075013df 100644 --- a/verilog/tools/obfuscator/BUILD +++ b/verilog/tools/obfuscator/BUILD @@ -20,10 +20,10 @@ cc_binary( "//common/util:file-util", "//common/util:init-command-line", "//verilog/analysis:extractors", - "//verilog/analysis:verilog-analyzer", "//verilog/transform:obfuscate", "@com_google_absl//absl/flags:flag", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) diff --git a/verilog/tools/obfuscator/verilog_obfuscate.cc b/verilog/tools/obfuscator/verilog_obfuscate.cc index f40344018..32a77c3f6 100644 --- a/verilog/tools/obfuscator/verilog_obfuscate.cc +++ b/verilog/tools/obfuscator/verilog_obfuscate.cc @@ -32,7 +32,6 @@ #include "common/util/file_util.h" #include "common/util/init_command_line.h" #include "verilog/analysis/extractors.h" -#include "verilog/analysis/verilog_analyzer.h" #include "verilog/transform/obfuscate.h" using verible::IdentifierObfuscator; diff --git a/verilog/tools/preprocessor/BUILD b/verilog/tools/preprocessor/BUILD index 880814de3..8aaa1bb52 100644 --- a/verilog/tools/preprocessor/BUILD +++ b/verilog/tools/preprocessor/BUILD @@ -30,6 +30,7 @@ cc_binary( "@com_google_absl//absl/flags:usage", "@com_google_absl//absl/status", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) diff --git a/verilog/tools/project/BUILD b/verilog/tools/project/BUILD index 68831e8d3..fca74cf02 100644 --- a/verilog/tools/project/BUILD +++ b/verilog/tools/project/BUILD @@ -27,6 +27,7 @@ cc_binary( "@com_google_absl//absl/flags:usage", "@com_google_absl//absl/status", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) diff --git a/verilog/tools/syntax/BUILD b/verilog/tools/syntax/BUILD index 0f87069e0..df2495e81 100644 --- a/verilog/tools/syntax/BUILD +++ b/verilog/tools/syntax/BUILD @@ -15,14 +15,12 @@ cc_binary( features = STATIC_EXECUTABLES_FEATURE, visibility = ["//visibility:public"], # for verilog_style_lint.bzl deps = [ - "//common/strings:compare", "//common/strings:mem-block", "//common/text:concrete-syntax-tree", "//common/text:parser-verifier", "//common/text:text-structure", "//common/text:token-info", "//common/text:token-info-json", - "//common/util:bijective-map", "//common/util:enum-flags", "//common/util:file-util", "//common/util:init-command-line", @@ -38,7 +36,7 @@ cc_binary( "@com_google_absl//absl/flags:flag", "@com_google_absl//absl/status", "@com_google_absl//absl/strings", - "@com_google_absl//absl/types:span", + "@com_google_absl//absl/strings:string_view", "@jsonhpp", ], ) diff --git a/verilog/tools/syntax/verilog_syntax.cc b/verilog/tools/syntax/verilog_syntax.cc index 779b936d8..10ddb9768 100644 --- a/verilog/tools/syntax/verilog_syntax.cc +++ b/verilog/tools/syntax/verilog_syntax.cc @@ -32,8 +32,6 @@ #include "absl/status/status.h" #include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" -#include "absl/types/span.h" // for MakeArraySlice -#include "common/strings/compare.h" #include "common/strings/mem_block.h" #include "common/text/concrete_syntax_tree.h" #include "common/text/parser_verifier.h" diff --git a/verilog/transform/BUILD b/verilog/transform/BUILD index add8a01f4..fec551f60 100644 --- a/verilog/transform/BUILD +++ b/verilog/transform/BUILD @@ -26,6 +26,7 @@ cc_library( "//verilog/parser:verilog-token-enum", "@com_google_absl//absl/status", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) @@ -35,6 +36,7 @@ cc_test( deps = [ ":obfuscate", "//common/strings:obfuscator", + "@com_google_absl//absl/status", "@com_google_absl//absl/strings:string_view", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", @@ -56,6 +58,7 @@ cc_library( "//verilog/parser:verilog-parser", "//verilog/parser:verilog-token-enum", "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", ], ) @@ -64,7 +67,7 @@ cc_test( srcs = ["strip_comments_test.cc"], deps = [ ":strip-comments", - "@com_google_absl//absl/strings", + "@com_google_absl//absl/strings:string_view", "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", ], diff --git a/verilog/transform/obfuscate_test.cc b/verilog/transform/obfuscate_test.cc index 965e315c3..7cfa14b81 100644 --- a/verilog/transform/obfuscate_test.cc +++ b/verilog/transform/obfuscate_test.cc @@ -18,6 +18,7 @@ #include #include +#include "absl/status/status.h" #include "absl/strings/string_view.h" #include "common/strings/obfuscator.h" #include "gtest/gtest.h"