You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* restore tests from #5
* update validator to support private_constants setting
* add private_constants property
With this change, the `enforce_privacy` setting will support only four
values: true, false, 'strict', and nil. The array of private constant
names can now only be specified via a new setting
called `private_constants`. If `enforce_privacy` is set to false or
nil, these private constants are ignored by the checker. If
`private_constants` is not specified or is an empty list, all
constants in the package are assumed to be private unless
they are defined in the public directory.
* bump minor version
Copy file name to clipboardExpand all lines: README.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -56,6 +56,9 @@ Example:
56
56
public_path: my/custom/path/
57
57
```
58
58
59
+
### Using specific private constants
60
+
Sometimes it is desirable to only enforce privacy on a subset of constants in a package. You can do so by defining a `private_constants` list in your package.yml. Note that `enforce_privacy` must be set to `true` or `'strict'` for this to work.
61
+
59
62
### Package Privacy violation
60
63
A constant that is private to its package has been referenced from outside of the package. Constants are declared private in their package’s `package.yml`.
0 commit comments