Skip to content

Commit

Permalink
[Loc] Presubmit performance improvement
Browse files Browse the repository at this point in the history
The current Loc presubmit are doing two checks: check_localizable_resources and check_localizability
(Details of what they are checking: https://docs.google.com/document/d/1L6TkT2-42MMQ72ZSBMFwUaq7M6mDgA2X0x8oHHKaV_U/edit#heading=h.w1no7qaa0mi0)

This CL merge two checks into one single check. check_localizability are modified into a utils file, and check_localizable_resources will also run those localizability checks when the files are visited. By doing this, we avoid the extra call to node during presubmit, and all files and nodes will only be visited once.

Also adding these fixes
https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2370103
Fix:
- Pass the fullpath for comparison.(itemPath)
- Normalize comparison between paths
- using native fs.promises instead of promisify (nodejs/node#26581)

Bug: 1116989
Change-Id: I054040d83a65b5f798a21c040096422e287bc799
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2381320
Reviewed-by: Vidal Diazleal <vidorteg@microsoft.com>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Christy Chen <chrche@microsoft.com>
  • Loading branch information
Christy Chen authored and Commit Bot committed Sep 4, 2020
1 parent bef95be commit 23909d8
Show file tree
Hide file tree
Showing 7 changed files with 292 additions and 409 deletions.
4 changes: 0 additions & 4 deletions scripts/devtools_paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,6 @@ def check_localizable_resources_path():
return path.join(devtools_root_path(), 'scripts', 'localization', 'check_localizable_resources.js')


def check_localized_strings_path():
return path.join(devtools_root_path(), 'scripts', 'localization', 'check_localizability.js')


def karma_path():
return path.join(node_modules_path(), 'karma', 'bin', 'karma')

Expand Down
348 changes: 0 additions & 348 deletions scripts/localization/check_localizability.js

This file was deleted.

Loading

0 comments on commit 23909d8

Please sign in to comment.