From 74fe9d236a03dc09c62840d1448875431de1e530 Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Tue, 10 Nov 2015 09:50:27 -0800 Subject: [PATCH] Add a disabled test for accessing private attributes of other objects Need to cleanup the code before we can enable this test. --- test/code-smell/inappropriately-private.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 test/code-smell/inappropriately-private.sh diff --git a/test/code-smell/inappropriately-private.sh b/test/code-smell/inappropriately-private.sh new file mode 100755 index 0000000000..a50949632f --- /dev/null +++ b/test/code-smell/inappropriately-private.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +# +# Test that we do not access private attributes of other objects. +# +# * private attributes of ourself are okay: self._private. +# * Private attributes of other objects are not: self.other._private +# + +# Currently the code has many places where we're violating this test so we need +# to clean up the code before we can enable this. Maybe we'll need to +# selectively blacklist modules so that we can work on this a piece at a time. +# +# Also need to implement whitelist for certain things like bundled libraries +# that violate this. +# +# 23-10-2015: Count was 508 lines +grep -Pri '(?