Skip to content

Commit ccb77b8

Browse files
committed
Public version 0.2.0
1 parent e5cdfb9 commit ccb77b8

File tree

98 files changed

+3092
-1321
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+3092
-1321
lines changed

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Changelog
2+
3+
## [v0.2.0](docs/versions/VERSION_0.2.0.md)
4+
5+
### Added
6+
7+
* New parameter *analyze_without_extension*
8+
* New argument *show_std_files*
9+
10+
### Fixed
11+
12+
* Fixed bug in multiline comments
13+
* Fixed bug in multiline string
14+
* Fixed bug in strig with quotation marks
15+

README.md

Lines changed: 41 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# CPPINCLUDE
22

3-
Tool that helps to analyze includes in C++.
3+
Tool for analyzing includes in C++.
44
One of the problem in C++ is that if header file was changed all files that
55
include the file will be recompiled and sometime it takes a lot of time.
66

@@ -12,6 +12,7 @@ include the file will be recompiled and sometime it takes a lot of time.
1212
* [configuration_file](#configuration_file)
1313
* [project_dir](#project_dir)
1414
* [file_extensions](#file_extensions)
15+
* [analyze_without_extension](#analyze_without_extension)
1516
* [include_dirs](#include_dirs)
1617
* [ignore_dirs](#ignore_dirs)
1718
* [ignore_system_includes](#ignore_system_includes)
@@ -71,18 +72,18 @@ file in top of include hierarchy:
7172
cppinclude
7273
...
7374
Most impact files:
74-
1 : "char_kind.hpp" impact to 11 file(s)
75+
1 : "char_kind.hpp" impact on 11 file(s)
7576
Included by:
76-
1 : "base_char.hpp" line 3, impact to 10 file(s)
77-
2 : "base_char.hpp" impact to 10 file(s)
77+
1 : "base_char.hpp" line 3, impact on 10 file(s)
78+
2 : "base_char.hpp" impact on 10 file(s)
7879
Included by:
79-
1 : "base_char_factory.hpp" line 3, impact to 5 file(s)
80-
2 : "char_a.hpp" line 3, impact to 2 file(s)
81-
3 : "char_b.hpp" line 3, impact to 2 file(s)
82-
3 : "base_char_factory.hpp" impact to 5 file(s)
80+
1 : "base_char_factory.hpp" line 3, impact on 5 file(s)
81+
2 : "char_a.hpp" line 3, impact on 2 file(s)
82+
3 : "char_b.hpp" line 3, impact on 2 file(s)
83+
3 : "base_char_factory.hpp" impact on 5 file(s)
8384
Included by:
84-
1 : "char_a_factory.hpp" line 3, impact to 2 file(s)
85-
2 : "char_b_factory.hpp" line 3, impact to 2 file(s)
85+
1 : "char_a_factory.hpp" line 3, impact on 2 file(s)
86+
2 : "char_b_factory.hpp" line 3, impact on 2 file(s)
8687
...
8788
```
8889

@@ -99,13 +100,15 @@ Name|Short description
99100
--[configuration_file](#configuration_file)=file|Path to configuration file (default: .cppinclude.json)
100101
--[project_dir](#project_dir)=dir|Project directory
101102
--[file_extensions](#file_extensions)=arg1,arg2,...|Extensions C++ files (default: \*.cpp, \*.hpp,\*.c,\*.h,\*.cxx,\*.hxx)
103+
--[analyze_without_extension](#analyze_without_extension)=true|Analyze files without extension (default: false)
102104
--[include_dirs](#include_dirs)=dir1,dir2,...|Include directories
103105
--[ignore_dirs](#ignore_dirs)=dir1,dir2,...|Directories that will be ignored
104-
--[ignore_system_includes](#ignore_system_includes)=true|Ignore headers in \<\>
106+
--[ignore_system_includes](#ignore_system_includes)=true|Ignore headers in \<\> (default: false)
105107
--[ignore_files](#ignore_files)=regexp1,regexp2,...|Files will be ignored by regexp
106108
--[report](#report)=name1,name2,...|List reports (default: unresolved,most_impact)
107109
--[report_limit](#report_limit)=42|Maximum elements in report, 0 - unlimited (default: 10)
108110
--[report_details_limit](#report_details_limit)=42|Maximum details in report, 0 - unlimited (default: 10)
111+
--[show_std_files](#show_std_files)|Show standard library headers in output (default: false)
109112
--help|Show usage
110113
--verbose|Verbose mode
111114
--version|Show application version
@@ -142,7 +145,7 @@ or in arguments:
142145

143146
### file_extensions
144147

145-
If you use file extensions for C++ that aren’t in default values you can set in
148+
If you use file extensions for C++ that aren’t in default values. You can set in
146149
configuration file:
147150

148151
```json
@@ -157,6 +160,23 @@ or in arguments:
157160

158161
[Back to top](#cppinclude)
159162

163+
### analyze_without_extension
164+
165+
Analyze files in project directory without extension, default: false.
166+
You can set in configuration file:
167+
168+
```json
169+
{
170+
"analyze_without_extension" : true
171+
}
172+
```
173+
174+
or in arguments:
175+
176+
`cppinclude --analyze_without_extension=true`
177+
178+
[Back to top](#cppinclude)
179+
160180
### include_dirs
161181

162182
Add folders where search included files. Default value is project folder.
@@ -232,7 +252,7 @@ or in arguments:
232252
Name of report. Possible values:
233253

234254
* *unresolved* -- show included files that are not found in project folder;
235-
* *most_impact* -- show files that most impact to other files.
255+
* *most_impact* -- show files that most impact on other files.
236256

237257
This report show how many files will be recompiled if the file is changes
238258

@@ -262,6 +282,14 @@ For example, only 3 files will be in report that include unresolved file
262282

263283
[Back to top](#cppinclude)
264284

285+
### show_std_files
286+
287+
Show standard library headers in output.
288+
289+
`cppinclude --show_std_files=true`
290+
291+
[Back to top](#cppinclude)
292+
265293
## Build
266294

267295
Requirements:

docs/examples/chromium/output_unix.txt

Lines changed: 105 additions & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -2,119 +2,119 @@ Start initialization project ...
22
Start analyze sources ...
33
Start report results ...
44
Most impact files:
5-
1 : "build/build_config.h" impact to 21394 file(s)
5+
1 : "build/build_config.h" impact on 21394 file(s)
66
Included by:
7-
1 : "base/compiler_specific.h" line 8, impact to 20668 file(s)
8-
2 : "base/immediate_crash.h" line 8, impact to 20317 file(s)
9-
3 : "base/template_util.h" line 15, impact to 19985 file(s)
10-
4 : "base/strings/string16.h" line 37, impact to 19723 file(s)
11-
5 : "base/numerics/safe_math_shared_impl.h" line 19, impact to 17993 file(s)
12-
6 : "base/time/time.h" line 66, impact to 17522 file(s)
13-
7 : "base/threading/platform_thread.h" line 17, impact to 16313 file(s)
14-
8 : "base/thread_annotations.h" line 36, impact to 16297 file(s)
15-
9 : "base/synchronization/lock_impl.h" line 12, impact to 16293 file(s)
16-
10 : "base/synchronization/lock.h" line 14, impact to 16291 file(s)
17-
... 10 of 857 details
18-
2 : "base/base_export.h" impact to 20920 file(s)
7+
1 : "base/compiler_specific.h" line 8, impact on 20668 file(s)
8+
2 : "base/immediate_crash.h" line 8, impact on 20317 file(s)
9+
3 : "base/template_util.h" line 15, impact on 19985 file(s)
10+
4 : "base/strings/string16.h" line 37, impact on 19723 file(s)
11+
5 : "base/numerics/safe_math_shared_impl.h" line 19, impact on 17993 file(s)
12+
6 : "base/time/time.h" line 66, impact on 17522 file(s)
13+
7 : "base/threading/platform_thread.h" line 17, impact on 16313 file(s)
14+
8 : "base/thread_annotations.h" line 36, impact on 16297 file(s)
15+
9 : "base/synchronization/lock_impl.h" line 12, impact on 16293 file(s)
16+
10 : "base/synchronization/lock.h" line 14, impact on 16291 file(s)
17+
... 10 of 1488 details
18+
2 : "base/base_export.h" impact on 20920 file(s)
1919
Included by:
20-
1 : "base/check.h" line 10, impact to 20314 file(s)
21-
2 : "base/strings/string16.h" line 36, impact to 19723 file(s)
22-
3 : "base/strings/string_piece.h" line 32, impact to 19012 file(s)
23-
4 : "base/time/time.h" line 60, impact to 17522 file(s)
24-
5 : "base/threading/platform_thread.h" line 14, impact to 16313 file(s)
25-
6 : "base/synchronization/lock_impl.h" line 8, impact to 16293 file(s)
26-
7 : "base/synchronization/lock.h" line 8, impact to 16291 file(s)
27-
8 : "base/atomicops.h" line 39, impact to 16146 file(s)
28-
9 : "base/sequence_checker_impl.h" line 10, impact to 15941 file(s)
29-
10 : "base/threading/thread_collision_warner.h" line 11, impact to 15771 file(s)
30-
... 10 of 287 details
31-
3 : "base/macros.h" impact to 20745 file(s)
20+
1 : "base/check.h" line 10, impact on 20314 file(s)
21+
2 : "base/strings/string16.h" line 36, impact on 19723 file(s)
22+
3 : "base/strings/string_piece.h" line 32, impact on 19012 file(s)
23+
4 : "base/time/time.h" line 60, impact on 17522 file(s)
24+
5 : "base/threading/platform_thread.h" line 14, impact on 16313 file(s)
25+
6 : "base/synchronization/lock_impl.h" line 8, impact on 16293 file(s)
26+
7 : "base/synchronization/lock.h" line 8, impact on 16291 file(s)
27+
8 : "base/atomicops.h" line 39, impact on 16146 file(s)
28+
9 : "base/sequence_checker_impl.h" line 10, impact on 15941 file(s)
29+
10 : "base/threading/thread_collision_warner.h" line 11, impact on 15771 file(s)
30+
... 10 of 426 details
31+
3 : "base/macros.h" impact on 20745 file(s)
3232
Included by:
33-
1 : "base/threading/platform_thread.h" line 15, impact to 16313 file(s)
34-
2 : "base/synchronization/lock_impl.h" line 10, impact to 16293 file(s)
35-
3 : "base/synchronization/lock.h" line 10, impact to 16291 file(s)
36-
4 : "base/atomicops_internals_x86_msvc.h" line 16, impact to 16147 file(s)
37-
5 : "base/sequence_checker_impl.h" line 12, impact to 15941 file(s)
38-
6 : "base/memory/scoped_refptr.h" line 16, impact to 15884 file(s)
39-
7 : "base/threading/thread_collision_warner.h" line 13, impact to 15771 file(s)
40-
8 : "base/memory/ref_counted.h" line 17, impact to 15769 file(s)
41-
9 : "base/callback_internal.h" line 13, impact to 13337 file(s)
42-
10 : "base/containers/span.h" line 19, impact to 13302 file(s)
43-
... 10 of 4742 details
44-
4 : "base/compiler_specific.h" impact to 20668 file(s)
33+
1 : "base/threading/platform_thread.h" line 15, impact on 16313 file(s)
34+
2 : "base/synchronization/lock_impl.h" line 10, impact on 16293 file(s)
35+
3 : "base/synchronization/lock.h" line 10, impact on 16291 file(s)
36+
4 : "base/atomicops_internals_x86_msvc.h" line 16, impact on 16147 file(s)
37+
5 : "base/sequence_checker_impl.h" line 12, impact on 15941 file(s)
38+
6 : "base/memory/scoped_refptr.h" line 16, impact on 15884 file(s)
39+
7 : "base/threading/thread_collision_warner.h" line 13, impact on 15771 file(s)
40+
8 : "base/memory/ref_counted.h" line 17, impact on 15769 file(s)
41+
9 : "base/callback_internal.h" line 13, impact on 13337 file(s)
42+
10 : "base/containers/span.h" line 19, impact on 13302 file(s)
43+
... 10 of 11766 details
44+
4 : "base/compiler_specific.h" impact on 20668 file(s)
4545
Included by:
46-
1 : "base/check.h" line 11, impact to 20314 file(s)
47-
2 : "base/strings/char_traits.h" line 10, impact to 19013 file(s)
48-
3 : "base/time/time.h" line 62, impact to 17522 file(s)
49-
4 : "base/sequence_checker_impl.h" line 11, impact to 15941 file(s)
50-
5 : "base/sequence_checker.h" line 9, impact to 15940 file(s)
51-
6 : "base/memory/scoped_refptr.h" line 15, impact to 15884 file(s)
52-
7 : "base/threading/thread_collision_warner.h" line 12, impact to 15771 file(s)
53-
8 : "base/memory/ref_counted.h" line 15, impact to 15769 file(s)
54-
9 : "base/mac/scoped_typeref.h" line 9, impact to 10162 file(s)
55-
10 : "base/bind.h" line 14, impact to 9974 file(s)
56-
... 10 of 685 details
57-
5 : "base/dcheck_is_on.h" impact to 20346 file(s)
46+
1 : "base/check.h" line 11, impact on 20314 file(s)
47+
2 : "base/strings/char_traits.h" line 10, impact on 19013 file(s)
48+
3 : "base/time/time.h" line 62, impact on 17522 file(s)
49+
4 : "base/sequence_checker_impl.h" line 11, impact on 15941 file(s)
50+
5 : "base/sequence_checker.h" line 9, impact on 15940 file(s)
51+
6 : "base/memory/scoped_refptr.h" line 15, impact on 15884 file(s)
52+
7 : "base/threading/thread_collision_warner.h" line 12, impact on 15771 file(s)
53+
8 : "base/memory/ref_counted.h" line 15, impact on 15769 file(s)
54+
9 : "base/mac/scoped_typeref.h" line 9, impact on 10162 file(s)
55+
10 : "base/bind.h" line 14, impact on 9974 file(s)
56+
... 10 of 1593 details
57+
5 : "base/dcheck_is_on.h" impact on 20346 file(s)
5858
Included by:
59-
1 : "base/check.h" line 12, impact to 20314 file(s)
60-
2 : "base/win/scoped_handle.h" line 13, impact to 8218 file(s)
61-
3 : "base/logging.h" line 18, impact to 5808 file(s)
62-
4 : "components/performance_manager/public/graph/graph.h" line 12, impact to 55 file(s)
63-
5 : "remoting/base/protobuf_http_request_base.h" line 12, impact to 2 file(s)
64-
6 : "base/immediate_crash.h" impact to 20317 file(s)
59+
1 : "base/check.h" line 12, impact on 20314 file(s)
60+
2 : "base/win/scoped_handle.h" line 13, impact on 8218 file(s)
61+
3 : "base/logging.h" line 18, impact on 5808 file(s)
62+
4 : "components/performance_manager/public/graph/graph.h" line 12, impact on 55 file(s)
63+
5 : "remoting/base/protobuf_http_request_base.h" line 12, impact on 2 file(s)
64+
6 : "base/immediate_crash.h" impact on 20317 file(s)
6565
Included by:
66-
1 : "base/check.h" line 13, impact to 20314 file(s)
67-
2 : "base/allocator/malloc_zone_functions_mac.h" line 12, impact to 1 file(s)
68-
7 : "base/check.h" impact to 20314 file(s)
66+
1 : "base/check.h" line 13, impact on 20314 file(s)
67+
2 : "base/allocator/malloc_zone_functions_mac.h" line 12, impact on 1 file(s)
68+
7 : "base/check.h" impact on 20314 file(s)
6969
Included by:
70-
1 : "base/check_op.h" line 11, impact to 19608 file(s)
71-
2 : "base/optional.h" line 12, impact to 19129 file(s)
72-
3 : "base/sequence_checker.h" line 8, impact to 15940 file(s)
73-
4 : "base/memory/scoped_refptr.h" line 14, impact to 15884 file(s)
74-
5 : "base/stl_util.h" line 26, impact to 15388 file(s)
75-
6 : "base/notreached.h" line 8, impact to 14345 file(s)
76-
7 : "base/memory/weak_ptr.h" line 76, impact to 12861 file(s)
77-
8 : "base/mac/scoped_typeref.h" line 8, impact to 10162 file(s)
78-
9 : "base/bind_internal.h" line 18, impact to 9974 file(s)
79-
10 : "base/task_runner.h" line 13, impact to 8695 file(s)
80-
... 10 of 122 details
81-
8 : "base/template_util.h" impact to 19985 file(s)
70+
1 : "base/check_op.h" line 11, impact on 19608 file(s)
71+
2 : "base/optional.h" line 12, impact on 19129 file(s)
72+
3 : "base/sequence_checker.h" line 8, impact on 15940 file(s)
73+
4 : "base/memory/scoped_refptr.h" line 14, impact on 15884 file(s)
74+
5 : "base/stl_util.h" line 26, impact on 15388 file(s)
75+
6 : "base/notreached.h" line 8, impact on 14345 file(s)
76+
7 : "base/memory/weak_ptr.h" line 76, impact on 12861 file(s)
77+
8 : "base/mac/scoped_typeref.h" line 8, impact on 10162 file(s)
78+
9 : "base/bind_internal.h" line 18, impact on 9974 file(s)
79+
10 : "base/task_runner.h" line 13, impact on 8695 file(s)
80+
... 10 of 166 details
81+
8 : "base/template_util.h" impact on 19985 file(s)
8282
Included by:
83-
1 : "base/check_op.h" line 12, impact to 19608 file(s)
84-
2 : "base/optional.h" line 13, impact to 19129 file(s)
85-
3 : "base/stl_util.h" line 28, impact to 15388 file(s)
86-
4 : "base/containers/span.h" line 21, impact to 13302 file(s)
87-
5 : "base/memory/raw_scoped_refptr_mismatch_checker.h" line 10, impact to 9975 file(s)
88-
6 : "base/bind.h" line 15, impact to 9974 file(s)
89-
7 : "base/bind_internal.h" line 23, impact to 9974 file(s)
90-
8 : "base/containers/flat_tree.h" line 15, impact to 8859 file(s)
91-
9 : "base/containers/flat_map.h" line 14, impact to 8201 file(s)
92-
10 : "base/containers/circular_deque.h" line 18, impact to 7149 file(s)
93-
... 10 of 17 details
94-
9 : "base/strings/string16.h" impact to 19723 file(s)
83+
1 : "base/check_op.h" line 12, impact on 19608 file(s)
84+
2 : "base/optional.h" line 13, impact on 19129 file(s)
85+
3 : "base/stl_util.h" line 28, impact on 15388 file(s)
86+
4 : "base/containers/span.h" line 21, impact on 13302 file(s)
87+
5 : "base/memory/raw_scoped_refptr_mismatch_checker.h" line 10, impact on 9975 file(s)
88+
6 : "base/bind.h" line 15, impact on 9974 file(s)
89+
7 : "base/bind_internal.h" line 23, impact on 9974 file(s)
90+
8 : "base/containers/flat_tree.h" line 15, impact on 8859 file(s)
91+
9 : "base/containers/flat_map.h" line 14, impact on 8201 file(s)
92+
10 : "base/containers/circular_deque.h" line 18, impact on 7149 file(s)
93+
... 10 of 18 details
94+
9 : "base/strings/string16.h" impact on 19723 file(s)
9595
Included by:
96-
1 : "base/strings/string_piece_forward.h" line 12, impact to 19171 file(s)
97-
2 : "base/strings/string_piece.h" line 35, impact to 19012 file(s)
98-
3 : "base/hash/hash.h" line 17, impact to 11896 file(s)
99-
4 : "base/files/file_path.h" line 115, impact to 8925 file(s)
100-
5 : "url/url_canon.h" line 13, impact to 7271 file(s)
101-
6 : "base/values.h" line 40, impact to 7218 file(s)
102-
7 : "url/gurl.h" line 16, impact to 6940 file(s)
103-
8 : "base/strings/string_util.h" line 24, impact to 5270 file(s)
104-
9 : "base/strings/string_util_win.h" line 19, impact to 5270 file(s)
105-
10 : "base/pickle.h" line 19, impact to 4056 file(s)
106-
... 10 of 763 details
107-
10 : "base/check_op.h" impact to 19608 file(s)
96+
1 : "base/strings/string_piece_forward.h" line 12, impact on 19171 file(s)
97+
2 : "base/strings/string_piece.h" line 35, impact on 19012 file(s)
98+
3 : "base/hash/hash.h" line 17, impact on 11896 file(s)
99+
4 : "base/files/file_path.h" line 115, impact on 8925 file(s)
100+
5 : "url/url_canon.h" line 13, impact on 7271 file(s)
101+
6 : "base/values.h" line 40, impact on 7218 file(s)
102+
7 : "url/gurl.h" line 16, impact on 6940 file(s)
103+
8 : "base/strings/string_util.h" line 24, impact on 5270 file(s)
104+
9 : "base/strings/string_util_win.h" line 19, impact on 5270 file(s)
105+
10 : "base/pickle.h" line 19, impact on 4056 file(s)
106+
... 10 of 1399 details
107+
10 : "base/check_op.h" impact on 19608 file(s)
108108
Included by:
109-
1 : "base/strings/string_piece.h" line 33, impact to 19012 file(s)
110-
2 : "base/time/time.h" line 61, impact to 17522 file(s)
111-
3 : "base/thread_annotations.h" line 35, impact to 16297 file(s)
112-
4 : "base/synchronization/lock_impl.h" line 9, impact to 16293 file(s)
113-
5 : "base/synchronization/lock.h" line 9, impact to 16291 file(s)
114-
6 : "base/memory/ref_counted.h" line 14, impact to 15769 file(s)
115-
7 : "base/containers/checked_iterators.h" line 12, impact to 13304 file(s)
116-
8 : "base/containers/span.h" line 17, impact to 13302 file(s)
117-
9 : "base/win/scoped_handle.h" line 11, impact to 8218 file(s)
118-
10 : "base/observer_list_internal.h" line 9, impact to 7688 file(s)
119-
... 10 of 130 details
109+
1 : "base/strings/string_piece.h" line 33, impact on 19012 file(s)
110+
2 : "base/time/time.h" line 61, impact on 17522 file(s)
111+
3 : "base/thread_annotations.h" line 35, impact on 16297 file(s)
112+
4 : "base/synchronization/lock_impl.h" line 9, impact on 16293 file(s)
113+
5 : "base/synchronization/lock.h" line 9, impact on 16291 file(s)
114+
6 : "base/memory/ref_counted.h" line 14, impact on 15769 file(s)
115+
7 : "base/containers/checked_iterators.h" line 12, impact on 13304 file(s)
116+
8 : "base/containers/span.h" line 17, impact on 13302 file(s)
117+
9 : "base/win/scoped_handle.h" line 11, impact on 8218 file(s)
118+
10 : "base/observer_list_internal.h" line 9, impact on 7688 file(s)
119+
... 10 of 172 details
120120
... 10 of 11677 files

0 commit comments

Comments
 (0)