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

Side by Side Diff: PRESUBMIT.py

Issue 2976633002: Revert of Remove remains of webrtc/base (patchset #7 id:120001 of https://codereview.webrtc.org/297… (Closed)
Patch Set: Created 3 years, 5 months 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 | « no previous file | webrtc/BUILD.gn » ('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) 2012 The WebRTC project authors. All Rights Reserved. 1 # Copyright (c) 2012 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 import json 9 import json
10 import os 10 import os
11 import re 11 import re
12 import subprocess 12 import subprocess
13 import sys 13 import sys
14 14
15 15
16 # Files and directories that are *skipped* by cpplint in the presubmit script. 16 # Files and directories that are *skipped* by cpplint in the presubmit script.
17 CPPLINT_BLACKLIST = [ 17 CPPLINT_BLACKLIST = [
18 'tools_webrtc', 18 'tools_webrtc',
19 'webrtc/api/video_codecs/video_decoder.h', 19 'webrtc/api/video_codecs/video_decoder.h',
20 'webrtc/api/video_codecs/video_encoder.h', 20 'webrtc/api/video_codecs/video_encoder.h',
21 'webrtc/base',
21 'webrtc/examples/objc', 22 'webrtc/examples/objc',
22 'webrtc/media', 23 'webrtc/media',
23 'webrtc/modules/audio_coding', 24 'webrtc/modules/audio_coding',
24 'webrtc/modules/audio_conference_mixer', 25 'webrtc/modules/audio_conference_mixer',
25 'webrtc/modules/audio_device', 26 'webrtc/modules/audio_device',
26 'webrtc/modules/audio_processing', 27 'webrtc/modules/audio_processing',
27 'webrtc/modules/desktop_capture', 28 'webrtc/modules/desktop_capture',
28 'webrtc/modules/include/module_common_types.h', 29 'webrtc/modules/include/module_common_types.h',
29 'webrtc/modules/media_file', 30 'webrtc/modules/media_file',
30 'webrtc/modules/utility', 31 'webrtc/modules/utility',
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 NATIVE_API_DIRS = ( 67 NATIVE_API_DIRS = (
67 'webrtc', 68 'webrtc',
68 'webrtc/api', 69 'webrtc/api',
69 'webrtc/media', 70 'webrtc/media',
70 'webrtc/modules/audio_device/include', 71 'webrtc/modules/audio_device/include',
71 'webrtc/pc', 72 'webrtc/pc',
72 ) 73 )
73 # These directories should not be used but are maintained only to avoid breaking 74 # These directories should not be used but are maintained only to avoid breaking
74 # some legacy downstream code. 75 # some legacy downstream code.
75 LEGACY_API_DIRS = ( 76 LEGACY_API_DIRS = (
77 'webrtc/base',
76 'webrtc/common_audio/include', 78 'webrtc/common_audio/include',
77 'webrtc/modules/audio_coding/include', 79 'webrtc/modules/audio_coding/include',
78 'webrtc/modules/audio_conference_mixer/include', 80 'webrtc/modules/audio_conference_mixer/include',
79 'webrtc/modules/audio_processing/include', 81 'webrtc/modules/audio_processing/include',
80 'webrtc/modules/bitrate_controller/include', 82 'webrtc/modules/bitrate_controller/include',
81 'webrtc/modules/congestion_controller/include', 83 'webrtc/modules/congestion_controller/include',
82 'webrtc/modules/include', 84 'webrtc/modules/include',
83 'webrtc/modules/remote_bitrate_estimator/include', 85 'webrtc/modules/remote_bitrate_estimator/include',
84 'webrtc/modules/rtp_rtcp/include', 86 'webrtc/modules/rtp_rtcp/include',
85 'webrtc/modules/rtp_rtcp/source', 87 'webrtc/modules/rtp_rtcp/source',
86 'webrtc/modules/utility/include', 88 'webrtc/modules/utility/include',
87 'webrtc/modules/video_coding/codecs/h264/include', 89 'webrtc/modules/video_coding/codecs/h264/include',
88 'webrtc/modules/video_coding/codecs/i420/include', 90 'webrtc/modules/video_coding/codecs/i420/include',
89 'webrtc/modules/video_coding/codecs/vp8/include', 91 'webrtc/modules/video_coding/codecs/vp8/include',
90 'webrtc/modules/video_coding/codecs/vp9/include', 92 'webrtc/modules/video_coding/codecs/vp9/include',
91 'webrtc/modules/video_coding/include', 93 'webrtc/modules/video_coding/include',
92 'webrtc/rtc_base',
93 'webrtc/system_wrappers/include', 94 'webrtc/system_wrappers/include',
94 'webrtc/voice_engine/include', 95 'webrtc/voice_engine/include',
95 ) 96 )
96 API_DIRS = NATIVE_API_DIRS[:] + LEGACY_API_DIRS[:] 97 API_DIRS = NATIVE_API_DIRS[:] + LEGACY_API_DIRS[:]
97 98
98 99
99 def _RunCommand(command, cwd): 100 def _RunCommand(command, cwd):
100 """Runs a command and returns the output from that command.""" 101 """Runs a command and returns the output from that command."""
101 p = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, 102 p = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE,
102 cwd=cwd) 103 cwd=cwd)
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after
640 results = [] 641 results = []
641 source_file_filter = lambda x: input_api.FilterSourceFile( 642 source_file_filter = lambda x: input_api.FilterSourceFile(
642 x, white_list=(r'.+\.proto$',)) 643 x, white_list=(r'.+\.proto$',))
643 for f in input_api.AffectedSourceFiles(source_file_filter): 644 for f in input_api.AffectedSourceFiles(source_file_filter):
644 file_path = f.LocalPath() 645 file_path = f.LocalPath()
645 with open(file_path) as f: 646 with open(file_path) as f:
646 lines = f.readlines() 647 lines = f.readlines()
647 if lines[-1] != '\n' or lines[-2] == '\n': 648 if lines[-1] != '\n' or lines[-2] == '\n':
648 results.append(output_api.PresubmitError(error_msg.format(file_path))) 649 results.append(output_api.PresubmitError(error_msg.format(file_path)))
649 return results 650 return results
OLDNEW
« no previous file with comments | « no previous file | webrtc/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698