From a3cf0a0313919e5630468addd07c0c8e4ca9a41e Mon Sep 17 00:00:00 2001 From: Rafferty McDonald Date: Fri, 9 Aug 2024 09:53:11 -0700 Subject: [PATCH] Comment by Rafferty McDonald on better-config-sections --- _data/comments/better-config-sections/2fc5d1da.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 _data/comments/better-config-sections/2fc5d1da.yml diff --git a/_data/comments/better-config-sections/2fc5d1da.yml b/_data/comments/better-config-sections/2fc5d1da.yml new file mode 100644 index 000000000..dc6c48167 --- /dev/null +++ b/_data/comments/better-config-sections/2fc5d1da.yml @@ -0,0 +1,10 @@ +id: 2fc5d1da +date: 2024-08-09T16:53:10.2932347Z +name: Rafferty McDonald +avatar: https://github.com/RMcD.png +message: >- + I've used a similar pattern on my options objects in the past by creating a unit test that uses conventions and reflection to validate all of the options classes/records have a static field for Configuration name with a non-null value. CI then fails it someone adds an options object without one. The configuration section name is used in builder extensions to have each option class identify the section with which it binds. + + + + I like this as an option (haha) though. I'll have to give it a spin.