Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 87ab1712d508fcfb076d63e39df84fa3c36cbc6b
      
https://github.com/WebKit/WebKit/commit/87ab1712d508fcfb076d63e39df84fa3c36cbc6b
  Author: Elliott Williams <[email protected]>
  Date:   2025-07-10 (Thu, 10 Jul 2025)

  Changed paths:
    M Tools/Scripts/libraries/webkitapipy/webkitapipy/program.py
    A Tools/Scripts/libraries/webkitapipy/webkitapipy/reporter.py
    M Tools/Scripts/libraries/webkitapipy/webkitapipy_additions/program.pyi

  Log Message:
  -----------
  [webkitapipy] Add build-tool style reporting
https://bugs.webkit.org/show_bug.cgi?id=295501
rdar://155232286

Reviewed by Sam Sneddon and Brianna Fan.

Refactor the TSV reporter into a base class which can support multiple
reporting formats. Create a new `BuildToolReporter` which formats
diagnostic messages in the "<path>: error: <message>" format common to
build tools. This makes validation messages visible in most IDEs, and in
the case of diagnostics on allowlists, attributed to files that can be
jumped to.

The output also emits a suggested allowlist entry, to show how
developers can unblock themselves when investigating new SPI use.

Add a --format argument to control which build tool is in use. The TSV
format stays around for non-build-time usage.

Remove the --print-details behavior and always print issues as they
occur. This behavior was useful before we had allowlists and therefore
had hundreds of validation issues, but I don't think it is valuable to
keep around.

* Tools/Scripts/libraries/webkitapipy/webkitapipy/program.py:
(get_parser):
(TSVReporter): Deleted.
(TSVReporter.__init__): Deleted.
(TSVReporter.emit_diagnostic): Deleted.
(TSVReporter.missing_selector): Deleted.
(TSVReporter.missing_class): Deleted.
(TSVReporter.missing_symbol): Deleted.
(TSVReporter.unused_allowed_name): Deleted.
(TSVReporter.finished): Deleted.
* Tools/Scripts/libraries/webkitapipy/webkitapipy/reporter.py: Added.
(Reporter):
(Reporter.__init__):
(Reporter.emit_diagnostic):
(Reporter.format_diagnostic): Replacement for the "missing_*" methods,
  to better match the new Diagnostic data class and avoid some repition.
  Notably, turning a Diagnostic into a string is now separate from
  deciding whether to print it.
(Reporter.finished):
(TSVReporter):
(TSVReporter.format_diagnostic):
(BuildToolReporter):
(BuildToolReporter.__init__):
(BuildToolReporter.format_diagnostic):
(BuildToolReporter.finished):
(configure_reporter): Factory method to produce a reporter from Options,
  similar to existing logic in webkitapipy_additions.

* Tools/Scripts/libraries/webkitapipy/webkitapipy_additions/program.pyi:

Canonical link: https://commits.webkit.org/297230@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to