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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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("protocol.json" in path for path in local_paths) or |
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) or |
| 75 any("DebuggerScript.js" in path for path in local_paths)): |
75 lint_path = input_api.os_path.join(input_api.PresubmitLocalPath(), | 76 lint_path = input_api.os_path.join(input_api.PresubmitLocalPath(), |
76 "scripts", "compile_frontend.py") | 77 "scripts", "compile_frontend.py") |
77 out, _ = input_api.subprocess.Popen( | 78 out, _ = input_api.subprocess.Popen( |
78 [input_api.python_executable, lint_path], | 79 [input_api.python_executable, lint_path], |
79 stdout=input_api.subprocess.PIPE, | 80 stdout=input_api.subprocess.PIPE, |
80 stderr=input_api.subprocess.STDOUT).communicate() | 81 stderr=input_api.subprocess.STDOUT).communicate() |
81 if "ERROR" in out or "WARNING" in out: | 82 if "ERROR" in out or "WARNING" in out: |
82 return [output_api.PresubmitError(out)] | 83 return [output_api.PresubmitError(out)] |
83 if "NOTE" in out: | 84 if "NOTE" in out: |
84 return [output_api.PresubmitPromptWarning(out + compile_note)] | 85 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)) | 156 results.extend(_CheckDevtoolsStyle(input_api, output_api)) |
156 results.extend(_CompileDevtoolsFrontend(input_api, output_api)) | 157 results.extend(_CompileDevtoolsFrontend(input_api, output_api)) |
157 results.extend(_CheckConvertSVGToPNGHashes(input_api, output_api)) | 158 results.extend(_CheckConvertSVGToPNGHashes(input_api, output_api)) |
158 results.extend(_CheckOptimizePNGHashes(input_api, output_api)) | 159 results.extend(_CheckOptimizePNGHashes(input_api, output_api)) |
159 results.extend(_CheckCSSViolations(input_api, output_api)) | 160 results.extend(_CheckCSSViolations(input_api, output_api)) |
160 return results | 161 return results |
161 | 162 |
162 | 163 |
163 def CheckChangeOnCommit(input_api, output_api): | 164 def CheckChangeOnCommit(input_api, output_api): |
164 return [] | 165 return [] |
OLD | NEW |