Add many more global analyses. (#47875)
* Update packages. * Add many more global analyses. * Catch trailing spaces and trailing newlines in all text files. Before we were only checking newly added files, but that means we missed some. * Port the trailing spaces logic to work on Windows too. * Correct all the files with trailing spaces and newlines. * Refactor some of the dev/bots logic into a utils.dart library. Notably, the "exit" and "print" shims for testing are now usable from test.dart, analyze.dart, and run_command.dart. * Add an "exitWithError" function that prints the red lines and then exits. This is the preferred way to exit from test.dart, analyze.dart, and run_command.dart. * More consistency in the output of analyze.dart. * Refactor analyze.dart to use the _allFiles file enumerating logic more widely. * Add some double-checking logic to the _allFiles logic to catch cases where changes to that logic end up catching fewer files than expected (helps prevent future false positives). * Add a check to prevent new binary files from being added to the repository. Grandfather in the binaries that we've already added. * Update all the dependencies (needed because we now import crypto in dev/bots/analyze.dart).
This commit is contained in:
@@ -9,9 +9,9 @@ It then generates `keyboard_key.dart` (containing the `LogicalKeyboardKey` and
|
||||
`PhysicalKeyboardKey` classes), and `keyboard_maps.dart`, containing
|
||||
platform-specific immutable maps for translating platform keycodes and
|
||||
information into the pre-defined key values in the `LogicalKeyboardKey` and
|
||||
`PhysicalKeyboardKey` classes.
|
||||
`PhysicalKeyboardKey` classes.
|
||||
|
||||
The `data` subdirectory contains both some local data files, and the templates
|
||||
The `data` subdirectory contains both some local data files, and the templates
|
||||
used to generate the source files.
|
||||
|
||||
- `data/key_data.json`: contains the merged data from all the other sources.
|
||||
@@ -30,9 +30,9 @@ used to generate the source files.
|
||||
- `data/synonyms.json`: contains a mapping between pseudo-keys that represent
|
||||
other keys, and the sets of keys they represent. For example, this contains
|
||||
the "shift" key that represents either a "shiftLeft" or "shiftRight" key.
|
||||
|
||||
|
||||
## Running the tool
|
||||
|
||||
|
||||
To run the `gen_keycodes` tool using the checked in `key_data.json` file, run
|
||||
it like so:
|
||||
|
||||
@@ -106,9 +106,9 @@ define. It has values in the following ranges.
|
||||
a unique prefix in the range 0x2-0xFE. If multiple systems define keys with
|
||||
the same usage (not the same number), then the value with the lowest prefix
|
||||
is used as the defining code.
|
||||
|
||||
|
||||
Prefixes will be:
|
||||
|
||||
|
||||
|Code|Platform|
|
||||
|----|--------|
|
||||
|0x02| Android|
|
||||
@@ -139,7 +139,7 @@ define. It has values in the following ranges.
|
||||
|
||||
- **0x200 0000 0000 - 0x2FF FFFF FFFF**: For pseudo-keys which represent
|
||||
combinations of other keys, and conceptual keys which don't have a physical
|
||||
representation. This is where things like key synonyms are defined (e.g.
|
||||
representation. This is where things like key synonyms are defined (e.g.
|
||||
"shiftLeft" is a synonym for "shift": the "shift" key is a pseudo-key
|
||||
representing either the left or right shift key).
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{
|
||||
{
|
||||
"altLeft": ["LEFT_ALT"],
|
||||
"altRight": ["RIGHT_ALT"],
|
||||
"arrowDown": ["DOWN"],
|
||||
|
||||
@@ -49,4 +49,3 @@
|
||||
// give it a Mac keycode. This overrides their definition.
|
||||
// USB HID evdev XKB Win Mac DOMKey Code
|
||||
USB_KEYMAP(0x000012, 0x0000, 0x0000, 0x0000, 0x003f, "Fn", FN),
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ environment:
|
||||
|
||||
dependencies:
|
||||
args: 1.5.2
|
||||
http: 0.12.0+2
|
||||
http: 0.12.0+3
|
||||
path: 1.6.4
|
||||
platform: 2.2.1
|
||||
|
||||
@@ -22,4 +22,4 @@ dependencies:
|
||||
term_glyph: 1.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
typed_data: 1.1.6 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
|
||||
# PUBSPEC CHECKSUM: 613a
|
||||
# PUBSPEC CHECKSUM: 853b
|
||||
|
||||
@@ -8,7 +8,7 @@ environment:
|
||||
dependencies:
|
||||
archive: 2.0.11
|
||||
args: 1.5.2
|
||||
http: 0.12.0+2
|
||||
http: 0.12.0+3
|
||||
intl: 0.16.0
|
||||
meta: 1.1.8
|
||||
path: 1.6.4
|
||||
@@ -35,7 +35,7 @@ dev_dependencies:
|
||||
|
||||
analyzer: 0.38.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
boolean_selector: 1.0.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
coverage: 0.13.3+1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
coverage: 0.13.3+3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
csslib: 0.16.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
front_end: 0.1.27 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
glob: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
@@ -69,4 +69,4 @@ dev_dependencies:
|
||||
web_socket_channel: 1.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
yaml: 2.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
|
||||
# PUBSPEC CHECKSUM: 3590
|
||||
# PUBSPEC CHECKSUM: cc93
|
||||
|
||||
@@ -696,4 +696,3 @@ class PathAnimationMatcher extends Matcher {
|
||||
String testAsset(String name) {
|
||||
return path.join(kPackagePath, 'test_assets', name);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user