Skip to content

Fix custom functions in folders not detected by Explode XML and trace.py#36

Open
kirkabowman wants to merge 2 commits into
petrowsky:mainfrom
kirkabowman:fix/custom-functions-in-folders
Open

Fix custom functions in folders not detected by Explode XML and trace.py#36
kirkabowman wants to merge 2 commits into
petrowsky:mainfrom
kirkabowman:fix/custom-functions-in-folders

Conversation

@kirkabowman
Copy link
Copy Markdown

Summary

Two related fixes for custom functions stored inside folder groups in FileMaker, which were being missed by the analysis tooling.

  • analyze.py: switched glob()rglob() so folder-nested CFs are discovered; filter out folder separator pseudo-files via stub XML existence check; added folder_path to CF data and index loader.
  • fmcontext.sh: fixed sanitized body path lookup to be subfolder-relative (the flat lookup silently missed nested CFs and misclassified all of them as functional). Added FolderPath as a 7th column to custom_functions.index. Replaced mapfile with a while-read loop for bash 3.2 compatibility on macOS.
  • trace.py: build_cf_names uses rglob instead of iterdir so CFs nested in folder-group subdirectories are discovered. parse_scripts extends the bracket guard to include lines with ] so zero-argument CF calls on expression-continuation lines aren't skipped.

Test plan

  • Run fmcontext.sh against a solution containing custom functions inside folder groups; confirm custom_functions.index lists them with correct FolderPath
  • Run Explode XML / analyze.py on the same solution and confirm folder-nested CFs appear in output
  • Run trace.py against a script that calls a zero-argument CF on a continuation line; confirm the reference is detected
  • Confirm fmcontext.sh still runs on macOS default bash 3.2

🤖 Generated with Claude Code

Kirk Bowman added 2 commits April 24, 2026 16:54
- analyze.py: change glob() to rglob() so folder-nested CFs are found;
  filter out folder separator pseudo-files via stub XML existence check;
  add folder_path to CF data and index loader
- fmcontext.sh: fix sanitized body path lookup to be subfolder-relative
  (flat lookup silently missed nested CFs, misclassifying all as functional);
  add FolderPath as 7th column to custom_functions.index header and output;
  replace mapfile with while-read loop for bash 3.2 compatibility on macOS
- build_cf_names: use rglob instead of iterdir so custom functions
  nested inside folder-group subdirectories are discovered
- parse_scripts: extend bracket guard to include lines with ']' so
  zero-argument CF calls on expression-continuation lines are not skipped

Made-with: Cursor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant