Commit 242a7d3
authored
[rules score] Refactor libclang parser and Reuse in unit rule
refactor(cpp/libclang): extract reusable parser action
Move the C++ parser action setup into shared Starlark plumbing so it can be reused by both cpp_parser and other Bazel rules.
Switch parser outputs from an output directory to explicit class FlatBuffer and optional debug JSON files, and update the Rust CLI and docs to use those paths.
test(cpp/libclang): centralize parser integration case wiring
Add a shared integration test macro that wires the parser, expected output filegroup, debug JSON provider, and Rust comparison test for each case.
Update all parser integration BUILD files to use the macro and make the test framework consume the explicit debug JSON output path.
feat(rules_score): generate implementation class FBS in unit rule
Wire the libclang C++ parser action into the unit rule for implementation targets that provide parser inputs.
Collect generated class diagram FBS files in DefaultInfo, and add the parser toolchain attrs/aspects required by the reused action.1 parent c310490 commit 242a7d3
43 files changed
Lines changed: 511 additions & 770 deletions
File tree
- bazel/rules/rules_score/private
- cpp/libclang
- integration_test
- cases
- complex_class
- include_3rdparty
- method_parameter_type
- method_return_type
- nest_namespace_class
- relationship_aggregation
- relationship_association
- relationship_composition
- relationship_dependency
- relationship_implementation
- relationship_inheritance
- same_name_diff_namespace
- simple_enums
- simple_struct
- template_class
- type_alias
- variable_namespace
- src
- utils
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
| 24 | + | |
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
| 28 | + | |
26 | 29 | | |
27 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
28 | 48 | | |
29 | 49 | | |
30 | 50 | | |
| |||
59 | 79 | | |
60 | 80 | | |
61 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
62 | 96 | | |
63 | 97 | | |
64 | 98 | | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
69 | 107 | | |
70 | 108 | | |
71 | 109 | | |
72 | 110 | | |
73 | 111 | | |
74 | 112 | | |
75 | | - | |
| 113 | + | |
76 | 114 | | |
77 | 115 | | |
78 | 116 | | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | 117 | | |
85 | 118 | | |
86 | 119 | | |
| |||
104 | 137 | | |
105 | 138 | | |
106 | 139 | | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
107 | 165 | | |
108 | 166 | | |
109 | 167 | | |
110 | 168 | | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
133 | 172 | | |
134 | 173 | | |
135 | 174 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | 35 | | |
39 | 36 | | |
40 | 37 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
30 | 29 | | |
31 | 30 | | |
32 | 31 | | |
| |||
38 | 37 | | |
39 | 38 | | |
40 | 39 | | |
41 | | - | |
| 40 | + | |
42 | 41 | | |
43 | | - | |
| 42 | + | |
44 | 43 | | |
45 | 44 | | |
46 | 45 | | |
| |||
55 | 54 | | |
56 | 55 | | |
57 | 56 | | |
58 | | - | |
59 | | - | |
| 57 | + | |
| 58 | + | |
60 | 59 | | |
0 commit comments