OLD | NEW |
---|---|
1 # Copyright (C) 2014 Google Inc. All rights reserved. | 1 # Copyright (C) 2014 Google Inc. All rights reserved. |
2 # | 2 # |
3 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without |
4 # modification, are permitted provided that the following conditions are | 4 # modification, are permitted provided that the following conditions are |
5 # met: | 5 # met: |
6 # | 6 # |
7 # * Redistributions of source code must retain the above copyright | 7 # * Redistributions of source code must retain the above copyright |
8 # notice, this list of conditions and the following disclaimer. | 8 # notice, this list of conditions and the following disclaimer. |
9 # * Redistributions in binary form must reproduce the above | 9 # * Redistributions in binary form must reproduce the above |
10 # copyright notice, this list of conditions and the following disclaimer | 10 # copyright notice, this list of conditions and the following disclaimer |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
62 def _CompileDevtoolsFrontend(input_api, output_api): | 62 def _CompileDevtoolsFrontend(input_api, output_api): |
63 local_paths = [f.LocalPath() for f in input_api.AffectedFiles()] | 63 local_paths = [f.LocalPath() for f in input_api.AffectedFiles()] |
64 | 64 |
65 # FIXME: The compilation does not actually run if injected script-related fi les | 65 # FIXME: The compilation does not actually run if injected script-related fi les |
66 # have changed, as they reside in core/inspector, which is not affected | 66 # have changed, as they reside in core/inspector, which is not affected |
67 # by this presubmit. | 67 # by this presubmit. |
68 # Once this is fixed, injected_script_externs.js | 68 # Once this is fixed, injected_script_externs.js |
69 # should be added to the list of triggers. | 69 # should be added to the list of triggers. |
70 devtools_front_end = input_api.os_path.join("devtools", "front_end") | 70 devtools_front_end = input_api.os_path.join("devtools", "front_end") |
71 if (any(devtools_front_end in path for path in local_paths) or | 71 if (any(devtools_front_end in path for path in local_paths) or |
72 any("protocol.json" in path for path in local_paths) or | 72 any(".json" in path for path in local_paths) or |
dgozman
2016/06/03 02:24:02
protocol/*.json
pfeldman
2016/06/03 17:07:32
Done.
| |
73 any("compile_frontend.py" in path for path in local_paths) or | 73 any("compile_frontend.py" in path for path in local_paths) or |
74 any("InjectedScriptSource.js" in path for path in local_paths)): | 74 any("InjectedScriptSource.js" in path for path in local_paths)): |
dgozman
2016/06/03 02:24:02
While you are here, add DebuggerScript.js
pfeldman
2016/06/03 17:07:32
Done.
| |
75 lint_path = input_api.os_path.join(input_api.PresubmitLocalPath(), | 75 lint_path = input_api.os_path.join(input_api.PresubmitLocalPath(), |
76 "scripts", "compile_frontend.py") | 76 "scripts", "compile_frontend.py") |
77 out, _ = input_api.subprocess.Popen( | 77 out, _ = input_api.subprocess.Popen( |
78 [input_api.python_executable, lint_path], | 78 [input_api.python_executable, lint_path], |
79 stdout=input_api.subprocess.PIPE, | 79 stdout=input_api.subprocess.PIPE, |
80 stderr=input_api.subprocess.STDOUT).communicate() | 80 stderr=input_api.subprocess.STDOUT).communicate() |
81 if "ERROR" in out or "WARNING" in out: | 81 if "ERROR" in out or "WARNING" in out: |
82 return [output_api.PresubmitError(out)] | 82 return [output_api.PresubmitError(out)] |
83 if "NOTE" in out: | 83 if "NOTE" in out: |
84 return [output_api.PresubmitPromptWarning(out + compile_note)] | 84 return [output_api.PresubmitPromptWarning(out + compile_note)] |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
155 results.extend(_CheckDevtoolsStyle(input_api, output_api)) | 155 results.extend(_CheckDevtoolsStyle(input_api, output_api)) |
156 results.extend(_CompileDevtoolsFrontend(input_api, output_api)) | 156 results.extend(_CompileDevtoolsFrontend(input_api, output_api)) |
157 results.extend(_CheckConvertSVGToPNGHashes(input_api, output_api)) | 157 results.extend(_CheckConvertSVGToPNGHashes(input_api, output_api)) |
158 results.extend(_CheckOptimizePNGHashes(input_api, output_api)) | 158 results.extend(_CheckOptimizePNGHashes(input_api, output_api)) |
159 results.extend(_CheckCSSViolations(input_api, output_api)) | 159 results.extend(_CheckCSSViolations(input_api, output_api)) |
160 return results | 160 return results |
161 | 161 |
162 | 162 |
163 def CheckChangeOnCommit(input_api, output_api): | 163 def CheckChangeOnCommit(input_api, output_api): |
164 return [] | 164 return [] |
OLD | NEW |