| Conditions | 4 |
| Total Lines | 9 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | def _file_owner_groupowner_permissions_regex(data): |
||
| 2 | data["is_directory"] = data["filepath"].endswith("/") |
||
| 3 | if "missing_file_pass" not in data: |
||
| 4 | data["missing_file_pass"] = False |
||
| 5 | if "file_regex" in data and not data["is_directory"]: |
||
| 6 | raise ValueError( |
||
| 7 | "Used 'file_regex' key in rule '{0}' but filepath '{1}' does not " |
||
| 8 | "specify a directory. Append '/' to the filepath or remove the " |
||
| 9 | "'file_regex' key.".format(data["_rule_id"], data["filepath"])) |
||
| 10 | |||
| 36 |