forked from brave/brave-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
chromium_presubmit_config.json5
297 lines (292 loc) · 19.3 KB
/
chromium_presubmit_config.json5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
{
"disabled_checks": {
// Checks defined in the PRESUBMIT.py global scope.
"global": [
// We don't use OWNERS files.
"CheckSecurityOwners",
// This validates added strings with screenshot tests which we don't use.
"CheckStrings",
// We don't update upstream pydeps.
"CheckPydepsNeedsUpdating",
// Disable check for .*google.* images being added to the repository.
"CheckNoProductIconsAddedToPublicRepo",
// Disable check for Google support URLs.
"CheckGoogleSupportAnswerUrlOnUpload",
// Disable check for hardcoded Google API urls.
"CheckHardcodedGoogleHostsInLowerLayers",
],
// Checks defined in depot_tools/presubmit_canned_checks.py.
"canned": [
// Disable Chromium license check. We use our own checker.
"CheckLicense",
// We don't use OWNERS files.
"CheckOwnersFormat",
"CheckOwners",
// We don't use AUTHORS file.
"CheckAuthorizedAuthor",
// We don't upload change to Chromium version control.
"CheckChangeWasUploaded",
"CheckChangeHasBugField",
"CheckTreeIsOpen",
],
},
// Checks that should trigger presubmit errors instead of warnings.
"checks_to_force_presubmit_errors": {
"global": [
"CheckBuildConfigMacrosWithoutInclude",
"CheckForSuperfluousStlIncludesInHeaders",
"CheckForIncludeGuards",
"CheckGnGlobForward",
"CheckNewHeaderWithoutGnChangeOnUpload",
],
"canned": [
"CheckChangeLintsClean",
"GetPylint",
"CheckPatchFormatted",
],
},
// Files to skip in all checks.
"default_files_to_skip": [
"\\.storybook/",
"ios/browser/api/ledger/legacy_database/core_data_models/",
"win_build_output/",
],
// Regex to match function names in the current presubmit stack trace. Matched
// functions are used in `per_check_files_to_skip` filter.
"check_function_regex": "_?Check",
// Files to skip per check.
"per_check_files_to_skip": {
// Permanent ignores.
"CheckNewHeaderWithoutGnChangeOnUpload": ["chromium_src/"],
"CheckForCcIncludes": ["chromium_src/"],
"CheckForRelativeIncludes": ["chromium_src/"],
"CheckParseErrors": [
".*tsconfig\\.json",
"vendor/bat-native-ads/data/test/invalid\\.json",
],
// Checks to be fixed.
"CheckJavaStyle": [".*\\.java"],
"CheckUnwantedDependencies": [".*\\.java"],
"CheckNoBannedFunctions": [
"base/mac/conversions\\.h",
"browser/brave_ads/notification_helper/notification_helper_impl_win\\.cc",
"browser/mac/sparkle_glue\\.mm",
"browser/net/brave_ad_block_csp_network_delegate_helper\\.cc",
"browser/net/brave_ad_block_csp_network_delegate_helper\\.h",
"browser/net/brave_ad_block_tp_network_delegate_helper\\.cc",
"browser/net/brave_ad_block_tp_network_delegate_helper\\.h",
"browser/net/brave_ad_block_tp_network_delegate_helper_unittest\\.cc",
"browser/net/brave_common_static_redirect_network_delegate_helper\\.cc",
"browser/net/brave_common_static_redirect_network_delegate_helper\\.h",
"browser/net/brave_httpse_network_delegate_helper\\.cc",
"browser/net/brave_httpse_network_delegate_helper\\.h",
"browser/net/brave_httpse_network_delegate_helper_unittest\\.cc",
"browser/net/brave_proxying_url_loader_factory\\.h",
"browser/net/brave_proxying_web_socket\\.h",
"browser/net/brave_reduce_language_network_delegate_helper\\.cc",
"browser/net/brave_reduce_language_network_delegate_helper\\.h",
"browser/net/brave_referrals_network_delegate_helper\\.cc",
"browser/net/brave_referrals_network_delegate_helper\\.h",
"browser/net/brave_request_handler\\.cc",
"browser/net/brave_request_handler\\.h",
"browser/net/brave_service_key_network_delegate_helper\\.cc",
"browser/net/brave_service_key_network_delegate_helper\\.h",
"browser/net/brave_site_hacks_network_delegate_helper\\.cc",
"browser/net/brave_site_hacks_network_delegate_helper\\.h",
"browser/net/brave_static_redirect_network_delegate_helper\\.cc",
"browser/net/brave_static_redirect_network_delegate_helper\\.h",
"browser/net/brave_torrent_redirect_network_delegate_helper\\.cc",
"browser/net/brave_torrent_redirect_network_delegate_helper\\.h",
"browser/net/decentralized_dns_network_delegate_helper\\.cc",
"browser/net/decentralized_dns_network_delegate_helper\\.h",
"browser/net/global_privacy_control_network_delegate_helper\\.cc",
"browser/net/global_privacy_control_network_delegate_helper\\.h",
"browser/net/ipfs_redirect_network_delegate_helper\\.cc",
"browser/net/ipfs_redirect_network_delegate_helper\\.h",
"browser/net/url_context\\.cc",
"browser/net/url_context\\.h",
"browser/ui/webui/brave_rewards_page_ui\\.cc",
"browser/ui/webui/new_tab_page/brave_new_tab_ui_browsertest\\.cc",
"browser/ui/webui/private_new_tab_page/brave_private_new_tab_page_browsertest\\.cc",
"chromium_src/chrome/install_static/brave_install_util_unittest\\.cc",
"chromium_src/components/search_engines/brave_template_url_prepopulate_data_unittest\\.cc",
"components/brave_rewards/browser/net/network_delegate_helper\\.cc",
"components/brave_rewards/browser/net/network_delegate_helper\\.h",
"components/brave_rewards/browser/test/rewards_state_browsertest\\.cc",
"components/brave_shields/browser/ad_block_engine\\.cc",
"components/brave_shields/browser/https_everywhere_service\\.cc",
"components/brave_wallet/browser/rlp_encode_unittest\\.cc",
"components/brave_wallet/common/eth_address\\.cc",
"components/ipfs/ipfs_json_parser\\.cc",
"components/safe_builtins/renderer/safe_builtins\\.cc",
"components/services/bat_ads/bat_ads_impl\\.cc",
"components/services/bat_ledger/bat_ledger_impl\\.cc",
"components/services/bat_ledger/public/cpp/ledger_client_mojo_bridge\\.cc",
"ios/browser/api/ads/brave_ads\\.mm",
"utility/importer/chrome_importer\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/bitflyer/bitflyer\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/bitflyer/bitflyer_transfer\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/contribution/contribution\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/contribution/contribution\\.h",
"vendor/bat-native-ledger/src/bat/ledger/internal/contribution/contribution_ac\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/contribution/contribution_external_wallet\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/contribution/contribution_monthly\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/contribution/contribution_sku\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/contribution/contribution_sku\\.h",
"vendor/bat-native-ledger/src/bat/ledger/internal/contribution/contribution_tip\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/contribution/contribution_unblinded\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/contribution/contribution_unblinded\\.h",
"vendor/bat-native-ledger/src/bat/ledger/internal/contribution/unverified\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/credentials/credentials_promotion\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/credentials/credentials_sku\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/database/database\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/database/database_activity_info\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/database/database_balance_report\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/database/database_contribution_info\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/database/database_contribution_info\\.h",
"vendor/bat-native-ledger/src/bat/ledger/internal/database/database_contribution_info_publishers\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/database/database_contribution_queue\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/database/database_contribution_queue\\.h",
"vendor/bat-native-ledger/src/bat/ledger/internal/database/database_contribution_queue_publishers\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/database/database_creds_batch\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/database/database_event_log\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/database/database_initialize\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/database/database_media_publisher_info\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/database/database_multi_tables\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/database/database_pending_contribution\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/database/database_processed_publisher\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/database/database_promotion\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/database/database_publisher_info\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/database/database_recurring_tip\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/database/database_server_publisher_banner\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/database/database_server_publisher_info\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/database/database_server_publisher_links\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/database/database_sku_order\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/database/database_sku_order\\.h",
"vendor/bat-native-ledger/src/bat/ledger/internal/database/database_sku_order_items\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/database/database_sku_transaction\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/database/database_unblinded_token\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/endpoint/bitflyer/post_transaction/post_transaction_bitflyer\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/endpoint/gemini/get_transaction/get_transaction_gemini\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/endpoint/gemini/post_cancel_transaction/post_cancel_transaction_gemini\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/endpoint/gemini/post_transaction/post_transaction_gemini\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/endpoint/payment/post_order/post_order\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/endpoint/payment/post_transaction_gemini/post_transaction_sku_gemini\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/endpoint/payment/post_transaction_uphold/post_transaction_uphold\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/endpoint/payment/post_votes/post_votes\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/endpoint/private_cdn/get_publisher/get_publisher\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/endpoint/promotion/delete_claim/delete_claim\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/endpoint/promotion/get_drain/get_drain\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/endpoint/promotion/get_wallet/get_wallet\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/endpoint/promotion/post_bat_loss/post_bat_loss\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/endpoint/promotion/post_clobbered_claims/post_clobbered_claims\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/endpoint/promotion/post_suggestions/post_suggestions\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/endpoint/rewards/get_prefix_list/get_prefix_list\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/endpoint/uphold/post_oauth/post_oauth\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/endpoint/uphold/post_transaction/post_transaction\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/endpoint/uphold/post_transaction_commit/post_transaction_commit\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/gemini/gemini\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/gemini/gemini_transfer\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/ledger_impl\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/legacy/bat_state\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/legacy/bat_util\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/legacy/media/github\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/legacy/media/reddit\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/legacy/media/twitch\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/legacy/media/twitter\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/legacy/media/vimeo\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/legacy/media/youtube\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/legacy/publisher_state\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/promotion/promotion\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/promotion/promotion\\.h",
"vendor/bat-native-ledger/src/bat/ledger/internal/publisher/publisher\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/publisher/publisher_prefix_list_updater\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/publisher/publisher_status_helper\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/publisher/server_publisher_fetcher\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/recovery/recovery_empty_balance\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/report/report\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/report/report\\.h",
"vendor/bat-native-ledger/src/bat/ledger/internal/sku/sku_brave\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/sku/sku_common\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/sku/sku_merchant\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/sku/sku_merchant\\.h",
"vendor/bat-native-ledger/src/bat/ledger/internal/sku/sku_order\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/sku/sku_transaction\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/state/state_migration\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/state/state_migration_v1\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/state/state_migration_v10\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/state/state_migration_v2\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/uphold/uphold\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/uphold/uphold_authorization\\.cc",
"vendor/bat-native-ledger/src/bat/ledger/internal/uphold/uphold_transfer\\.cc",
],
"CheckSpamLogging": [
"browser/brave_ads/notification_helper/notification_helper_impl_mac\\.mm",
"browser/brave_ads/notification_helper/notification_helper_impl_win\\.cc",
"browser/browsing_data/brave_clear_browsing_data\\.cc",
"chromium_src/chrome/browser/ui/startup/startup_browser_creator\\.cc",
"components/brave_ads/browser/ads_service_impl\\.cc",
"components/brave_vpn/winvpntool\\.cc",
"components/greaselion/browser/greaselion_download_service\\.cc",
"components/permissions/permission_lifetime_utils\\.cc",
"components/tor/tor_launcher_factory\\.cc",
"components/webcompat_reporter/browser/webcompat_report_uploader\\.cc",
"ios/browser/api/ledger/legacy_database/legacy_ledger_database\\.mm",
"ios/browser/api/ledger/promotion_solution\\.mm",
],
"CheckUniquePtrOnUpload": [
"components/brave_sync/qr_code_data\\.cc",
"components/brave_today/browser/direct_feed_controller\\.cc",
"components/brave_wallet/browser/tx_service\\.cc",
"components/brave_wallet/common/eth_sign_typed_data_helper\\.cc",
"components/tor/tor_profile_service_impl\\.cc",
],
"_CheckAndroidCrLogUsage": [
"android/java/org/chromium/base/BraveCommandLineInitUtil\\.java",
"android/java/org/chromium/chrome/browser/BraveAdaptiveCaptchaUtils\\.java",
"android/java/org/chromium/chrome/browser/crypto_wallet/fragments/EditVisibleAssetsBottomSheetDialogFragment\\.java",
"android/java/org/chromium/chrome/browser/help/BraveHelpAndFeedbackLauncher\\.java",
"android/java/org/chromium/chrome/browser/search_engines/settings/BraveSearchEngineAdapter\\.java",
"android/java/org/chromium/chrome/browser/settings/BravePreferenceDialogFragment\\.java",
"android/java/org/chromium/chrome/browser/upgrade/BraveUpgradeJobIntentServiceImpl\\.java",
],
"_CheckAndroidToastUsage": [
"android/java/org/chromium/chrome/browser/brave_news/BraveNewsBottomSheetDialogFragment\\.java",
"android/java/org/chromium/chrome/browser/crypto_wallet/activities/AccountPrivateKeyActivity\\.java",
"android/java/org/chromium/chrome/browser/crypto_wallet/activities/NetworkSelectorActivity\\.java",
"android/java/org/chromium/chrome/browser/crypto_wallet/fragments/PortfolioFragment\\.java",
"android/java/org/chromium/chrome/browser/crypto_wallet/fragments/onboarding_fragments/BackupWalletFragment\\.java",
"android/java/org/chromium/chrome/browser/crypto_wallet/fragments/onboarding_fragments/SecurePasswordFragment\\.java",
"android/java/org/chromium/chrome/browser/crypto_wallet/fragments/onboarding_fragments/UnlockWalletFragment\\.java",
"android/java/org/chromium/chrome/browser/crypto_wallet/modal/BraveWalletPanel\\.java",
"android/java/org/chromium/chrome/browser/rate/RateDialogFragment\\.java",
"android/java/org/chromium/chrome/browser/settings/BraveStatsPreferences\\.java",
"android/java/org/chromium/chrome/browser/settings/BraveSyncScreensPreference\\.java",
"android/java/org/chromium/chrome/browser/settings/developer/BraveQAPreferences\\.java",
"android/java/org/chromium/chrome/browser/util/BraveDbUtil\\.java",
],
"_CheckAndroidNoBannedImports": [
"android/java/org/chromium/chrome/browser/notifications/BraveNotificationSettingsBridge\\.java",
"android/java/org/chromium/chrome/browser/qrreader/CameraSource\\.java",
"browser/notifications/android/java/src/org/chromium/chrome/browser/notifications/BraveNotificationManagerProxyImpl\\.java",
],
"CheckForDeprecatedOSMacros": [
"browser/ntp_background/custom_background_file_manager\\.h",
"browser/ntp_background/ntp_custom_background_images_service_delegate\\.cc",
"browser/ui/webui/new_tab_page/brave_new_tab_page_handler\\.cc",
"components/brave_sync/network_time_helper\\.cc",
],
"CheckConsistentGrdChanges": [
"browser/ui/android/strings/android_brave_strings\\.grd",
],
"CheckRawPtrUsage": [
"components/brave_search/renderer/brave_search_default_js_handler\\.h",
"components/brave_search/renderer/brave_search_fallback_js_handler\\.h",
"components/brave_search/renderer/brave_search_service_worker_holder\\.h",
"components/brave_wallet/renderer/js_ethereum_provider\\.h",
"components/content_settings/renderer/brave_content_settings_agent_impl_autoplay_browsertest\\.cc",
"components/cosmetic_filters/renderer/cosmetic_filters_js_handler\\.h",
"components/speedreader/renderer/speedreader_js_handler\\.h",
],
},
}