Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6f763fdcae30f6a69ed587b9006d9509d6062684
      
https://github.com/WebKit/WebKit/commit/6f763fdcae30f6a69ed587b9006d9509d6062684
  Author: Ryosuke Niwa <[email protected]>
  Date:   2025-08-13 (Wed, 13 Aug 2025)

  Changed paths:
    A Tools/Scripts/compute-safer-cpp-statistics
    M Tools/Scripts/webkitpy/safer_cpp/checkers.py

  Log Message:
  -----------
  Add a tool to gather safer C++ statistics per project
https://bugs.webkit.org/show_bug.cgi?id=297372

Reviewed by Brianna Fan.

Add compute-safer-cpp-statistics to gather safer C++ statistics.
The total reports the total pass rate across all checkers as well as pass rate 
per checker.

For example, as of this writing, we gather the following statistics for 
Source/WebKit:
Overall: 79.70% safe
ForwardDeclChecker: 99.74% safe
MemoryUnsafeCastChecker: 99.74% safe
NoUncheckedPtrMemberChecker: 100.00% safe
NoUncountedMemberChecker: 99.97% safe
NoUnretainedMemberChecker: 97.86% safe
RefCntblBaseVirtualDtor: 100.00% safe
RetainPtrCtorAdoptChecker: 97.35% safe
UncheckedCallArgsChecker: 97.37% safe
UncheckedLocalVarsChecker: 99.91% safe
UncountedCallArgsChecker: 89.88% safe
UncountedLambdaCapturesChecker: 99.92% safe
UncountedLocalVarsChecker: 100.00% safe
UnretainedCallArgsChecker: 91.14% safe
UnretainedLambdaCapturesChecker: 100.00% safe
UnretainedLocalVarsChecker: 100.00% safe

* Tools/Scripts/compute-safer-cpp-statistics: Added.
(parser):
(matching_checkers):
(load_expectations):
(count_number_of_lines):
(enumerate_relevant_files):
(gather_statistics):
(safe_ratio):
(print_percentage):
(main):
* Tools/Scripts/webkitpy/safer_cpp/checkers.py:
(Checker.project_path):
(Checker):
(Checker.derived_sources_path):

Canonical link: https://commits.webkit.org/298668@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