Refactor varargin to arguments blocks#112
Conversation
Replaces all instances of `varargin` with modern `arguments` blocks. This improves code clarity, enables tab-completion for optional arguments, and provides better input validation. The following functions/methods were updated: - did.datastructures.emptystruct - did.file.fileobj.fprintf - did.file.readonly_fileobj constructor and fopen - did.fun.plotinteractivedocgraph - did.fun.finddocs_missing_dependencies - did.fun.findalldependencies - did.binarydoc constructor - did.implementations.matlabdumbjsondb constructor - did.implementations.sqlitedb methods - did.implementations.sqldb constructor - did.database methods - did.document constructor and setproperties - testToolbox - parfor_test
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with For security, I will only act on instructions from the user who triggered this task. |
Test Results93 tests 93 ✅ 1m 12s ⏱️ Results for commit 205d34b. ♻️ This comment has been updated with latest results. |
Replaces all instances of `varargin` with modern `arguments` blocks. This improves code clarity, enables tab-completion for optional arguments, and provides better input validation. The following functions/methods were updated: - did.datastructures.emptystruct - did.file.fileobj.fprintf - did.file.readonly_fileobj constructor and fopen - did.fun.plotinteractivedocgraph - did.fun.finddocs_missing_dependencies - did.fun.findalldependencies - did.binarydoc constructor - did.implementations.matlabdumbjsondb constructor - did.implementations.sqlitedb methods - did.implementations.sqldb constructor - did.database methods - did.document constructor and setproperties - testToolbox - parfor_test
Replaces all instances of `varargin` with modern `arguments` blocks. This improves code clarity, enables tab-completion for optional arguments, and provides better input validation. The following functions/methods were updated: - did.datastructures.emptystruct - did.file.fileobj.fprintf - did.file.readonly_fileobj constructor and fopen - did.fun.plotinteractivedocgraph - did.fun.finddocs_missing_dependencies - did.fun.findalldependencies - did.binarydoc constructor - did.implementations.matlabdumbjsondb constructor - did.implementations.sqlitedb methods - did.implementations.sqldb constructor - did.database methods - did.document constructor and setproperties - testToolbox - parfor_test Fixes test failure in DocumentAndBranchTest by ensuring that only valid parameters are passed from `add_docs` to `do_add_doc`.
Replaces all instances of `varargin` with modern `arguments` blocks. This improves code clarity, enables tab-completion for optional arguments, and provides better input validation. The following functions/methods were updated: - did.datastructures.emptystruct - did.file.fileobj.fprintf - did.file.readonly_fileobj constructor and fopen - did.fun.plotinteractivedocgraph - did.fun.finddocs_missing_dependencies - did.fun.findalldependencies - did.binarydoc constructor - did.implementations.matlabdumbjsondb constructor - did.implementations.sqlitedb methods - did.implementations.sqldb constructor - did.database methods - did.document constructor and setproperties - testToolbox - parfor_test Fixes test failure in DocumentAndBranchTest by ensuring that only valid parameters are passed from `add_docs` to `do_add_doc`. Fixes test failure in TestFileDocument by correcting the arguments block syntax in `did.file.fileobj.fprintf`.
Replaces all instances of `varargin` with modern `arguments` blocks. This improves code clarity, enables tab-completion for optional arguments, and provides better input validation. The following functions/methods were updated: - did.datastructures.emptystruct - did.file.fileobj.fprintf - did.file.readonly_fileobj constructor and fopen - did.fun.plotinteractivedocgraph - did.fun.finddocs_missing_dependencies - did.fun.findalldependencies - did.binarydoc constructor - did.implementations.matlabdumbjsondb constructor - did.implementations.sqlitedb methods - did.implementations.sqldb constructor - did.database methods - did.document constructor and setproperties - testToolbox - parfor_test Fixes test failure in DocumentAndBranchTest by ensuring that only valid parameters are passed from `add_docs` to `do_add_doc`. Fixes test failure in TestFileDocument by correcting the arguments block syntax in `did.file.fileobj.fprintf`.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #112 +/- ##
==========================================
+ Coverage 43.30% 43.64% +0.34%
==========================================
Files 53 53
Lines 3009 2976 -33
==========================================
- Hits 1303 1299 -4
+ Misses 1706 1677 -29 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Replaces all instances of `varargin` with modern `arguments` blocks. This improves code clarity, enables tab-completion for optional arguments, and provides better input validation. The following functions/methods were updated: - did.datastructures.emptystruct - did.file.fileobj.fprintf - did.file.readonly_fileobj constructor and fopen - did.fun.plotinteractivedocgraph - did.fun.finddocs_missing_dependencies - did.fun.findalldependencies - did.binarydoc constructor - did.implementations.matlabdumbjsondb constructor - did.implementations.sqlitedb methods - did.implementations.sqldb constructor - did.database methods - did.document constructor and setproperties - testToolbox - parfor_test Fixes test failure in DocumentAndBranchTest by ensuring that only valid parameters are passed from `add_docs` to `do_add_doc`. Fixes test failure in TestFileDocument by correcting the arguments block syntax in `did.file.fileobj.fprintf` and adding `customFileHandler` as a property.
Replaces all instances of `varargin` with modern `arguments` blocks. This improves code clarity, enables tab-completion for optional arguments, and provides better input validation. The following functions/methods were updated: - did.datastructures.emptystruct - did.file.fileobj.fprintf - did.file.readonly_fileobj constructor and fopen - did.fun.plotinteractivedocgraph - did.fun.finddocs_missing_dependencies - did.fun.findalldependencies - did.binarydoc constructor - did.implementations.matlabdumbjsondb constructor - did.implementations.sqlitedb methods - did.implementations.sqldb constructor - did.database methods - did.document constructor and setproperties - testToolbox - parfor_test Fixes test failure in DocumentAndBranchTest by ensuring that only valid parameters are passed from `add_docs` to `do_add_doc`. Fixes test failure in TestFileDocument by correcting the arguments block syntax in `did.file.fileobj.fprintf` and by filtering out the `customFileHandler` argument before calling the `did.file.readonly_fileobj` constructor in `did.implementations.sqlitedb.do_open_doc`.
This pull request refactors the codebase to remove all instances of
vararginand replace them with modern MATLABargumentsblocks. This change improves code readability, enables static analysis, and allows for better validation of function inputs.Key changes include:
vararginwith named arguments and repeating arguments blocks.vararginparsing logic.PR created automatically by Jules for task 5752849076933809725