From 31bdde436f3ca0c9fcc551fc324633d831881fd2 Mon Sep 17 00:00:00 2001 From: Daco Harkes Date: Thu, 15 Jul 2021 10:53:29 +0000 Subject: [PATCH] [tool] idefiles remove analysis_options.yaml generation This caused issues when running analyzer tests locally. Bug: https://github.com/dart-lang/sdk/issues/35562 Instead, SDK devs should use DartCode's option to ignore files in VSCode: https://github.com/dart-lang/sdk/issues/35562#issuecomment-543140783 For other IDEs there is no documented solution. Change-Id: Ibf3f47d1035ea5d98c1db8fd1209677453588327 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/207021 Reviewed-by: Clement Skau Commit-Queue: Daco Harkes --- tools/generate_idefiles.py | 59 -------------------------------------- 1 file changed, 59 deletions(-) diff --git a/tools/generate_idefiles.py b/tools/generate_idefiles.py index 7809c64854a..ac7569624b2 100755 --- a/tools/generate_idefiles.py +++ b/tools/generate_idefiles.py @@ -23,7 +23,6 @@ HOST_OS = utils.GuessOS() def GenerateIdeFiles(options): GenerateCompileCommands(options) - GenerateAnalysisOptions(options) def GenerateCompileCommands(options): @@ -81,64 +80,6 @@ def GenerateCompileCommands(options): return 0 -def GenerateAnalysisOptions(options): - """Generate analysis_optioms.yaml for the Dart analyzer. - - To prevent dartanalyzer from tripping on the non-Dart files when it is - started from the root dart-sdk directory. - https://github.com/dart-lang/sdk/issues/35562 - - Args: - options: supported options include: force, dir - """ - contents = """analyzer: - exclude: - - benchmarks/** - - benchmarks-internal/** - - docs/newsletter/20171103/** - - pkg/** - - out/** - - runtime/** - - samples-dev/swarm/** - - sdk/lib/** - - tests/co19/** - - tests/co19_2/** - - tests/corelib/** - - tests/corelib_2/** - - tests/web/** - - tests/web_2/** - - tests/dartdevc/** - - tests/dartdevc_2/** - - tests/ffi/** - - tests/ffi_2/** - - tests/language/** - - tests/language_2/** - - tests/lib/** - - tests/lib_2/** - - tests/modular/** - - tests/standalone/** - - tests/standalone_2/** - - third_party/observatory_pub_packages/** - - third_party/pkg/** - - third_party/pkg_tested/dart_style/** - - third_party/tcmalloc/** - - tools/apps/update_homebrew/** - - tools/dart2js/** - - tools/dom/** - - tools/sdks/dart-sdk/lib/** - - tools/status_clean.dart - - xcodebuild/**""" - - fname = os.path.join(options.dir, "analysis_options.yaml") - - if os.path.isfile(fname) and not options.force: - print(fname + " already exists, use --force to override") - return - - with open(fname, "w") as f: - f.write(contents) - - def main(argv): parser = argparse.ArgumentParser( description="Python script to generate compile_commands.json and "