@@ -114,7 +114,7 @@ def audit_file
114
114
ln -s #{ formula . path . to_s . gsub ( formula . tap . path , ".." ) } #{ alias_name }
115
115
EOS
116
116
else
117
- problem "Formula has other versions so create an alias named #{ alias_name } ."
117
+ problem "Formula has other versions so create an alias named ' #{ alias_name } ' ."
118
118
end
119
119
end
120
120
@@ -153,7 +153,7 @@ def audit_synced_versions_formulae
153
153
next if synced_formula == name
154
154
155
155
if ( synced_version = Formulary . factory ( synced_formula ) . version ) != version
156
- problem "Version of ` #{ synced_formula } ` (#{ synced_version } ) should match version of ` #{ name } ` (#{ version } )"
156
+ problem "Version of #{ synced_formula } (#{ synced_version } ) should match version of #{ name } (#{ version } )"
157
157
end
158
158
end
159
159
@@ -188,7 +188,7 @@ def audit_name
188
188
return if formula . core_formula?
189
189
return unless Formula . core_names . include? ( name )
190
190
191
- problem "Formula name conflicts with existing core formula."
191
+ problem "Formula name conflicts with an existing formula in homebrew/core ."
192
192
end
193
193
194
194
PERMITTED_LICENSE_MISMATCHES = {
@@ -226,7 +226,7 @@ def audit_license
226
226
problem <<~EOS
227
227
Formula #{ formula . name } contains incompatible licenses: #{ incompatible_licenses } .
228
228
Formulae in homebrew/core must either use a Debian Free Software Guidelines license
229
- or be released into the public domain. See #{ Formatter . url ( "https://docs.brew.sh/License-Guidelines" ) }
229
+ or be released into the public domain: #{ Formatter . url ( "https://docs.brew.sh/License-Guidelines" ) }
230
230
EOS
231
231
end
232
232
@@ -327,7 +327,7 @@ def audit_deps
327
327
end
328
328
end
329
329
330
- problem "Dependency '#{ dep } ' does not define option #{ opt . name . inspect } "
330
+ problem "Dependency '#{ dep } ' does not define option: #{ opt . name . inspect } "
331
331
end
332
332
333
333
problem "Don't use 'git' as a dependency (it's always available)" if @new_formula && dep . name == "git"
@@ -448,7 +448,7 @@ def audit_conflicts
448
448
449
449
if T . must ( tap ) . formula_renames . key? ( conflict . name ) || T . must ( tap ) . aliases . include? ( conflict . name )
450
450
problem "Formula conflict should be declared using " \
451
- "canonical name (#{ conflicting_formula . name } ) instead of #{ conflict . name } "
451
+ "canonical name (#{ conflicting_formula . name } ) instead of ' #{ conflict . name } ' "
452
452
end
453
453
454
454
reverse_conflict_found = T . let ( false , T ::Boolean )
@@ -457,7 +457,7 @@ def audit_conflicts
457
457
if T . must ( tap ) . formula_renames . key? ( reverse_conflict . name ) ||
458
458
T . must ( tap ) . aliases . include? ( reverse_conflict . name )
459
459
problem "Formula #{ conflicting_formula . name } conflict should be declared using " \
460
- "canonical name (#{ reverse_conflict_formula . name } ) instead of #{ reverse_conflict . name } "
460
+ "canonical name (#{ reverse_conflict_formula . name } ) instead of ' #{ reverse_conflict . name } ' "
461
461
end
462
462
463
463
reverse_conflict_found ||= reverse_conflict_formula == formula
@@ -651,7 +651,7 @@ def audit_github_repository_archived
651
651
metadata = SharedAudits . github_repo_data ( user , repo )
652
652
return if metadata . nil?
653
653
654
- problem "GitHub repo is archived" if metadata [ "archived" ]
654
+ problem "GitHub repository is archived" if metadata [ "archived" ]
655
655
end
656
656
657
657
def audit_gitlab_repository_archived
@@ -663,7 +663,7 @@ def audit_gitlab_repository_archived
663
663
metadata = SharedAudits . gitlab_repo_data ( user , repo )
664
664
return if metadata . nil?
665
665
666
- problem "GitLab repo is archived" if metadata [ "archived" ]
666
+ problem "GitLab repository is archived" if metadata [ "archived" ]
667
667
end
668
668
669
669
def audit_github_repository
@@ -712,7 +712,7 @@ def get_repo_data(regex)
712
712
end
713
713
714
714
def audit_specs
715
- problem "Head -only (no stable download)" if head_only? ( formula )
715
+ problem "HEAD -only (no stable download)" if head_only? ( formula )
716
716
717
717
%w[ Stable HEAD ] . each do |name |
718
718
spec_name = name . downcase . to_sym
@@ -759,7 +759,7 @@ def audit_specs
759
759
760
760
if formula . head && @versioned_formula &&
761
761
!formula . tap &.audit_exception ( :versioned_head_spec_allowlist , formula . name )
762
- problem "Versioned formulae should not have a `HEAD ` spec"
762
+ problem "Versioned formulae should not have a `head ` spec"
763
763
end
764
764
765
765
stable = formula . stable
@@ -771,7 +771,7 @@ def audit_specs
771
771
772
772
stable_version_string = version . to_s
773
773
if stable_version_string . start_with? ( "HEAD" )
774
- problem "Stable: non-HEAD version name (#{ stable_version_string } ) should not begin with HEAD"
774
+ problem "Stable: non-HEAD version (#{ stable_version_string } ) should not begin with ` HEAD` "
775
775
end
776
776
777
777
stable_url_version = Version . parse ( stable . url )
@@ -790,7 +790,7 @@ def audit_specs
790
790
return if formula . tap &.audit_exception :unstable_allowlist , formula . name , version_prefix
791
791
return if formula . tap &.audit_exception :unstable_devel_allowlist , formula . name , version_prefix
792
792
793
- problem "Stable version URLs should not contain #{ matched } "
793
+ problem "Stable: version URLs should not contain ` #{ matched } ` "
794
794
when %r{download\. gnome\. org/sources} , %r{ftp\. gnome\. org/pub/GNOME/sources}i
795
795
version_prefix = stable . version . major_minor
796
796
return if formula . tap &.audit_exception :gnome_devel_allowlist , formula . name , version_prefix
@@ -800,11 +800,11 @@ def audit_specs
800
800
return if stable_url_version >= Version . new ( "40.0" )
801
801
return if stable_url_minor_version . even?
802
802
803
- problem "#{ stable . version } is a development release"
803
+ problem "Stable: version ( #{ stable . version } ) is a development release"
804
804
when %r{isc.org/isc/bind\d */}i
805
805
return if stable_url_minor_version . even?
806
806
807
- problem "#{ stable . version } is a development release"
807
+ problem "Stable: version ( #{ stable . version } ) is a development release"
808
808
809
809
when %r{https?://gitlab\. com/([\w -]+)/([\w -]+)}
810
810
owner = T . must ( Regexp . last_match ( 1 ) )
@@ -845,7 +845,7 @@ def audit_stable_version
845
845
if !newest_committed [ :version ] . nil? &&
846
846
current_version < newest_committed [ :version ] &&
847
847
current_version_scheme == previous_committed [ :version_scheme ]
848
- problem "stable version should not decrease (from #{ newest_committed [ :version ] } to #{ current_version } )"
848
+ problem "Stable: version should not decrease (from #{ newest_committed [ :version ] } to #{ current_version } )"
849
849
end
850
850
end
851
851
@@ -867,14 +867,14 @@ def audit_revision
867
867
!current_revision . zero? &&
868
868
current_revision == newest_committed [ :revision ] &&
869
869
current_revision == previous_committed [ :revision ]
870
- problem "' revision #{ current_revision } ' should be removed"
870
+ problem "` revision #{ current_revision } ` should be removed"
871
871
elsif current_version == previous_committed [ :version ] &&
872
872
!previous_committed [ :revision ] . nil? &&
873
873
current_revision < previous_committed [ :revision ]
874
- problem "revision should not decrease (from #{ previous_committed [ :revision ] } to #{ current_revision } )"
874
+ problem "` revision` should not decrease (from #{ previous_committed [ :revision ] } to #{ current_revision } )"
875
875
elsif newest_committed [ :revision ] &&
876
876
current_revision > ( newest_committed [ :revision ] + 1 )
877
- problem "revisions should only increment by 1"
877
+ problem "`revision` should only increment by 1"
878
878
end
879
879
end
880
880
@@ -891,10 +891,10 @@ def audit_version_scheme
891
891
return if previous_committed [ :version_scheme ] . nil?
892
892
893
893
if current_version_scheme < previous_committed [ :version_scheme ]
894
- problem "version_scheme should not decrease (from #{ previous_committed [ :version_scheme ] } " \
894
+ problem "` version_scheme` should not decrease (from #{ previous_committed [ :version_scheme ] } " \
895
895
"to #{ current_version_scheme } )"
896
896
elsif current_version_scheme > ( previous_committed [ :version_scheme ] + 1 )
897
- problem "version_schemes should only increment by 1"
897
+ problem "`version_scheme` should only increment by 1"
898
898
end
899
899
end
900
900
@@ -935,7 +935,7 @@ def audit_text
935
935
bin_names . each do |name |
936
936
shell_commands . each do |cmd |
937
937
if text . to_s . match? ( /test do.*#{ cmd } [(\s ]+['"]#{ Regexp . escape ( name ) } [\s '"]/m )
938
- problem %Q(fully scope test #{ cmd } calls, e.g. #{ cmd } "\# {bin}/#{ name } ")
938
+ problem %Q(Fully scope test ` #{ cmd } ` calls, e.g.: #{ cmd } "\# {bin}/#{ name } ")
939
939
end
940
940
end
941
941
end
0 commit comments