Enable avoid_redundant_argument_values lint (#91409)
This commit is contained in:
@@ -132,7 +132,6 @@ Future<void> main(List<String> rawArguments) async {
|
||||
);
|
||||
argParser.addFlag(
|
||||
'collect',
|
||||
defaultsTo: false,
|
||||
negatable: false,
|
||||
help: 'If this flag is set, then collect and parse header files from '
|
||||
'Chromium and Android instead of reading pre-parsed data from '
|
||||
@@ -141,7 +140,6 @@ Future<void> main(List<String> rawArguments) async {
|
||||
);
|
||||
argParser.addFlag(
|
||||
'help',
|
||||
defaultsTo: false,
|
||||
negatable: false,
|
||||
help: 'Print help for this command.',
|
||||
);
|
||||
|
||||
@@ -22,7 +22,7 @@ class MaskConstant {
|
||||
return name
|
||||
.split(' ')
|
||||
.map<String>((String word) => lowerCamelToUpperCamel(word.toLowerCase()))
|
||||
.join('');
|
||||
.join();
|
||||
}
|
||||
|
||||
String get lowerCamelName {
|
||||
|
||||
@@ -81,7 +81,7 @@ class IOSCodeGenerator extends PlatformCodeGenerator {
|
||||
buffer.write(wrapString(constant.description, prefix: ' * '));
|
||||
buffer.writeln(' */');
|
||||
buffer.writeln('const uint64_t k${constant.upperCamelName} = ${toHex(constant.value, digits: 11)};');
|
||||
buffer.writeln('');
|
||||
buffer.writeln();
|
||||
}
|
||||
return buffer.toString().trimRight();
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ class KeyboardKeysCodeGenerator extends BaseCodeGenerator {
|
||||
'[RawKeyEvent.physicalKey] for more information.');
|
||||
lines.add(entry.usbHidCode, '''
|
||||
$firstComment ///
|
||||
$otherComments static const PhysicalKeyboardKey ${entry.constantName} = PhysicalKeyboardKey(${toHex(entry.usbHidCode, digits: 8)});
|
||||
$otherComments static const PhysicalKeyboardKey ${entry.constantName} = PhysicalKeyboardKey(${toHex(entry.usbHidCode)});
|
||||
''');
|
||||
}
|
||||
return lines.sortedJoin().trimRight();
|
||||
@@ -71,7 +71,7 @@ $otherComments static const PhysicalKeyboardKey ${entry.constantName} = Physica
|
||||
final OutputLines<int> lines = OutputLines<int>('Physical debug names');
|
||||
for (final PhysicalKeyEntry entry in keyData.entries) {
|
||||
lines.add(entry.usbHidCode, '''
|
||||
${toHex(entry.usbHidCode, digits: 8)}: '${entry.commentName}',''');
|
||||
${toHex(entry.usbHidCode)}: '${entry.commentName}',''');
|
||||
}
|
||||
return lines.sortedJoin().trimRight();
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ class KeyCodesCcGenerator extends BaseCodeGenerator {
|
||||
final OutputLines<int> lines = OutputLines<int>('Physical Key list');
|
||||
for (final PhysicalKeyEntry entry in keyData.entries) {
|
||||
lines.add(entry.usbHidCode, '''
|
||||
constexpr uint64_t kPhysical${_toUpperCammel(entry.constantName)} = ${toHex(entry.usbHidCode, digits: 8)};''');
|
||||
constexpr uint64_t kPhysical${_toUpperCammel(entry.constantName)} = ${toHex(entry.usbHidCode)};''');
|
||||
}
|
||||
return lines.sortedJoin().trimRight();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user