| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright 2012 The Chromium Authors. All rights reserved. | 2 # Copyright 2012 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 """Makes sure that files include headers from allowed directories. | 6 """Makes sure that files include headers from allowed directories. |
| 7 | 7 |
| 8 Checks DEPS files in the source tree for rules, and applies those rules to | 8 Checks DEPS files in the source tree for rules, and applies those rules to |
| 9 "#include" and "import" directives in the .cpp, .java, and .proto source files. | 9 "#include" and "import" directives in the .cpp, .java, and .proto source files. |
| 10 Any source file including something not permitted by the DEPS files will fail. | 10 Any source file including something not permitted by the DEPS files will fail. |
| 11 | 11 |
| 12 See builddeps.py for a detailed description of the DEPS format. | 12 See README.md for a detailed description of the DEPS format. |
| 13 """ | 13 """ |
| 14 | 14 |
| 15 import os | 15 import os |
| 16 import optparse | 16 import optparse |
| 17 import re | 17 import re |
| 18 import sys | 18 import sys |
| 19 | 19 |
| 20 import proto_checker | 20 import proto_checker |
| 21 import cpp_checker | 21 import cpp_checker |
| 22 import java_checker | 22 import java_checker |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 if options.json: | 277 if options.json: |
| 278 deps_checker.results_formatter = results.JSONResultsFormatter( | 278 deps_checker.results_formatter = results.JSONResultsFormatter( |
| 279 options.json, deps_checker.results_formatter) | 279 options.json, deps_checker.results_formatter) |
| 280 | 280 |
| 281 deps_checker.CheckDirectory(start_dir) | 281 deps_checker.CheckDirectory(start_dir) |
| 282 return deps_checker.Report() | 282 return deps_checker.Report() |
| 283 | 283 |
| 284 | 284 |
| 285 if '__main__' == __name__: | 285 if '__main__' == __name__: |
| 286 sys.exit(main()) | 286 sys.exit(main()) |
| OLD | NEW |