1"use strict";(globalThis.webpackChunk=globalThis.webpackChunk||[]).push([[6128],{248(e,t,i){i.r(t),i.d(t,{assets:()=>a,contentTitle:()=>c,default:()=>d,frontMatter:()=>o,metadata:()=>n,toc:()=>l});const n=JSON.parse('{"id":"checker-inefficient-keyset-iterator","title":"Inefficient keySet Iterator","description":"Check for inefficient uses of iterators that iterate on keys then lookup their values, instead of iterating on key-value pairs directly.","source":"@site/versioned_docs/version-1.3.0/checker-inefficient-keyset-iterator.md","sourceDirName":".","slug":"/checker-inefficient-keyset-iterator","permalink":"/docs/checker-inefficient-keyset-iterator","draft":false,"unlisted":false,"tags":[],"version":"1.3.0","frontMatter":{"title":"Inefficient keySet Iterator","description":"Check for inefficient uses of iterators that iterate on keys then lookup their values, instead of iterating on key-value pairs directly."},"sidebar":"docs","previous":{"title":"Impurity","permalink":"/docs/checker-impurity"},"next":{"title":"Lineage","permalink":"/docs/checker-lineage"}}');var s=i(4848),r=i(8453);const o={title:"Inefficient keySet Iterator",description:"Check for inefficient uses of iterators that iterate on keys then lookup their values, instead of iterating on key-value pairs directly."},c=void 0,a={},l=[{value:"List of Issue Types",id:"list-of-issue-types",level:2}];function f(e){const t={a:"a",code:"code",h2:"h2",li:"li",p:"p",ul:"ul",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.p,{children:"Check for inefficient uses of iterators that iterate on keys then lookup their values, instead of iterating on key-value pairs directly."}),"\n",(0,s.jsxs)(t.p,{children:["Activate with ",(0,s.jsx)(t.code,{children:"--inefficient-keyset-iterator"}),"."]}),"\n",(0,s.jsx)(t.p,{children:"Supported languages:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:"C/C++/ObjC: No"}),"\n",(0,s.jsx)(t.li,{children:"C#/.Net: No"}),"\n",(0,s.jsx)(t.li,{children:"Erlang: No"}),"\n",(0,s.jsx)(t.li,{children:"Hack: No"}),"\n",(0,s.jsx)(t.li,{children:"Java: Yes"}),"\n",(0,s.jsx)(t.li,{children:"Python: No"}),"\n",(0,s.jsx)(t.li,{children:"Rust: No"}),"\n",(0,s.jsx)(t.li,{children:"Swift: No"}),"\n"]}),"\n",(0,s.jsx)(t.h2,{id:"list-of-issue-types",children:"List of Issue Types"}),"\n",(0,s.jsx)(t.p,{children:"The following issue types are reported by this checker:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.a,{href:"/docs/all-issue-types#inefficient_keyset_iterator",children:"INEFFICIENT_KEYSET_ITERATOR"})}),"\n"]})]})}function d(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(f,{...e})}):f(e)}},8453(e,t,i){i.d(t,{R:()=>o,x:()=>c});var n=i(6540);const s={},r=n.createContext(s);function o(e){const t=n.useContext(r);return n.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),n.createElement(r.Provider,{value:t},e.children)}}}]);
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.