Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ deps = {
'src/third_party/boringssl':
Var('dart_git') + '/boringssl_gen.git' + '@' + Var('dart_boringssl_gen_rev'),

'src/third_party/yapf':
'src/flutter/third_party/yapf':
Var('github_git') + '/google/yapf' + '@' + '212c5b5ad8e172d2d914ae454c121c89cccbcb35',

'src/third_party/boringssl/src':
Expand Down
2 changes: 1 addition & 1 deletion ci/licenses_golden/excluded_files
Original file line number Diff line number Diff line change
Expand Up @@ -1071,6 +1071,7 @@
../../../flutter/third_party/wuffs/release/c/README.md
../../../flutter/third_party/wuffs/script
../../../flutter/third_party/wuffs/sync.txt
../../../flutter/third_party/yapf
../../../flutter/tools
../../../flutter/tools/licenses/.dart_tool
../../../flutter/tools/licenses/.gitignore
Expand Down Expand Up @@ -3212,7 +3213,6 @@
../../../third_party/vulkan_memory_allocator/src
../../../third_party/vulkan_memory_allocator/tools
../../../third_party/web_dependencies/canvaskit
../../../third_party/yapf
../../../third_party/zlib/.git
../../../third_party/zlib/CMakeLists.txt
../../../third_party/zlib/DIR_METADATA
Expand Down
2 changes: 1 addition & 1 deletion ci/licenses_golden/tool_signature
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Signature: 90d7ddb0684f0d9d245924c2db26e02a
Signature: 761d7cd498ba5573a7348d86204276be

2 changes: 1 addition & 1 deletion tools/licenses/lib/paths.dart
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ final Set<String> skippedPaths = <String>{
r'flutter/third_party/txt/third_party/fonts',
r'flutter/third_party/wuffs/docs',
r'flutter/third_party/wuffs/script',
r'flutter/third_party/yapf', // only used for code formatting
r'flutter/tools',
r'flutter/web_sdk', // this code is not linked into Flutter apps; it's only used by engine tests and tools
r'fuchsia/sdk/linux/docs',
Expand Down Expand Up @@ -214,7 +215,6 @@ final Set<String> skippedPaths = <String>{
r'third_party/vulkan_memory_allocator/src',
r'third_party/vulkan_memory_allocator/tools',
r'third_party/web_dependencies/canvaskit', // redundant; covered by Skia dependencies
r'third_party/yapf', // only used for code formatting
r'third_party/zlib/contrib/minizip/miniunz.c', // sample file
r'third_party/zlib/contrib/minizip/minizip.c', // sample file
r'tools', // not distributed in binary
Expand Down
12 changes: 9 additions & 3 deletions tools/yapf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ set -e
function follow_links() (
cd -P "$(dirname -- "$1")"
file="$PWD/$(basename -- "$1")"
while [[ -h "$file" ]]; do
while [[ -L "$file" ]]; do
Comment thread
matanlurey marked this conversation as resolved.
Outdated
cd -P "$(dirname -- "$file")"
file="$(readlink -- "$file")"
cd -P "$(dirname -- "$file")"
Expand All @@ -34,7 +34,13 @@ function follow_links() (
)

SCRIPT_DIR=$(follow_links "$(dirname -- "${BASH_SOURCE[0]}")")
SRC_DIR="$(cd "$SCRIPT_DIR/../.."; pwd -P)"
YAPF_DIR="$(cd "$SRC_DIR/third_party/yapf"; pwd -P)"
SRC_DIR="$(
cd "$SCRIPT_DIR/../.."
pwd -P
)"
YAPF_DIR="$(
cd "$SRC_DIR/flutter/third_party/yapf"
pwd -P
)"

PYTHONPATH="$YAPF_DIR" python3 "$YAPF_DIR/yapf" "$@"