Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Side by Side Diff: webrtc/sdk/android/PRESUBMIT.py

Issue 2547483003: Move /webrtc/api/android files to /webrtc/sdk/android (Closed)
Patch Set: Move to api folder under Android instead of src Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/sdk/android/BUILD.gn ('k') | webrtc/sdk/android/README » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. 1 # Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
2 # 2 #
3 # Use of this source code is governed by a BSD-style license 3 # Use of this source code is governed by a BSD-style license
4 # that can be found in the LICENSE file in the root of the source 4 # that can be found in the LICENSE file in the root of the source
5 # tree. An additional intellectual property rights grant can be found 5 # tree. An additional intellectual property rights grant can be found
6 # in the file PATENTS. All contributing project authors may 6 # in the file PATENTS. All contributing project authors may
7 # be found in the AUTHORS file in the root of the source tree. 7 # be found in the AUTHORS file in the root of the source tree.
8 8
9 def CheckChangeOnUpload(input_api, output_api): 9 def CheckChangeOnUpload(input_api, output_api):
10 results = [] 10 results = []
11 results.extend(CheckPatchFormatted(input_api, output_api)) 11 results.extend(CheckPatchFormatted(input_api, output_api))
12 return results 12 return results
13 13
14 def CheckPatchFormatted(input_api, output_api): 14 def CheckPatchFormatted(input_api, output_api):
15 import git_cl 15 import git_cl
16 cmd = ['cl', 'format', '--dry-run', input_api.PresubmitLocalPath()] 16 cmd = ['cl', 'format', '--dry-run', input_api.PresubmitLocalPath()]
17 code, _ = git_cl.RunGitWithCode(cmd, suppress_stderr=True) 17 code, _ = git_cl.RunGitWithCode(cmd, suppress_stderr=True)
18 if code == 2: 18 if code == 2:
19 short_path = input_api.basename(input_api.PresubmitLocalPath()) 19 short_path = input_api.basename(input_api.PresubmitLocalPath())
20 full_path = input_api.os_path.relpath(input_api.PresubmitLocalPath(), 20 full_path = input_api.os_path.relpath(input_api.PresubmitLocalPath(),
21 input_api.change.RepositoryRoot()) 21 input_api.change.RepositoryRoot())
22 return [output_api.PresubmitPromptWarning( 22 return [output_api.PresubmitPromptWarning(
23 'The %s directory requires source formatting. ' 23 'The %s directory requires source formatting. '
24 'Please run git cl format %s' % 24 'Please run git cl format %s' %
25 (short_path, full_path))] 25 (short_path, full_path))]
26 # As this is just a warning, ignore all other errors if the user 26 # As this is just a warning, ignore all other errors if the user
27 # happens to have a broken clang-format, doesn't use git, etc etc. 27 # happens to have a broken clang-format, doesn't use git, etc etc.
28 return [] 28 return []
OLDNEW
« no previous file with comments | « webrtc/sdk/android/BUILD.gn ('k') | webrtc/sdk/android/README » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698