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
If a module has more than one reference to the same data document, and there is no corresponding import, the largest common path should be suggested as a new import.
E.g., in the policy:
package example
p := data.a.b.c
q {
data.a.b.d ==2
}
two "naked" references to the data.a.b document are made. The preferred style should be to import this reference:
package example
import data.a.b
p := b.c
q {
b.d ==2
}
Note: direct imports of a rule or function is likely not preferred, as some sort of grouping/namespacing might be implied, so even if several references are made to the same rule/function, it's parent document should be imported, e.g. for the policy:
package example
p := data.a.b.c
q {
data.a.b.c ==2
}
an import for the data.a.b document should be suggested, not data.a.b.c.
The text was updated successfully, but these errors were encountered:
💭 Rule of three, maybe? I mean propose it if there are at least three references that share a prefix (which is not a plain data, of course) Or maybe that's a desirable configurable.
If a module has more than one reference to the same
data
document, and there is no corresponding import, the largest common path should be suggested as a new import.E.g., in the policy:
two "naked" references to the
data.a.b
document are made. The preferred style should be to import this reference:Note: direct imports of a rule or function is likely not preferred, as some sort of grouping/namespacing might be implied, so even if several references are made to the same rule/function, it's parent document should be imported, e.g. for the policy:
an import for the
data.a.b
document should be suggested, notdata.a.b.c
.The text was updated successfully, but these errors were encountered: