From c4a07284476e597836ef44b7483f23bc677d0116 Mon Sep 17 00:00:00 2001 From: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com> Date: Fri, 15 Dec 2023 23:33:16 +0000 Subject: [PATCH] docs: updates from Homebrew/brew --- docs/Homebrew/FormulaAuditor.html | 541 ++- docs/method_list.html | 7386 +++++++++++++++-------------- 2 files changed, 3978 insertions(+), 3949 deletions(-) diff --git a/docs/Homebrew/FormulaAuditor.html b/docs/Homebrew/FormulaAuditor.html index 39514d0c5..47430a7a2 100644 --- a/docs/Homebrew/FormulaAuditor.html +++ b/docs/Homebrew/FormulaAuditor.html @@ -889,6 +889,28 @@
# File 'formula_auditor.rb', line 18 @@ -1183,6 +1207,8 @@@spdx_license_data = [:spdx_license_data] @spdx_exception_data = [:spdx_exception_data] @tap_audit = [:tap_audit] + @previous_committed = {} + @newest_committed = {} end
-137 -138 139 -140+140 +141 +142
# File 'formula_auditor.rb', line 137 +# File 'formula_auditor.rb', line 139 def self.aliases # core aliases + tap alias names + tap alias full name @@ -1472,21 +1498,21 @@
-922 -923 -924 -925 -926 -927 -928 -929 -930 -931 -932 -933+903 +904 +905 +906 +907 +908 +909 +910 +911 +912 +913 +914
# File 'formula_auditor.rb', line 922 +# File 'formula_auditor.rb', line 903 def audit only_audits = @only @@ -1535,18 +1561,18 @@
-636 -637 638 639 640 641 642 643 -644+644 +645 +646
# File 'formula_auditor.rb', line 636 +# File 'formula_auditor.rb', line 638 def audit_bitbucket_repository user, repo = get_repo_data(%r{https?://bitbucket\.org/([^/]+)/([^/]+)/?.*}) if @new_formula @@ -1592,18 +1618,18 @@
-581 -582 583 584 585 586 587 588 -589+589 +590 +591
# File 'formula_auditor.rb', line 581 +# File 'formula_auditor.rb', line 583 def audit_bottle_spec # special case: new versioned formulae should be audited @@ -1649,8 +1675,6 @@
-422 -423 424 425 426 @@ -1684,10 +1708,12 @@+457 +458 +459454 455 456 -457
# File 'formula_auditor.rb', line 422 +# File 'formula_auditor.rb', line 424 def audit_conflicts tap = formula.tap @@ -1760,8 +1786,6 @@
-262 -263 264 265 266 @@ -1918,10 +1942,12 @@+420 +421 +422417 418 419 -420
# File 'formula_auditor.rb', line 262 +# File 'formula_auditor.rb', line 264 def audit_deps @specs.each do |spec| @@ -2117,17 +2143,17 @@
-495 -496 497 498 499 500 501 -502+502 +503 +504
# File 'formula_auditor.rb', line 495 +# File 'formula_auditor.rb', line 497 def audit_elasticsearch_kibana return if formula.name != "elasticsearch" && formula.name != "kibana" @@ -2172,8 +2198,6 @@
-53 -54 55 56 57 @@ -2254,10 +2278,12 @@+135 +136 +137132 133 134 -135
# File 'formula_auditor.rb', line 53 +# File 'formula_auditor.rb', line 55 def audit_file if formula.core_formula? && @versioned_formula @@ -2377,8 +2403,6 @@
-169 -170 171 172 173 @@ -2401,10 +2425,12 @@+193 +194 +195190 191 192 -193
# File 'formula_auditor.rb', line 169 +# File 'formula_auditor.rb', line 171 def audit_formula_name name = formula.name @@ -2466,16 +2492,16 @@
-459 -460 461 462 463 464 -465+465 +466 +467
# File 'formula_auditor.rb', line 459 +# File 'formula_auditor.rb', line 461 def audit_gcc_dependency return unless @core_tap @@ -2519,8 +2545,6 @@
-615 -616 617 618 619 @@ -2528,10 +2552,12 @@+624 +625 +626621 622 623 -624
# File 'formula_auditor.rb', line 615 +# File 'formula_auditor.rb', line 617 def audit_github_repository user, repo = get_repo_data(%r{https?://github\.com/([^/]+)/([^/]+)/?.*}) if @new_formula @@ -2578,8 +2604,6 @@
-591 -592 593 594 595 @@ -2588,10 +2612,12 @@+601 +602 +603598 599 600 -601
# File 'formula_auditor.rb', line 591 +# File 'formula_auditor.rb', line 593 def audit_github_repository_archived return if formula.deprecated? || formula.disabled? @@ -2639,18 +2665,18 @@
-626 -627 628 629 630 631 632 633 -634+634 +635 +636
# File 'formula_auditor.rb', line 626 +# File 'formula_auditor.rb', line 628 def audit_gitlab_repository user, repo = get_repo_data(%r{https?://gitlab\.com/([^/]+)/([^/]+)/?.*}) if @new_formula @@ -2696,8 +2722,6 @@
-603 -604 605 606 607 @@ -2706,10 +2730,12 @@+613 +614 +615610 611 612 -613
# File 'formula_auditor.rb', line 603 +# File 'formula_auditor.rb', line 605 def audit_gitlab_repository_archived return if formula.deprecated? || formula.disabled? @@ -2757,8 +2783,6 @@
-482 -483 484 485 486 @@ -2766,10 +2790,12 @@+491 +492 +493488 489 490 -491
# File 'formula_auditor.rb', line 482 +# File 'formula_auditor.rb', line 484 def audit_glibc return unless @core_tap @@ -2816,8 +2842,6 @@
-517 -518 519 520 521 @@ -2825,10 +2849,12 @@+526 +527 +528523 524 525 -526
# File 'formula_auditor.rb', line 517 +# File 'formula_auditor.rb', line 519 def audit_hashicorp_formulae return unless HASHICORP_RELICENSED_FORMULAE_VERSIONS.key? formula.name @@ -2875,8 +2901,6 @@
-552 -553 554 555 556 @@ -2902,10 +2926,12 @@+579 +580 +581576 577 578 -579
# File 'formula_auditor.rb', line 552 +# File 'formula_auditor.rb', line 554 def audit_homepage homepage = formula.homepage @@ -2970,18 +2996,18 @@
-528 -529 530 531 532 533 534 535 -536+536 +537 +538
# File 'formula_auditor.rb', line 528 +# File 'formula_auditor.rb', line 530 def audit_keg_only_reason return unless @core_tap @@ -3027,8 +3053,6 @@
-203 -204 205 206 207 @@ -3084,10 +3108,12 @@+260 +261 +262257 258 259 -260
# File 'formula_auditor.rb', line 203 +# File 'formula_auditor.rb', line 205 def audit_license if formula.license.present? @@ -3182,8 +3208,6 @@
-467 -468 469 470 471 @@ -3195,10 +3219,12 @@+480 +481 +482477 478 479 -480
# File 'formula_auditor.rb', line 467 +# File 'formula_auditor.rb', line 469 def audit_postgresql return if formula.name != "postgresql" @@ -3249,19 +3275,19 @@
-903 -904 -905 -906 -907 -908 -909 -910 -911 -912+884 +885 +886 +887 +888 +889 +890 +891 +892 +893
# File 'formula_auditor.rb', line 903 +# File 'formula_auditor.rb', line 884 def audit_prefix_has_contents return unless formula.prefix.directory? @@ -3308,21 +3334,21 @@
-890 -891 -892 -893 -894 -895 -896 -897 -898 -899 -900 -901+871 +872 +873 +874 +875 +876 +877 +878 +879 +880 +881 +882
# File 'formula_auditor.rb', line 890 +# File 'formula_auditor.rb', line 871 def audit_reverse_migration # Only enforce for new formula being re-added to core @@ -3371,26 +3397,6 @@
-780 -781 -782 -783 -784 -785 -786 -787 -788 -789 -790 -791 -792 -793 -794 -795 -796 -797 -798 -799 800 801 802 @@ -3441,29 +3447,10 @@+850847 848 849 -850 -851 -852 -853 -854 -855 -856 -857 -858 -859 -860 -861 -862 -863 -864 -865 -866 -867 -868 -869
# File 'formula_auditor.rb', line 780 +# File 'formula_auditor.rb', line 800 def audit_revision_and_version_scheme new_formula_problem("New formulae should not define a revision.") if @new_formula && !formula.revision.zero? @@ -3473,51 +3460,18 @@@@ -3590,8 +3538,6 @@return unless formula.tap.git? # git log is required return if formula.stable.blank? - fv = FormulaVersions.new(formula) - current_version = formula.stable.version current_checksum = formula.stable.checksum current_version_scheme = formula.version_scheme current_revision = formula.revision current_url = formula.stable.url - previous_version = T.let(nil, T.nilable(Version)) - previous_version_scheme = T.let(nil, T.nilable(Integer)) - previous_revision = T.let(nil, T.nilable(Integer)) - - newest_committed_version = T.let(nil, T.nilable(Version)) - newest_committed_checksum = T.let(nil, T.nilable(String)) - newest_committed_revision = T.let(nil, T.nilable(Integer)) - newest_committed_url = T.let(nil, T.nilable(String)) - - fv.rev_list("origin/HEAD") do |revision, path| - begin - fv.formula_at_revision(revision, path) do |f| - stable = f.stable - next if stable.blank? - - previous_version = stable.version - previous_checksum = stable.checksum - previous_version_scheme = f.version_scheme - previous_revision = f.revision - - newest_committed_version ||= previous_version - newest_committed_checksum ||= previous_checksum - newest_committed_revision ||= previous_revision - newest_committed_url ||= stable.url - end - rescue MacOSVersion::Error - break - end + previous_committed, newest_committed = committed_version_info - break if previous_version && current_version != previous_version - break if previous_revision && current_revision != previous_revision - end - - if current_version == newest_committed_version && - current_url == newest_committed_url && - current_checksum != newest_committed_checksum && - current_checksum.present? && newest_committed_checksum.present? + if current_version == newest_committed[:version] && + current_url == newest_committed[:url] && + current_checksum != newest_committed[:checksum] && + current_checksum.present? && newest_committed[:checksum].present? problem( "stable sha256 changed without the url/version also changing; " \ "please create an issue upstream to rule out malicious " \ @@ -3525,33 +3479,27 @@
) end - if !newest_committed_version.nil? && - current_version < newest_committed_version && - current_version_scheme == previous_version_scheme - problem "stable version should not decrease (from #{newest_committed_version} to #{current_version})" - end - - unless previous_version_scheme.nil? - if current_version_scheme < previous_version_scheme - problem "version_scheme should not decrease (from #{previous_version_scheme} " \ + unless previous_committed[:version_scheme].nil? + if current_version_scheme < previous_committed[:version_scheme] + problem "version_scheme should not decrease (from #{previous_committed[:version_scheme]} " \ "to #{current_version_scheme})" - elsif current_version_scheme > (previous_version_scheme + 1) + elsif current_version_scheme > (previous_committed[:version_scheme] + 1) problem "version_schemes should only increment by 1" end end - if (previous_version != newest_committed_version || - current_version != newest_committed_version) && + if (previous_committed[:version] != newest_committed[:version] || + current_version != newest_committed[:version]) && !current_revision.zero? && - current_revision == newest_committed_revision && - current_revision == previous_revision + current_revision == newest_committed[:revision] && + current_revision == previous_committed[:revision] problem "'revision #{current_revision}' should be removed" - elsif current_version == previous_version && - !previous_revision.nil? && - current_revision < previous_revision - problem "revision should not decrease (from #{previous_revision} to #{current_revision})" - elsif newest_committed_revision && - current_revision > (newest_committed_revision + 1) + elsif current_version == previous_committed[:version] && + !previous_committed[:revision].nil? && + current_revision < previous_committed[:revision] + problem "revision should not decrease (from #{previous_committed[:revision]} to #{current_revision})" + elsif newest_committed[:revision] && + current_revision > (newest_committed[:revision] + 1) problem "revisions should only increment by 1" end end
-660 -661 662 663 664 @@ -3708,10 +3654,12 @@+778 +779 +780775 776 777 -778
# File 'formula_auditor.rb', line 660 +# File 'formula_auditor.rb', line 662 def audit_specs problem "Head-only (no stable download)" if head_only?(formula) @@ -3835,6 +3783,79 @@
+ This method is part of a private API. + This method may only be used in the Homebrew/brew repository. + Third parties should avoid using this method if possible, as it may be removed or changed without warning. +
+ + + +
+ + + +782 +783 +784 +785 +786 +787 +788 +789 +790 +791 +792 +793 +794 +795 +796 +797 +798+ |
+
+ # File 'formula_auditor.rb', line 782 + +def audit_stable_version + return unless @git + return unless formula.tap # skip formula not from core or any taps + return unless formula.tap.git? # git log is required + return if formula.stable.blank? + + current_version = formula.stable.version + current_version_scheme = formula.version_scheme + + previous_committed, newest_committed = committed_version_info + + if !newest_committed[:version].nil? && + current_version < newest_committed[:version] && + current_version_scheme == previous_committed[:version_scheme] + problem "stable version should not decrease (from #{newest_committed[:version]} to #{current_version})" + end +end+ |
+
-42 -43 44 45 46 @@ -3876,10 +3895,12 @@+51 +52 +5348 49 50 -51
# File 'formula_auditor.rb', line 42 +# File 'formula_auditor.rb', line 44 def audit_style return unless @style_offenses @@ -3926,8 +3947,6 @@
-144 -145 146 147 148 @@ -3949,10 +3968,12 @@+167 +168 +169164 165 166 -167
# File 'formula_auditor.rb', line 144 +# File 'formula_auditor.rb', line 146 def audit_synced_versions_formulae return unless formula.tap @@ -4013,27 +4034,27 @@
-871 -872 -873 -874 -875 -876 -877 -878 -879 -880 -881 -882 -883 -884 -885 -886 -887 -888+852 +853 +854 +855 +856 +857 +858 +859 +860 +861 +862 +863 +864 +865 +866 +867 +868 +869
# File 'formula_auditor.rb', line 871 +# File 'formula_auditor.rb', line 852 def audit_text bin_names = Set.new @@ -4088,8 +4109,6 @@
-538 -539 540 541 542 @@ -4100,10 +4119,12 @@+550 +551 +552547 548 549 -550
# File 'formula_auditor.rb', line 538 +# File 'formula_auditor.rb', line 540 def audit_versioned_keg_only return unless @versioned_formula @@ -4153,8 +4174,6 @@
-646 -647 648 649 650 @@ -4165,10 +4184,12 @@+658 +659 +660655 656 657 -658
# File 'formula_auditor.rb', line 646 +# File 'formula_auditor.rb', line 648 def get_repo_data(regex) return unless @core_tap @@ -4218,12 +4239,12 @@
-918 -919 -920+899 +900 +901
# File 'formula_auditor.rb', line 918 +# File 'formula_auditor.rb', line 899 def problem_if_output(output) problem(output) if output @@ -4263,12 +4284,12 @@
-914 -915 -916+895 +896 +897
# File 'formula_auditor.rb', line 914 +# File 'formula_auditor.rb', line 895 def quote_dep(dep) dep.is_a?(Symbol) ? dep.inspect : "'#{dep}'" diff --git a/docs/method_list.html b/docs/method_list.html index 13ee23fb5..2c8f2a4a6 100644 --- a/docs/method_list.html +++ b/docs/method_list.html @@ -2470,7 +2470,7 @@Method List