[tools] Suppress empty fidl_api_summarize output

* Generates empty output if the library only has a library
  declaration at the target API level.
* Adds a flag.Setter for the summary format in pkg summarize.
* Combines Write and WriteJSON into GenerateSummary since
  they're only used by this binary which selects the summary
  format based on a flag value. Also moves this logic to
  pkg summarize.

Bug: 102484

Change-Id: Iecc463fdaed7f34f25a2838b438389a314881f2a
Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/692721
Reviewed-by: Hunter Freyer <hjfreyer@google.com>
Commit-Queue: Kendal Harland <kjharland@google.com>
Reviewed-by: Alex Zaslavsky <azaslavsky@google.com>
Reviewed-by: Filip Filmar <fmil@google.com>
9 files changed
tree: 0afb892dd10cb6addcd4663c4e49651c50566641
  1. boards/
  2. build/
  3. bundles/
  4. docs/
  5. examples/
  6. products/
  7. scripts/
  8. sdk/
  9. src/
  10. third_party/
  11. tools/
  12. zircon/
  13. .clang-format
  14. .clang-tidy
  15. .editorconfig
  16. .git-blame-ignore-revs
  17. .gitattributes
  18. .gitignore
  19. .gn
  20. .style.yapf
  21. analysis_options.yaml
  22. AUTHORS
  23. BUILD.gn
  24. CODE_OF_CONDUCT.md
  25. CONTRIBUTING.md
  26. LICENSE
  27. OWNERS
  28. PATENTS
  29. pyrightconfig.json
  30. README.md
  31. rustfmt.toml
README.md

Fuchsia

What is Fuchsia?

Fuchsia is an open source, general purpose operating system supporting modern 64-bit Intel and ARM processors.

We expect everyone interacting with our project to respect our code of conduct.

Read more about Fuchsia's principles.

How can I build and run Fuchsia?

See Getting Started.

Where can I learn more about Fuchsia?

See fuchsia.dev.