{"record":{"id":"5152877b85837c8c","repo":"puppetlabs/puppet","slug":"property-with-key-key-outside-of-a-section","errorCode":null,"errorMessage":"Property with key %{key} outside of a section","messagePattern":"Property with key %(.+?) outside of a section","errorType":"validation","errorClass":"IniParseError","httpStatus":null,"severity":"error","filePath":"lib/puppet/util/inifile.rb","lineNumber":187,"sourceCode":"          end\n        elsif l.match(INI_CONTINUATION) && section && optname\n          # continuation line\n          section[optname] += \"\\n#{l.chomp}\"\n        elsif (match = l.match(INI_SECTION_NAME))\n          # section heading\n          section.mark_clean if section\n\n          section_name = match[1]\n\n          section = add_section(section_name)\n          optname = nil\n        elsif (match = l.match(INI_PROPERTY))\n          # the regex strips leading white space from the value, and here we strip the trailing white space as well\n          key = match[1]\n          val = match[2].rstrip\n\n          if section.nil?\n            raise IniParseError, _(\"Property with key %{key} outside of a section\") % { key: key.inspect }\n          end\n\n          section[key] = val\n          optname = key\n        else\n          raise IniParseError.new(_(\"Can't parse line '%{line}'\") % { line: l.chomp }, @file, line_num)\n        end\n      end\n      section.mark_clean unless section.nil?\n    end\n\n    # @return [Array<Puppet::Util::IniConfig::Section>] All sections defined in\n    #   this file.\n    def sections\n      @contents.select { |entry| entry.is_a? Section }\n    end\n\n    # @return [Puppet::Util::IniConfig::Section, nil] The section with the","sourceCodeStart":169,"sourceCodeEnd":205,"githubUrl":"https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/util/inifile.rb#L169-L205","documentation":"Error \"Property with key %{key} outside of a section\" thrown in puppetlabs/puppet.","triggerScenarios":"Thrown at lib/puppet/util/inifile.rb:187 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e227c27540975c25aa22d533a52424a9d2fc886a","analyzedAt":"2026-08-21T20:49:46.650Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}