@@ -25,27 +25,28 @@ def initialize(formula)
25
25
def clean
26
26
ObserverPathnameExtension . reset_counts!
27
27
28
- # Many formulae include ' lib/charset.alias' , but it is not strictly needed
29
- # and will conflict if more than one formula provides it
28
+ # Many formulae include ` lib/charset.alias` , but it is not strictly needed
29
+ # and will conflict if more than one formula provides it.
30
30
observe_file_removal @formula . lib /"charset.alias"
31
31
32
32
[ @formula . bin , @formula . sbin , @formula . lib ] . each { |dir | clean_dir ( dir ) if dir . exist? }
33
33
34
- # Get rid of any info ' dir' files, so they don't conflict at the link stage
34
+ # Get rid of any info ` dir` files, so they don't conflict at the link stage.
35
35
#
36
- # The ' dir' files come in at least 3 locations:
36
+ # The ` dir` files come in at least 3 locations:
37
37
#
38
- # 1. ' info/dir'
39
- # 2. ' info/#{name}/dir'
40
- # 3. ' info/#{arch}/dir'
38
+ # 1. ` info/dir`
39
+ # 2. ` info/#{name}/dir`
40
+ # 3. ` info/#{arch}/dir`
41
41
#
42
- # Of these 3 only ' info/#{name}/dir' is safe to keep since the rest will
42
+ # Of these 3 only ` info/#{name}/dir` is safe to keep since the rest will
43
43
# conflict with other formulae because they use a shared location.
44
44
#
45
- # See [cleaner: recursively delete info `dir`s by gromgit · Pull Request
46
- # #11597][1], [emacs 28.1 bottle does not contain `dir` file · Issue
47
- # #100190][2], and [Keep `info/#{f.name}/dir` files in cleaner by
48
- # timvisher][3] for more info.
45
+ # See
46
+ # [cleaner: recursively delete info `dir`s][1],
47
+ # [emacs 28.1 bottle does not contain `dir` file][2] and
48
+ # [Keep `info/#{f.name}/dir` files in cleaner][3]
49
+ # for more info.
49
50
#
50
51
# [1]: https://github.com/Homebrew/brew/pull/11597
51
52
# [2]: https://github.com/Homebrew/homebrew-core/issues/100190
@@ -114,15 +115,15 @@ def executable_path?(path)
114
115
# created as part of installing any Perl module.
115
116
PERL_BASENAMES = Set . new ( %w[ perllocal.pod .packlist ] ) . freeze
116
117
117
- # Clean a top-level (bin, sbin, lib) directory, recursively, by fixing file
118
+ # Clean a top-level (` bin`, ` sbin`, ` lib` ) directory, recursively, by fixing file
118
119
# permissions and removing .la files, unless the files (or parent
119
120
# directories) are protected by skip_clean.
120
121
#
121
- # bin and sbin should not have any subdirectories; if either do that is
122
- # caught as an audit warning
122
+ # ` bin` and ` sbin` should not have any subdirectories; if either do that is
123
+ # caught as an audit warning.
123
124
#
124
- # lib may have a large directory tree (see Erlang for instance), and
125
- # clean_dir applies cleaning rules to the entire tree
125
+ # ` lib` may have a large directory tree (see Erlang for instance) and
126
+ # clean_dir applies cleaning rules to the entire tree.
126
127
sig { params ( directory : Pathname ) . void }
127
128
def clean_dir ( directory )
128
129
directory . find do |path |
@@ -137,7 +138,7 @@ def clean_dir(directory)
137
138
elsif path . symlink?
138
139
# Skip it.
139
140
else
140
- # Set permissions for executables and non-executables
141
+ # Set permissions for executables and non-executables.
141
142
perms = if executable_path? ( path )
142
143
0555
143
144
else
0 commit comments