BHoM / Test_Toolkit

GNU Lesser General Public License v3.0
0 stars 0 forks source link

Compliance checks for UIExposure usage #440

Closed FraserGreenroyd closed 1 year ago

FraserGreenroyd commented 1 year ago

In line with https://github.com/BHoM/BHoM/pull/1506, https://github.com/BHoM/BHoM_Engine/pull/3052, and https://github.com/BHoM/BHoM_UI/pull/456, we want compliance checks to ensure the following for the use of UIExposure.

Where the UIExposure is set to Hidden, then a default value for the input parameter must also be provided.

IsakNaslundBh commented 1 year ago

As discussed offline, good to add a check that the hidden attribute(s) preferably are on the last parameter. Argument being that things hidden from the UI should generally be an exception, and targeting parameters of less significance, and hence generally are best put as last argument.

This should imo not be a failure, but a warning, though, as there can be cases where this does not make sense, and require greater flexibility, but good as a warning to nudge.