aboutsummaryrefslogtreecommitdiff
path: root/CONTRIBUTING.rst
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2021-11-07 14:52:17 -0700
committerSean Whitton <spwhitton@spwhitton.name>2021-11-08 16:23:06 -0700
commita64dd874551f4a670f4a49552ce7aecd6d25bcda (patch)
tree93d04c3cca48be93222040e1c50b818aa63f6d45 /CONTRIBUTING.rst
parent8b78f68a7bb3dc97e9797d17317d5f30ec982ce6 (diff)
downloadconsfigurator-a64dd874551f4a670f4a49552ce7aecd6d25bcda.tar.gz
style guide: prefer to switch user than to update ownership
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'CONTRIBUTING.rst')
-rw-r--r--CONTRIBUTING.rst7
1 files changed, 7 insertions, 0 deletions
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
========================