Private access
Author: LGTM
import python
predicate is_private(Attribute a) {
a.getName().matches('\\_%') and
not a.getName().matches('\\_\\_%\\_\\_')
}
from Attribute access
where
is_private(access) and
not access.getObject().(Name).getId() = 'self'
select access
Description
Find accesses to 'private' attributes (those starting with an underscore)