Description
When looking through the user settings source code, I noticed that the get_parameters_from_file
uses calc_preferences_filepath
directly:
lua-scripts/src/library/configuration.lua
Lines 268 to 270 in c042930
Yet calc_preferences_filepath
returns a tuple:
lua-scripts/src/library/configuration.lua
Lines 205 to 222 in c042930
This seems to be working fine on macOS, but it seems like a strong code smell. Is this working on Windows?
Either way, I'd suggest rewriting it to destructure the tuple first, then only use the first value. While this seems to be acceptable Lua code, this would not be acceptable code in many other languages and could confuse many other people (including me at first).