NIFU-NO / saros

Semi-Automatic Reporting of Ordinary Surveys
https://nifu-no.github.io/saros/
Other
2 stars 0 forks source link

Add testing for unused arguments #302

Open henrikkarlstrom opened 1 month ago

henrikkarlstrom commented 1 month ago

Currently, functions using dynamic dots let misspelled or misplaced arguments fall through silently.

Minimal example:

saros::embed_cat_prop_plot(data, dta_label = "percentage_bare")

This wrongly displays the values in the plot, but because the argument "dta_label" (which should be "data_label") is passed to the dynamic dots only to disappear, the user is not made aware of what is failing.

This can be fixed by checking if there are unused arguments in any of the functions that are passed dynamic dot arguments.