generated.rb (linguist-7.23.0) | : | generated.rb (linguist-7.24.0) | ||
---|---|---|---|---|
skipping to change at line 67 | skipping to change at line 67 | |||
carthage_build? || | carthage_build? || | |||
generated_graphql_relay? || | generated_graphql_relay? || | |||
generated_net_designer_file? || | generated_net_designer_file? || | |||
generated_net_specflow_feature_file? || | generated_net_specflow_feature_file? || | |||
composer_lock? || | composer_lock? || | |||
cargo_lock? || | cargo_lock? || | |||
node_modules? || | node_modules? || | |||
go_vendor? || | go_vendor? || | |||
go_lock? || | go_lock? || | |||
poetry_lock? || | poetry_lock? || | |||
pdm_lock? || | ||||
esy_lock? || | esy_lock? || | |||
npm_shrinkwrap_or_package_lock? || | npm_shrinkwrap_or_package_lock? || | |||
terraform_lock? || | terraform_lock? || | |||
generated_yarn_plugnplay? || | generated_yarn_plugnplay? || | |||
godeps? || | godeps? || | |||
generated_by_zephir? || | generated_by_zephir? || | |||
minified_files? || | minified_files? || | |||
has_source_map? || | has_source_map? || | |||
source_map? || | source_map? || | |||
compiled_coffeescript? || | compiled_coffeescript? || | |||
skipping to change at line 106 | skipping to change at line 107 | |||
generated_html? || | generated_html? || | |||
generated_jison? || | generated_jison? || | |||
generated_grpc_cpp? || | generated_grpc_cpp? || | |||
generated_dart? || | generated_dart? || | |||
generated_perl_ppport_header? || | generated_perl_ppport_header? || | |||
generated_gamemakerstudio? || | generated_gamemakerstudio? || | |||
generated_gimp? || | generated_gimp? || | |||
generated_visualstudio6? || | generated_visualstudio6? || | |||
generated_haxe? || | generated_haxe? || | |||
generated_jooq? || | generated_jooq? || | |||
generated_pascal_tlb? | generated_pascal_tlb? || | |||
generated_sorbet_rbi? | ||||
end | end | |||
# Internal: Is the blob an Xcode file? | # Internal: Is the blob an Xcode file? | |||
# | # | |||
# Generated if the file extension is an Xcode | # Generated if the file extension is an Xcode | |||
# file extension. | # file extension. | |||
# | # | |||
# Returns true or false. | # Returns true or false. | |||
def xcode_file? | def xcode_file? | |||
['.nib', '.xcworkspacedata', '.xcuserstate'].include?(extname) | ['.nib', '.xcworkspacedata', '.xcuserstate'].include?(extname) | |||
skipping to change at line 410 | skipping to change at line 412 | |||
!!name.match(/(Gopkg|glide)\.lock/) | !!name.match(/(Gopkg|glide)\.lock/) | |||
end | end | |||
# Internal: Is the blob a generated poetry.lock? | # Internal: Is the blob a generated poetry.lock? | |||
# | # | |||
# Returns true or false. | # Returns true or false. | |||
def poetry_lock? | def poetry_lock? | |||
!!name.match(/poetry\.lock/) | !!name.match(/poetry\.lock/) | |||
end | end | |||
# Internal: Is the blob a generated pdm.lock? | ||||
# | ||||
# Returns true or false. | ||||
def pdm_lock? | ||||
!!name.match(/pdm\.lock/) | ||||
end | ||||
# Internal: Is the blob a generated esy lock file? | # Internal: Is the blob a generated esy lock file? | |||
# | # | |||
# Returns true or false. | # Returns true or false. | |||
def esy_lock? | def esy_lock? | |||
!!name.match(/(^|\/)(\w+\.)?esy.lock$/) | !!name.match(/(^|\/)(\w+\.)?esy.lock$/) | |||
end | end | |||
# Internal: Is the blob a generated npm shrinkwrap or package lock file? | # Internal: Is the blob a generated npm shrinkwrap or package lock file? | |||
# | # | |||
# Returns true or false. | # Returns true or false. | |||
skipping to change at line 763 | skipping to change at line 772 | |||
# Internal: Is this a generated Delphi Interface file for a type library? | # Internal: Is this a generated Delphi Interface file for a type library? | |||
# | # | |||
# Delphi Type Library Import tool generates *_TLB.pas files based on .ridl f iles. | # Delphi Type Library Import tool generates *_TLB.pas files based on .ridl f iles. | |||
# They are not meant to be altered by humans. | # They are not meant to be altered by humans. | |||
# | # | |||
# Returns true or false | # Returns true or false | |||
def generated_pascal_tlb? | def generated_pascal_tlb? | |||
!!name.match(/_tlb\.pas$/i) | !!name.match(/_tlb\.pas$/i) | |||
end | end | |||
# Internal: Is this a Sorbet RBI file generated by Tapioca? | ||||
# | ||||
# Tapioca generates non-human-editable .rbi files in several different | ||||
# ways: | ||||
# | ||||
# 1. `tapioca gem` uses reflection to generate generic .rbi for gems. | ||||
# 2. `tapioca dsl` uses DSL compilers to generate .rbi for modules/classes. | ||||
# 3. `tapioca annotations` pulls .rbi from remote sources. | ||||
# | ||||
# All are marked with similar wording. | ||||
# | ||||
# Returns true or false | ||||
def generated_sorbet_rbi? | ||||
return false unless extname.downcase == '.rbi' | ||||
return false unless lines.count >= 5 | ||||
lines[0].match?(/^# typed:/) && | ||||
lines[2].include?("DO NOT EDIT MANUALLY") && | ||||
lines[4].match?(/^# Please.*run.*`.*tapioca/) | ||||
end | ||||
# Internal: Extract a Hash of name/content pairs from an HTML <meta> tag | # Internal: Extract a Hash of name/content pairs from an HTML <meta> tag | |||
def extract_html_meta(match) | def extract_html_meta(match) | |||
(match.last.sub(/\/\Z/, "").strip.scan(/ | (match.last.sub(/\/\Z/, "").strip.scan(/ | |||
(?<=^|\s) # Check for preceding whitespace | (?<=^|\s) # Check for preceding whitespace | |||
(name|content|value) # Attribute names we're interested in | (name|content|value) # Attribute names we're interested in | |||
\s* = \s* # Key-value separator | \s* = \s* # Key-value separator | |||
# Attribute value | # Attribute value | |||
( "[^"]+" # name="value" | ( "[^"]+" # name="value" | |||
| '[^']+' # name='value' | | '[^']+' # name='value' | |||
End of changes. 4 change blocks. | ||||
1 lines changed or deleted | 30 lines changed or added |