chore: fix linter errors in .mm files (#21931)
* chore: fix the "npm run lint:obj" invocation * chore: fix linter errors in .mm files
This commit is contained in:
parent
20660285e2
commit
bc0f5acc73
6 changed files with 13 additions and 5 deletions
|
@ -281,8 +281,8 @@ async function main () {
|
||||||
const opts = parseCommandLine()
|
const opts = parseCommandLine()
|
||||||
|
|
||||||
// no mode specified? run 'em all
|
// no mode specified? run 'em all
|
||||||
if (!opts['c++'] && !opts.javascript && !opts.python && !opts.gn && !opts.patches) {
|
if (!opts['c++'] && !opts.javascript && !opts.objc && !opts.python && !opts.gn && !opts.patches) {
|
||||||
opts['c++'] = opts.javascript = opts.python = opts.gn = opts.patches = true
|
opts['c++'] = opts.javascript = opts.objc = opts.python = opts.gn = opts.patches = true
|
||||||
}
|
}
|
||||||
|
|
||||||
const linters = LINTERS.filter(x => opts[x.key])
|
const linters = LINTERS.filter(x => opts[x.key])
|
||||||
|
|
|
@ -33,8 +33,8 @@ static base::mac::ScopedObjCClassSwizzler* g_swizzle_imk_input_session;
|
||||||
// not have fatal OOM occur while this method executes, but it is better
|
// not have fatal OOM occur while this method executes, but it is better
|
||||||
// than crashing when using IME.
|
// than crashing when using IME.
|
||||||
base::allocator::SetCallNewHandlerOnMallocFailure(false);
|
base::allocator::SetCallNewHandlerOnMallocFailure(false);
|
||||||
g_swizzle_imk_input_session
|
g_swizzle_imk_input_session->InvokeOriginal<
|
||||||
->InvokeOriginal<void, NSRange, long long, void (^)(void)>(
|
void, NSRange, long long, void (^)(void)>( // NOLINT(runtime/int)
|
||||||
self, _cmd, range, attributes, block);
|
self, _cmd, range, attributes, block);
|
||||||
base::allocator::SetCallNewHandlerOnMallocFailure(true);
|
base::allocator::SetCallNewHandlerOnMallocFailure(true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,9 @@
|
||||||
#include <AvailabilityMacros.h>
|
#include <AvailabilityMacros.h>
|
||||||
#include <objc/objc-runtime.h>
|
#include <objc/objc-runtime.h>
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <utility>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "base/mac/mac_util.h"
|
#include "base/mac/mac_util.h"
|
||||||
|
|
|
@ -10,6 +10,9 @@
|
||||||
#import <sys/mount.h>
|
#import <sys/mount.h>
|
||||||
#import <sys/param.h>
|
#import <sys/param.h>
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
#include "gin/dictionary.h"
|
#include "gin/dictionary.h"
|
||||||
#include "shell/browser/browser.h"
|
#include "shell/browser/browser.h"
|
||||||
#include "shell/common/gin_converters/callback_converter.h"
|
#include "shell/common/gin_converters/callback_converter.h"
|
||||||
|
|
|
@ -5,6 +5,8 @@
|
||||||
|
|
||||||
#import "shell/browser/ui/cocoa/atom_menu_controller.h"
|
#import "shell/browser/ui/cocoa/atom_menu_controller.h"
|
||||||
|
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
#include "base/logging.h"
|
#include "base/logging.h"
|
||||||
#include "base/strings/sys_string_conversions.h"
|
#include "base/strings/sys_string_conversions.h"
|
||||||
#include "base/strings/utf_string_conversions.h"
|
#include "base/strings/utf_string_conversions.h"
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#import "shell/browser/ui/cocoa/atom_touch_bar.h"
|
#import "shell/browser/ui/cocoa/atom_touch_bar.h"
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <utility>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "base/strings/sys_string_conversions.h"
|
#include "base/strings/sys_string_conversions.h"
|
||||||
|
|
Loading…
Reference in a new issue