Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions gitgalaxy/core/detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -1935,6 +1935,24 @@ def _function_slice(
# span exactly from its own keyword to the next
# RUN/CMD/ENTRYPOINT/HEALTHCHECK match, or EOF.
"dockerfile",
# #1975: jcl has no ScopeParsingRegistry entry and no
# brace-delimited bodies at all (JCL is fixed-column
# mainframe syntax), so it was silently falling through to
# Mode_B_Braces below -- which only "succeeds" when a `{`
# happens to appear by coincidence. This dropped 100% of
# real matches (0 of 3 raw matches reached the named list).
# Mode A's "greedy to the next func_start match" body
# heuristic is a correct, direct fit.
"jcl",
# #1975: m4 has no ScopeParsingRegistry entry and no
# brace-delimited bodies at all (macro definitions are
# parenthesis-delimited with backtick/bracket quoting), so
# it was silently falling through to Mode_B_Braces below --
# which only "succeeds" when a `{` happens to appear by
# coincidence. This dropped ~97.4% of real matches (1 of 39
# raw matches reached the named list). Mode A's "greedy to
# the next func_start match" body heuristic is a correct fit.
"m4",
) or family in ("column_sensitive"):
mode_name = "Mode_A_Labels"
sats, impact = self._slice_by_labels(code, rules, offset, spatial_map)
Expand Down
Loading
Loading