1"use strict";(self.webpackChunkopa_website=self.webpackChunkopa_website||[]).push([[432],{28453:(e,n,r)=>{r.d(n,{R:()=>i,x:()=>s});var t=r(96540);const o={},a=t.createContext(o);function i(e){const n=t.useContext(a);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function s(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:i(e.components),t.createElement(a.Provider,{value:n},e.children)}},96851:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>d,contentTitle:()=>s,default:()=>u,frontMatter:()=>i,metadata:()=>t,toc:()=>l});const t=JSON.parse('{"id":"rules/imports/redundant-data-import","title":"redundant-data-import","description":"Summary: Redundant import of data","source":"@site/projects/regal/rules/imports/redundant-data-import.md","sourceDirName":"rules/imports","slug":"/rules/imports/redundant-data-import","permalink":"/projects/regal/rules/imports/redundant-data-import","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"autoSidebar","previous":{"title":"redundant-alias","permalink":"/projects/regal/rules/imports/redundant-alias"},"next":{"title":"unresolved-import","permalink":"/projects/regal/rules/imports/unresolved-import"}}');var o=r(74848),a=r(28453);const i={},s="redundant-data-import",d={},l=[{value:"Rationale",id:"rationale",level:2},{value:"Configuration Options",id:"configuration-options",level:2},{value:"Related Resources",id:"related-resources",level:2}];function c(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,a.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.header,{children:(0,o.jsx)(n.h1,{id:"redundant-data-import",children:"redundant-data-import"})}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Summary"}),": Redundant import of data"]}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Category"}),": Imports"]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.strong,{children:"Avoid"})}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-rego",children:"package policy\n\nimport data\n"})}),"\n",(0,o.jsx)(n.h2,{id:"rationale",children:"Rationale"}),"\n",(0,o.jsxs)(n.p,{children:["Just like ",(0,o.jsx)(n.code,{children:"input"}),", ",(0,o.jsx)(n.code,{children:"data"})," is always globally available and does not need to be imported."]}),"\n",(0,o.jsx)(n.h2,{id:"configuration-options",children:"Configuration Options"}),"\n",(0,o.jsx)(n.p,{children:"This linter rule provides the following configuration options:"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-yaml",children:'rules:\n imports:\n redundant-data-import:\n # one of "error", "warning", "ignore"\n level: error\n'})}),"\n",(0,o.jsx)(n.h2,{id:"related-resources",children:"Related Resources"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:["GitHub: ",(0,o.jsx)(n.a,{href:"https://github.com/open-policy-agent/regal/blob/main/bundle/regal/rules/imports/redundant-data-import/redundant_data_import.rego",children:"Source Code"})]}),"\n"]})]})}function u(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(c,{...e})}):c(e)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.