From a64dd874551f4a670f4a49552ce7aecd6d25bcda Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Sun, 7 Nov 2021 14:52:17 -0700 Subject: style guide: prefer to switch user than to update ownership Signed-off-by: Sean Whitton --- CONTRIBUTING.rst | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'CONTRIBUTING.rst') diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 160f86c..f9a888d 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -66,6 +66,13 @@ Code style - Choose judiciously between a functional programming style and LOOP. Err on the side of LOOP. +- Avoid complicating property definitions to include updates to file + ownership, and the like, when it's possible instead to switch to the target + user and apply a simpler version of the property. For example, instead of + taking a username as a parameter and then changing the ownership of any + newly created files to the named user, you can use the ``AS`` combinator to + apply the property as that user in the first place. + Signing off your commits ======================== -- cgit v1.2.3