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

Side by Side Diff: PRESUBMIT.py

Issue 2976293002: Remove remains of webrtc/base (Closed)
Patch Set: Add README.md 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',
22 'webrtc/examples/objc', 21 'webrtc/examples/objc',
23 'webrtc/media', 22 'webrtc/media',
24 'webrtc/modules/audio_coding', 23 'webrtc/modules/audio_coding',
25 'webrtc/modules/audio_conference_mixer', 24 'webrtc/modules/audio_conference_mixer',
26 'webrtc/modules/audio_device', 25 'webrtc/modules/audio_device',
27 'webrtc/modules/audio_processing', 26 'webrtc/modules/audio_processing',
28 'webrtc/modules/desktop_capture', 27 'webrtc/modules/desktop_capture',
29 'webrtc/modules/include/module_common_types.h', 28 'webrtc/modules/include/module_common_types.h',
30 'webrtc/modules/media_file', 29 'webrtc/modules/media_file',
31 'webrtc/modules/utility', 30 'webrtc/modules/utility',
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 NATIVE_API_DIRS = ( 66 NATIVE_API_DIRS = (
68 'webrtc', 67 'webrtc',
69 'webrtc/api', 68 'webrtc/api',
70 'webrtc/media', 69 'webrtc/media',
71 'webrtc/modules/audio_device/include', 70 'webrtc/modules/audio_device/include',
72 'webrtc/pc', 71 'webrtc/pc',
73 ) 72 )
74 # These directories should not be used but are maintained only to avoid breaking 73 # These directories should not be used but are maintained only to avoid breaking
75 # some legacy downstream code. 74 # some legacy downstream code.
76 LEGACY_API_DIRS = ( 75 LEGACY_API_DIRS = (
77 'webrtc/base',
78 'webrtc/common_audio/include', 76 'webrtc/common_audio/include',
79 'webrtc/modules/audio_coding/include', 77 'webrtc/modules/audio_coding/include',
80 'webrtc/modules/audio_conference_mixer/include', 78 'webrtc/modules/audio_conference_mixer/include',
81 'webrtc/modules/audio_processing/include', 79 'webrtc/modules/audio_processing/include',
82 'webrtc/modules/bitrate_controller/include', 80 'webrtc/modules/bitrate_controller/include',
83 'webrtc/modules/congestion_controller/include', 81 'webrtc/modules/congestion_controller/include',
84 'webrtc/modules/include', 82 'webrtc/modules/include',
85 'webrtc/modules/remote_bitrate_estimator/include', 83 'webrtc/modules/remote_bitrate_estimator/include',
86 'webrtc/modules/rtp_rtcp/include', 84 'webrtc/modules/rtp_rtcp/include',
87 'webrtc/modules/rtp_rtcp/source', 85 'webrtc/modules/rtp_rtcp/source',
88 'webrtc/modules/utility/include', 86 'webrtc/modules/utility/include',
89 'webrtc/modules/video_coding/codecs/h264/include', 87 'webrtc/modules/video_coding/codecs/h264/include',
90 'webrtc/modules/video_coding/codecs/i420/include', 88 'webrtc/modules/video_coding/codecs/i420/include',
91 'webrtc/modules/video_coding/codecs/vp8/include', 89 'webrtc/modules/video_coding/codecs/vp8/include',
92 'webrtc/modules/video_coding/codecs/vp9/include', 90 'webrtc/modules/video_coding/codecs/vp9/include',
93 'webrtc/modules/video_coding/include', 91 'webrtc/modules/video_coding/include',
92 'webrtc/rtc_base',
94 'webrtc/system_wrappers/include', 93 'webrtc/system_wrappers/include',
95 'webrtc/voice_engine/include', 94 'webrtc/voice_engine/include',
96 ) 95 )
97 API_DIRS = NATIVE_API_DIRS[:] + LEGACY_API_DIRS[:] 96 API_DIRS = NATIVE_API_DIRS[:] + LEGACY_API_DIRS[:]
98 97
99 98
100 def _RunCommand(command, cwd): 99 def _RunCommand(command, cwd):
101 """Runs a command and returns the output from that command.""" 100 """Runs a command and returns the output from that command."""
102 p = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, 101 p = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE,
103 cwd=cwd) 102 cwd=cwd)
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after
662 results = [] 661 results = []
663 source_file_filter = lambda x: input_api.FilterSourceFile( 662 source_file_filter = lambda x: input_api.FilterSourceFile(
664 x, white_list=(r'.+\.proto$',)) 663 x, white_list=(r'.+\.proto$',))
665 for f in input_api.AffectedSourceFiles(source_file_filter): 664 for f in input_api.AffectedSourceFiles(source_file_filter):
666 file_path = f.LocalPath() 665 file_path = f.LocalPath()
667 with open(file_path) as f: 666 with open(file_path) as f:
668 lines = f.readlines() 667 lines = f.readlines()
669 if lines[-1] != '\n' or lines[-2] == '\n': 668 if lines[-1] != '\n' or lines[-2] == '\n':
670 results.append(output_api.PresubmitError(error_msg.format(file_path))) 669 results.append(output_api.PresubmitError(error_msg.format(file_path)))
671 return results 670 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