Skip to content

Commit

Permalink
Merge pull request #2117 from hzeller/feature-20240222-more-cleanups2
Browse files Browse the repository at this point in the history
More header cleanups: add needed, removed unnneded.
  • Loading branch information
hzeller authored Feb 24, 2024
2 parents 528d284 + 42baa3b commit b36e497
Show file tree
Hide file tree
Showing 221 changed files with 593 additions and 95 deletions.
13 changes: 12 additions & 1 deletion common/analysis/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ package(
"//verilog/analysis:__subpackages__",
"//verilog/tools/kythe:__pkg__",
"//verilog/tools/lint:__subpackages__",
"//verilog/tools/ls:__subpackages__",
],
# Not yet enabled, lexer does not find FlexLexer.h
#features = ["layering_check"],
Expand Down Expand Up @@ -78,6 +79,7 @@ cc_library(
"//common/lexer:token-stream-adapter",
"//common/text:token-info",
"//common/text:token-stream-view",
"//common/util:iterator-range",
"//common/util:logging",
"@com_google_absl//absl/strings:string_view",
],
Expand Down Expand Up @@ -106,7 +108,9 @@ cc_test(
deps = [
":command-file-lexer",
"//common/lexer:lexer-test-util",
"//common/text:constants",
"//common/text:token-info",
"//common/text:token-info-test-util",
"@com_google_absl//absl/strings:string_view",
"@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
Expand Down Expand Up @@ -136,6 +140,7 @@ cc_library(
"//common/util:iterator-range",
"//common/util:logging",
"@com_google_absl//absl/status",
"@com_google_absl//absl/status:statusor",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/strings:string_view",
],
Expand All @@ -150,6 +155,7 @@ cc_library(
"//common/lexer:token-stream-adapter",
"//common/parser:parse",
"//common/strings:line-column-map",
"//common/strings:mem-block",
"//common/text:concrete-syntax-tree",
"//common/text:text-structure",
"//common/text:token-info",
Expand Down Expand Up @@ -188,6 +194,7 @@ cc_library(
":syntax-tree-search",
"//common/lexer:lexer-test-util",
"//common/text:token-info",
"//common/text:token-info-test-util",
"//common/text:tree-utils",
"//common/util:algorithm",
"//common/util:logging",
Expand Down Expand Up @@ -242,7 +249,6 @@ cc_library(
"//common/text:concrete-syntax-leaf",
"//common/text:concrete-syntax-tree",
"//common/text:symbol",
"//common/text:syntax-tree-context",
"//common/text:tree-context-visitor",
"//common/util:logging",
],
Expand Down Expand Up @@ -311,7 +317,9 @@ cc_library(
deps = [
":lint-rule-status",
":linter-test-utils",
":text-structure-lint-rule",
":text-structure-linter",
"//common/text:text-structure",
"//common/util:logging",
"@com_google_absl//absl/strings:string_view",
"@com_google_googletest//:gtest", # for library testonly
Expand Down Expand Up @@ -400,6 +408,7 @@ cc_test(
srcs = ["file_analyzer_test.cc"],
deps = [
":file-analyzer",
"//common/strings:line-column-map",
"//common/text:text-structure",
"//common/text:token-info",
"@com_google_absl//absl/status",
Expand Down Expand Up @@ -451,6 +460,7 @@ cc_test(
"//common/text:syntax-tree-context",
"//common/text:token-info",
"//common/text:tree-builder-test-util",
"//common/util:casts",
"@com_google_absl//absl/strings:string_view",
"@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
Expand All @@ -476,6 +486,7 @@ cc_test(
name = "syntax-tree-search-test-utils_test",
srcs = ["syntax_tree_search_test_utils_test.cc"],
deps = [
":syntax-tree-search",
":syntax-tree-search-test-utils",
"//common/text:tree-builder-test-util",
"//common/util:range",
Expand Down
2 changes: 2 additions & 0 deletions common/analysis/command_file_lexer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
#include "absl/strings/string_view.h"
#include "common/lexer/token_stream_adapter.h"
#include "common/text/token_info.h"
#include "common/text/token_stream_view.h"
#include "common/util/iterator_range.h"
#include "common/util/logging.h"

namespace verible {
Expand Down
2 changes: 2 additions & 0 deletions common/analysis/command_file_lexer_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@

#include "absl/strings/string_view.h"
#include "common/lexer/lexer_test_util.h"
#include "common/text/constants.h"
#include "common/text/token_info.h"
#include "common/text/token_info_test_util.h"
#include "gtest/gtest.h"

namespace verible {
Expand Down
3 changes: 3 additions & 0 deletions common/analysis/file_analyzer.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@
#include "absl/strings/string_view.h"
#include "common/lexer/lexer.h"
#include "common/parser/parse.h"
#include "common/strings/line_column_map.h"
#include "common/strings/mem_block.h"
#include "common/text/concrete_syntax_tree.h"
#include "common/text/text_structure.h"
#include "common/text/token_info.h"
#include "common/util/logging.h"
Expand Down
1 change: 1 addition & 0 deletions common/analysis/file_analyzer_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "absl/status/status.h"
#include "absl/strings/match.h"
#include "absl/strings/string_view.h"
#include "common/strings/line_column_map.h"
#include "common/text/text_structure.h"
#include "common/text/token_info.h"
#include "gtest/gtest.h"
Expand Down
1 change: 1 addition & 0 deletions common/analysis/lint_rule_status_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

#include "common/analysis/lint_rule_status.h"

#include <cstring>
#include <iostream>
#include <set>
#include <sstream> // IWYU pragma: keep // for ostringstream
Expand Down
4 changes: 4 additions & 0 deletions common/analysis/lint_waiver.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,20 @@
#include <vector>

#include "absl/status/status.h"
#include "absl/status/statusor.h"
#include "absl/strings/numbers.h"
#include "absl/strings/str_cat.h"
#include "absl/strings/str_split.h"
#include "absl/strings/string_view.h"
#include "common/analysis/command_file_lexer.h"
#include "common/strings/comment_utils.h"
#include "common/strings/line_column_map.h"
#include "common/strings/position.h"
#include "common/text/text_structure.h"
#include "common/text/token_info.h"
#include "common/text/token_stream_view.h"
#include "common/util/container_iterator_range.h"
#include "common/util/container_util.h"
#include "common/util/file_util.h"
#include "common/util/iterator_range.h"
#include "common/util/logging.h"
Expand Down
3 changes: 3 additions & 0 deletions common/analysis/lint_waiver.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,12 @@
#include <utility>
#include <vector>

#include "absl/status/status.h"
#include "absl/strings/string_view.h"
#include "common/strings/line_column_map.h"
#include "common/strings/position.h"
#include "common/text/text_structure.h"
#include "common/text/token_stream_view.h"
#include "common/util/container_util.h"

namespace verible {
Expand Down
4 changes: 4 additions & 0 deletions common/analysis/matcher/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ cc_test(
"//common/text:concrete-syntax-tree",
"//common/text:symbol",
"//common/text:tree-builder-test-util",
"//common/util:casts",
"@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
Expand Down Expand Up @@ -112,6 +113,7 @@ cc_test(
"//common/text:concrete-syntax-tree",
"//common/text:symbol",
"//common/text:tree-builder-test-util",
"//common/util:casts",
"@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
Expand All @@ -124,6 +126,7 @@ cc_library(
deps = [
"//common/text:concrete-syntax-tree",
"//common/text:symbol",
"//common/util:casts",
],
)

Expand All @@ -137,6 +140,7 @@ cc_test(
"//common/text:symbol",
"//common/text:token-info",
"//common/text:tree-builder-test-util",
"//common/util:casts",
"@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
Expand Down
1 change: 1 addition & 0 deletions common/analysis/matcher/descent_path.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

#include "common/text/concrete_syntax_tree.h"
#include "common/text/symbol.h"
#include "common/util/casts.h"

namespace verible {
namespace matcher {
Expand Down
1 change: 1 addition & 0 deletions common/analysis/matcher/descent_path_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "common/text/symbol.h"
#include "common/text/token_info.h"
#include "common/text/tree_builder_test_util.h"
#include "common/util/casts.h"
#include "gtest/gtest.h"

namespace verible {
Expand Down
1 change: 1 addition & 0 deletions common/analysis/matcher/matcher_builders_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include "common/text/concrete_syntax_tree.h"
#include "common/text/symbol.h"
#include "common/text/tree_builder_test_util.h"
#include "common/util/casts.h"
#include "gtest/gtest.h"

namespace verible {
Expand Down
1 change: 1 addition & 0 deletions common/analysis/matcher/matcher_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include "common/text/concrete_syntax_tree.h"
#include "common/text/symbol.h"
#include "common/text/tree_builder_test_util.h"
#include "common/util/casts.h"
#include "gtest/gtest.h"

namespace verible {
Expand Down
1 change: 1 addition & 0 deletions common/analysis/syntax_tree_linter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "common/text/concrete_syntax_leaf.h"
#include "common/text/concrete_syntax_tree.h"
#include "common/text/symbol.h"
#include "common/text/tree_context_visitor.h"
#include "common/util/logging.h"

namespace verible {
Expand Down
1 change: 0 additions & 1 deletion common/analysis/syntax_tree_linter.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,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/text/tree_context_visitor.h"

namespace verible {
Expand Down
1 change: 1 addition & 0 deletions common/analysis/syntax_tree_linter_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include "common/text/syntax_tree_context.h"
#include "common/text/token_info.h"
#include "common/text/tree_builder_test_util.h"
#include "common/util/casts.h"
#include "gtest/gtest.h"

namespace verible {
Expand Down
1 change: 0 additions & 1 deletion common/analysis/syntax_tree_linter_test_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#include "common/analysis/syntax_tree_linter.h"
#include "common/text/text_structure.h"
#include "common/util/logging.h"
#include "gtest/gtest.h"

namespace verible {

Expand Down
2 changes: 1 addition & 1 deletion common/analysis/syntax_tree_search_test_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include "absl/strings/string_view.h"
#include "common/analysis/syntax_tree_search.h"
#include "common/lexer/lexer_test_util.h"
#include "gtest/gtest.h"
#include "common/text/token_info_test_util.h"

namespace verible {

Expand Down
1 change: 1 addition & 0 deletions common/analysis/syntax_tree_search_test_utils_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

#include "absl/strings/match.h"
#include "absl/strings/string_view.h"
#include "common/analysis/syntax_tree_search.h"
#include "common/text/tree_builder_test_util.h"
#include "common/util/range.h"
#include "gtest/gtest.h"
Expand Down
3 changes: 2 additions & 1 deletion common/analysis/text_structure_linter_test_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@
#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_lint_rule.h"
#include "common/analysis/text_structure_linter.h"
#include "common/text/text_structure.h"
#include "common/util/logging.h"
#include "gtest/gtest.h"

namespace verible {

Expand Down
1 change: 1 addition & 0 deletions common/analysis/violation_handler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "absl/status/status.h"
#include "absl/strings/str_cat.h"
#include "absl/strings/string_view.h"
#include "common/analysis/lint_rule_status.h"
#include "common/strings/diff.h"
#include "common/util/file_util.h"
#include "common/util/logging.h"
Expand Down
Loading

0 comments on commit b36e497

Please sign in to comment.