Fix custom functions in folders not detected by Explode XML and trace.py#36
Open
kirkabowman wants to merge 2 commits into
Open
Fix custom functions in folders not detected by Explode XML and trace.py#36kirkabowman wants to merge 2 commits into
kirkabowman wants to merge 2 commits into
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two related fixes for custom functions stored inside folder groups in FileMaker, which were being missed by the analysis tooling.
analyze.py: switchedglob()→rglob()so folder-nested CFs are discovered; filter out folder separator pseudo-files via stub XML existence check; addedfolder_pathto 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). AddedFolderPathas a 7th column tocustom_functions.index. Replacedmapfilewith awhile-readloop for bash 3.2 compatibility on macOS.trace.py:build_cf_namesusesrglobinstead ofiterdirso CFs nested in folder-group subdirectories are discovered.parse_scriptsextends the bracket guard to include lines with]so zero-argument CF calls on expression-continuation lines aren't skipped.Test plan
fmcontext.shagainst a solution containing custom functions inside folder groups; confirmcustom_functions.indexlists them with correctFolderPathanalyze.pyon the same solution and confirm folder-nested CFs appear in outputtrace.pyagainst a script that calls a zero-argument CF on a continuation line; confirm the reference is detectedfmcontext.shstill runs on macOS default bash 3.2🤖 Generated with Claude Code