Codebase intelligence for AI and humans: code health scores, auto-generated docs, git analytics, dead code detection, and architectural decisions via MCP.
Python aicode-complexitycode-healthcode-intelligencecode-qualitydead-codedeveloper-toolsdocumentationgit-analyticsmcpopen-sourcepythonrefactoringstatic-analysistechnical-debt
{
"ruby/assertions.rb": {
"file_info": {
"path": "lang_samples/ruby/assertions.rb",
"language": "ruby",
"size_bytes": 376,
"is_test": false,
"is_config": false,
"is_api_contract": false,
"is_entry_point": false,
"is_manifest_entry": false,
"is_reachability_root": false,
"is_application_main": false
},
"symbols": [
{
"id": "lang_samples/ruby/assertions.rb::TestFoo",
"name": "TestFoo",
"qualified_name": "lang_samples.ruby.assertions.TestFoo",
"kind": "class",
"signature": "TestFoo",
"start_line": 3,
"end_line": 19,
"docstring": null,
"decorators": [],
"visibility": "public",
"is_async": false,
"complexity_estimate": 1,
"language": "ruby",
"parent_name": null,
"is_exported_symbol": false,
"is_declaration": false,
"type_parameter_count": null,
"extension_receiver": null,
"written_receiver": null,
"modifiers": [],
"alias_of": null
},
{
"id": "lang_samples/ruby/assertions.rb::TestFoo::test_many_asserts",
"name": "test_many_asserts",
"qualified_name": "lang_samples.ruby.assertions.TestFoo.test_many_asserts",
"kind": "method",
"signature": "test_many_asserts",
"start_line": 4,
"end_line": 11,
"docstring": null,
"decorators": [],
"visibility": "public",
"is_async": false,
"complexity_estimate": 1,
"language": "ruby",
"parent_name": "TestFoo",
"is_exported_symbol": false,
"is_declaration": false,
"type_parameter_count": null,
"extension_receiver": null,
"written_receiver": null,
"modifiers": [],
"alias_of": null
},
{
"id": "lang_samples/ruby/assertions.rb::TestFoo::test_few_asserts",
"name": "test_few_asserts",
"qualified_name": "lang_samples.ruby.assertions.TestFoo.test_few_asserts",
"kind": "method",
"signature": "test_few_asserts",
"start_line": 13,
"end_line": 18,
"docstring": null,
"decorators": [],
"visibility": "public",
"is_async": false,
"complexity_estimate": 1,
"language": "ruby",
"parent_name": "TestFoo",
"is_exported_symbol": false,
"is_declaration": false,
"type_parameter_count": null,
"extension_receiver": null,
"written_receiver": null,
"modifiers": [],
"alias_of": null
}
],
"imports": [
{
"raw_statement": "require \"minitest/autorun\"",
"module_path": "minitest/autorun",
"imported_names": [
"autorun"
],
"is_relative": false,
"resolved_file": null,
"bindings": [
{
"local_name": "autorun",
"exported_name": null,
"source_file": "minitest/autorun",
"is_module_alias": true,
"is_global": false,
"is_static_import": false,
"line": null,
"column": null
}
],
"is_reexport": false,
"is_module_declaration": false,
"type_only": false,
"deferred": false
}
],
"exports": [
"TestFoo"
],
"export_aliases": {},
"calls": [
{
"target_name": "assert_equal",
"receiver_name": null,
"caller_symbol_id": "lang_samples/ruby/assertions.rb::TestFoo::test_many_asserts",
"line": 6,
"argument_count": 2,
"receiver_call": null,
"scope_name": null,
"edge_type": "calls",
"supplied_props": null,
"bare_name_fallback": false,
"spawned": false,
"program_call": false,
"argument_types": null,
"argument_names": null
},
{
"target_name": "assert",
"receiver_name": null,
"caller_symbol_id": "lang_samples/ruby/assertions.rb::TestFoo::test_many_asserts",
"line": 7,
"argument_count": 1,
"receiver_call": null,
"scope_name": null,
"edge_type": "calls",
"supplied_props": null,
"bare_name_fallback": false,
"spawned": false,
"program_call": false,
"argument_types": null,
"argument_names": null
},
{
"target_name": "assert_includes",
"receiver_name": null,
"caller_symbol_id": "lang_samples/ruby/assertions.rb::TestFoo::test_many_asserts",
"line": 8,
"argument_count": 2,
"receiver_call": null,
"scope_name": null,
"edge_type": "calls",
"supplied_props": null,
"bare_name_fallback": false,
"spawned": false,
"program_call": false,
"argument_types": null,
"argument_names": null
},
{
"target_name": "assert_equal",
"receiver_name": null,
"caller_symbol_id": "lang_samples/ruby/assertions.rb::TestFoo::test_many_asserts",
"line": 9,
"argument_count": 2,
"receiver_call": null,
"scope_name": null,
"edge_type": "calls",
"supplied_props": null,
"bare_name_fallback": false,
"spawned": false,
"program_call": false,
"argument_types": null,
"argument_names": null
},
{
"target_name": "assert_operator",
"receiver_name": null,
"caller_symbol_id": "lang_samples/ruby/assertions.rb::TestFoo::test_many_asserts",
"line": 10,
"argument_count": 3,
"receiver_call": null,
"scope_name": null,
"edge_type": "calls",
"supplied_props": null,
"bare_name_fallback": false,
"spawned": false,
"program_call": false,
"argument_types": null,
"argument_names": null
},
{
"target_name": "assert_equal",
"receiver_name": null,
"caller_symbol_id": "lang_samples/ruby/assertions.rb::TestFoo::test_few_asserts",
"line": 15,
"argument_count": 2,
"receiver_call": null,
"scope_name": null,
"edge_type": "calls",
"supplied_props": null,
"bare_name_fallback": false,
"spawned": false,
"program_call": false,
"argument_types": null,
"argument_names": null
},
{
"target_name": "refute_nil",
"receiver_name": null,
"caller_symbol_id": "lang_samples/ruby/assertions.rb::TestFoo::test_few_asserts",
"line": 17,
"argument_count": 1,
"receiver_call": null,
"scope_name": null,
"edge_type": "calls",
"supplied_props": null,
"bare_name_fallback": false,
"spawned": false,
"program_call": false,
"argument_types": null,
"argument_names": null
}
],
"heritage": [
{
"child_name": "TestFoo",
"parent_name": "Test",
"kind": "extends",
"line": 3
}
],
"docstring": null,
"parse_errors": [],
"content_hash": "f1fc1488093ce806dd8e8b6a04c8e92b26d64020a26f9f7ce12b82364b20287d",
"type_refs": [],
"local_refs": [],
"registrars": [],
"references": [],
"schema_refs": [],
"grammar_missing": false
},
"ruby/classes.rb": {
"file_info": {
"path": "lang_samples/ruby/classes.rb",
"language": "ruby",
"size_bytes": 589,
"is_test": false,
"is_config": false,
"is_api_contract": false,
"is_entry_point": false,
"is_manifest_entry": false,
"is_reachability_root": false,
"is_application_main": false
},
"symbols": [
{
"id": "lang_samples/ruby/classes.rb::Cohesive",
"name": "Cohesive",
"qualified_name": "lang_samples.ruby.classes.Cohesive",
"kind": "class",
"signature": "Cohesive",
"start_line": 5,
"end_line": 17,
"docstring": "Class-metrics fixture: method counts / god-class facts work off class_kinds;\nLCOM4 deliberately sits at its \"no signal\" valve for Ruby (receiver-less\n@ivar idiom), so even the splintered class must report lcom4 == 1.",
"decorators": [],
"visibility": "public",
"is_async": false,
"complexity_estimate": 1,
"language": "ruby",
"parent_name": null,
"is_exported_symbol": false,
"is_declaration": false,
"type_parameter_count": null,
"extension_receiver": null,
"written_receiver": null,
"modifiers": [],
"alias_of": null
},
{
"id": "lang_samples/ruby/classes.rb::Cohesive::initialize",
"name": "initialize",
"qualified_name": "lang_samples.ruby.classes.Cohesive.initialize",
"kind": "method",
"signature": "initialize",
"start_line": 6,
"end_line": 8,
"docstring": null,
"decorators": [],
"visibility": "public",
"is_async": false,
"complexity_estimate": 1,
"language": "ruby",
"parent_name": "Cohesive",
"is_exported_symbol": false,
"is_declaration": false,
"type_parameter_count": null,
"extension_receiver": null,
"written_receiver": null,
"modifiers": [],
"alias_of": null
},
{
"id": "lang_samples/ruby/classes.rb::Cohesive::bump",
"name": "bump",
"qualified_name": "lang_samples.ruby.classes.Cohesive.bump",
"kind": "method",
"signature": "bump",
"start_line": 10,
"end_line": 12,
"docstring": null,
"decorators": [],
"visibility": "public",
"is_async": false,
"complexity_estimate": 1,
"language": "ruby",
"parent_name": "Cohesive",
"is_exported_symbol": false,
"is_declaration": false,
"type_parameter_count": null,
"extension_receiver": null,
"written_receiver": null,
"modifiers": [],
"alias_of": null
},
{
"id": "lang_samples/ruby/classes.rb::Cohesive::read",
"name": "read",
"qualified_name": "lang_samples.ruby.classes.Cohesive.read",
"kind": "method",
"signature": "read",
"start_line": 14,
"end_line": 16,
"docstring": null,
"decorators": [],
"visibility": "public",
"is_async": false,
"complexity_estimate": 1,
"language": "ruby",
"parent_name": "Cohesive",
"is_exported_symbol": false,
"is_declaration": false,
"type_parameter_count": null,
"extension_receiver": null,
"written_receiver": null,
"modifiers": [],
"alias_of": null
},
{
"id": "lang_samples/ruby/classes.rb::Splintered",
"name": "Splintered",
"qualified_name": "lang_samples.ruby.classes.Splintered",
"kind": "class",
"signature": "Splintered",
"start_line": 19,
"end_line": 43,
"docstring": null,
"decorators": [],
"visibility": "public",
"is_async": false,
"complexity_estimate": 1,
"language": "ruby",
"parent_name": null,
"is_exported_symbol": false,
"is_declaration": false,
"type_parameter_count": null,
"extension_receiver": null,
"written_receiver": null,
"modifiers": [],
"alias_of": null
},
{
"id": "lang_samples/ruby/classes.rb::Splintered::a",
"name": "a",
"qualified_name": "lang_samples.ruby.classes.Splintered.a",
"kind": "method",
"signature": "a",
"start_line": 20,
"end_line": 22,
"docstring": null,
"decorators": [],
"visibility": "public",
"is_async": false,
"complexity_estimate": 1,
"language": "ruby",
"parent_name": "Splintered",
"is_exported_symbol": false,
"is_declaration": false,
"type_parameter_count": null,
"extension_receiver": null,
"written_receiver": null,
"modifiers": [],
"alias_of": null
},
{
"id": "lang_samples/ruby/classes.rb::Splintered::b",
"name": "b",
"qualified_name": "lang_samples.ruby.classes.Splintered.b",
"kind": "method",
"signature": "b",
"start_line": 24,
"end_line": 26,
"docstring": null,
"decorators": [],
"visibility": "public",
"is_async": false,
"complexity_estimate": 1,
"language": "ruby",
"parent_name": "Splintered",
"is_exported_symbol": false,
"is_declaration": false,
"type_parameter_count": null,
"extension_receiver": null,
"written_receiver": null,
"modifiers": [],
"alias_of": null
},
{
"id": "lang_samples/ruby/classes.rb::Splintered::c",
"name": "c",
"qualified_name": "lang_samples.ruby.classes.Splintered.c",
"kind": "method",
"signature": "c",
"start_line": 28,
"end_line": 30,
"docstring": null,
"decorators": [],
"visibility": "public",
"is_async": false,
"complexity_estimate": 1,
"language": "ruby",
"parent_name": "Splintered",
"is_exported_symbol": false,
"is_declaration": false,
"type_parameter_count": null,
"extension_receiver": null,
"written_receiver": null,
"modifiers": [],
"alias_of": null
},
{
"id": "lang_samples/ruby/classes.rb::Splintered::d",
"name": "d",
"qualified_name": "lang_samples.ruby.classes.Splintered.d",
"kind": "method",
"signature": "d",
"start_line": 32,
"end_line": 34,
"docstring": null,
"decorators": [],
"visibility": "public",
"is_async": false,
"complexity_estimate": 1,
"language": "ruby",
"parent_name": "Splintered",
"is_exported_symbol": false,
"is_declaration": false,
"type_parameter_count": null,
"extension_receiver": null,
"written_receiver": null,
"modifiers": [],
"alias_of": null
},
{
"id": "lang_samples/ruby/classes.rb::Splintered::e",
"name": "e",
"qualified_name": "lang_samples.ruby.classes.Splintered.e",
"kind": "method",
"signature": "e",
"start_line": 36,
"end_line": 42,
"docstring": null,
"decorators": [],
"visibility": "public",
"is_async": false,
"complexity_estimate": 1,
"language": "ruby",
"parent_name": "Splintered",
"is_exported_symbol": false,
"is_declaration": false,
"type_parameter_count": null,
"extension_receiver": null,
"written_receiver": null,
"modifiers": [],
"alias_of": null
},
{
"id": "lang_samples/ruby/classes.rb::Util",
"name": "Util",
"qualified_name": "lang_samples.ruby.classes.Util",
"kind": "module",
"signature": "Util",
"start_line": 45,
"end_line": 53,
"docstring": null,
"decorators": [],
"visibility": "public",
"is_async": false,
"complexity_estimate": 1,
"language": "ruby",
"parent_name": null,
"is_exported_symbol": false,
"is_declaration": false,
"type_parameter_count": null,
"extension_receiver": null,
"written_receiver": null,
"modifiers": [],
"alias_of": null
},
{
"id": "lang_samples/ruby/classes.rb::Util::helper_one",
"name": "helper_one",
"qualified_name": "lang_samples.ruby.classes.Util.helper_one",
"kind": "method",
"signature": "helper_one",
"start_line": 46,
"end_line": 48,
"docstring": null,
"decorators": [],
"visibility": "public",
"is_async": false,
"complexity_estimate": 1,
"language": "ruby",
"parent_name": "Util",
"is_exported_symbol": false,
"is_declaration": false,
"type_parameter_count": null,
"extension_receiver": null,
"written_receiver": null,
"modifiers": [],
"alias_of": null
},
{
"id": "lang_samples/ruby/classes.rb::Util::helper_two",
"name": "helper_two",
"qualified_name": "lang_samples.ruby.classes.Util.helper_two",
"kind": "method",
"signature": "helper_two",
"start_line": 50,
"end_line": 52,
"docstring": null,
"decorators": [],
"visibility": "public",
"is_async": false,
"complexity_estimate": 1,
"language": "ruby",
"parent_name": "Util",
"is_exported_symbol": false,
"is_declaration": false,
"type_parameter_count": null,
"extension_receiver": null,
"written_receiver": null,
"modifiers": [],
"alias_of": null
}
],
"imports": [],
"exports": [
"Cohesive",
"Splintered",
"Util"
],
"export_aliases": {},
"calls": [],
"heritage": [],
"docstring": "Class-metrics fixture: method counts / god-class facts work off class_kinds;\nLCOM4 deliberately sits at its \"no signal\" valve for Ruby (receiver-less\n@ivar idiom), so even the splintered class must report lcom4 == 1.",
"parse_errors": [],
"content_hash": "2459413217a77560c5c4756876d47247eb62cf81f609dfc3c816d1c03233a3fd",
"type_refs": [],
"local_refs": [],
"registrars": [],
"references": [],
"schema_refs": [],
"grammar_missing": false
},
"ruby/nested.rb": {
"file_info": {
"path": "lang_samples/ruby/nested.rb",
"language": "ruby",
"size_bytes": 1090,
"is_test": false,
"is_config": false,
"is_api_contract": false,
"is_entry_point": false,
"is_manifest_entry": false,
"is_reachability_root": false,
"is_application_main": false
},
"symbols": [
{
"id": "lang_samples/ruby/nested.rb::deeply_nested",
"name": "deeply_nested",
"qualified_name": "lang_samples.ruby.nested.deeply_nested",
"kind": "function",
"signature": "deeply_nested(x)",
"start_line": 3,
"end_line": 14,
"docstring": "Control-flow fixture for the Ruby complexity walker.",
"decorators": [],
"visibility": "public",
"is_async": false,
"complexity_estimate": 1,
"language": "ruby",
"parent_name": null,
"is_exported_symbol": false,
"is_declaration": false,
"type_parameter_count": null,
"extension_receiver": null,
"written_receiver": null,
"modifiers": [],
"alias_of": null
},
{
"id": "lang_samples/ruby/nested.rb::many_branches",
"name": "many_branches",
"qualified_name": "lang_samples.ruby.nested.many_branches",
"kind": "function",
"signature": "many_branches(a, b)",
"start_line": 16,
"end_line": 27,
"docstring": null,
"decorators": [],
"visibility": "public",
"is_async": false,
"complexity_estimate": 1,
"language": "ruby",
"parent_name": null,
"is_exported_symbol": false,
"is_declaration": false,
"type_parameter_count": null,
"extension_receiver": null,
"written_receiver": null,
"modifiers": [],
"alias_of": null
},
{
"id": "lang_samples/ruby/nested.rb::wordy",
"name": "wordy",
"qualified_name": "lang_samples.ruby.nested.wordy",
"kind": "function",
"signature": "wordy(a, b)",
"start_line": 29,
"end_line": 31,
"docstring": null,
"decorators": [],
"visibility": "public",
"is_async": false,
"complexity_estimate": 1,
"language": "ruby",
"parent_name": null,
"is_exported_symbol": false,
"is_declaration": false,
"type_parameter_count": null,
"extension_receiver": null,
"written_receiver": null,
"modifiers": [],
"alias_of": null
},
{
"id": "lang_samples/ruby/nested.rb::shallow",
"name": "shallow",
"qualified_name": "lang_samples.ruby.nested.shallow",
"kind": "function",
"signature": "shallow(x)",
"start_line": 33,
"end_line": 35,
"docstring": null,
"decorators": [],
"visibility": "public",
"is_async": false,
"complexity_estimate": 1,
"language": "ruby",
"parent_name": null,
"is_exported_symbol": false,
"is_declaration": false,
"type_parameter_count": null,
"extension_receiver": null,
"written_receiver": null,
"modifiers": [],
"alias_of": null
},
{
"id": "lang_samples/ruby/nested.rb::block_heavy",
"name": "block_heavy",
"qualified_name": "lang_samples.ruby.nested.block_heavy",
"kind": "function",
"signature": "block_heavy(items)",
"start_line": 37,
"end_line": 41,
"docstring": null,
"decorators": [],
"visibility": "public",
"is_async": false,
"complexity_estimate": 1,
"language": "ruby",
"parent_name": null,
"is_exported_symbol": false,
"is_declaration": false,
"type_parameter_count": null,
"extension_receiver": null,
"written_receiver": null,
"modifiers": [],
"alias_of": null
},
{
"id": "lang_samples/ruby/nested.rb::flat_case",
"name": "flat_case",
"qualified_name": "lang_samples.ruby.nested.flat_case",
"kind": "function",
"signature": "flat_case(x)",
"start_line": 43,
"end_line": 49,
"docstring": null,
"decorators": [],
"visibility": "public",
"is_async": false,
"complexity_estimate": 1,
"language": "ruby",
"parent_name": null,
"is_exported_symbol": false,
"is_declaration": false,
"type_parameter_count": null,
"extension_receiver": null,
"written_receiver": null,
"modifiers": [],
"alias_of": null
},
{
"id": "lang_samples/ruby/nested.rb::heavy_case",
"name": "heavy_case",
"qualified_name": "lang_samples.ruby.nested.heavy_case",
"kind": "function",
"signature": "heavy_case(x)",
"start_line": 51,
"end_line": 60,
"docstring": null,
"decorators": [],
"visibility": "public",
"is_async": false,
"complexity_estimate": 1,
"language": "ruby",
"parent_name": null,
"is_exported_symbol": false,
"is_declaration": false,
"type_parameter_count": null,
"extension_receiver": null,
"written_receiver": null,
"modifiers": [],
"alias_of": null
},
{
"id": "lang_samples/ruby/nested.rb::pattern_match",
"name": "pattern_match",
"qualified_name": "lang_samples.ruby.nested.pattern_match",
"kind": "function",
"signature": "pattern_match(x)",
"start_line": 62,
"end_line": 69,
"docstring": null,
"decorators": [],
"visibility": "public",
"is_async": false,
"complexity_estimate": 1,
"language": "ruby",
"parent_name": null,
"is_exported_symbol": false,
"is_declaration": false,
"type_parameter_count": null,
"extension_receiver": null,
"written_receiver": null,
"modifiers": [],
"alias_of": null
},
{
"id": "lang_samples/ruby/nested.rb::risky_io",
"name": "risky_io",
"qualified_name": "lang_samples.ruby.nested.risky_io",
"kind": "function",
"signature": "risky_io(path)",
"start_line": 71,
"end_line": 81,
"docstring": null,
"decorators": [],
"visibility": "public",
"is_async": false,
"complexity_estimate": 1,
"language": "ruby",
"parent_name": null,
"is_exported_symbol": false,
"is_declaration": false,
"type_parameter_count": null,
"extension_receiver": null,
"written_receiver": null,
"modifiers": [],
"alias_of": null
},
{
"id": "lang_samples/ruby/nested.rb::implicit_rescue",
"name": "implicit_rescue",
"qualified_name": "lang_samples.ruby.nested.implicit_rescue",
"kind": "function",
"signature": "implicit_rescue",
"start_line": 83,
"end_line": 87,
"docstring": null,
"decorators": [],
"visibility": "public",
"is_async": false,
"complexity_estimate": 1,
"language": "ruby",
"parent_name": null,
"is_exported_symbol": false,
"is_declaration": false,
"type_parameter_count": null,
"extension_receiver": null,
"written_receiver": null,
"modifiers": [],
"alias_of": null
},
{
"id": "lang_samples/ruby/nested.rb::modifier_loops",
"name": "modifier_loops",
"qualified_name": "lang_samples.ruby.nested.modifier_loops",
"kind": "function",
"signature": "modifier_loops(x)",
"start_line": 89,
"end_line": 93,
"docstring": null,
"decorators": [],
"visibility": "public",
"is_async": false,
"complexity_estimate": 1,
"language": "ruby",
"parent_name": null,
"is_exported_symbol": false,
"is_declaration": false,
"type_parameter_count": null,
"extension_receiver": null,
"written_receiver": null,
"modifiers": [],
"alias_of": null
}
],
"imports": [],
"exports": [
"deeply_nested",
"many_branches",
"wordy",
"shallow",
"block_heavy",
"flat_case",
"heavy_case",
"pattern_match",
"risky_io",
"implicit_rescue",
"modifier_loops"
],
"export_aliases": {},
"calls": [
{
"target_name": "nil?",
"receiver_name": "a",
"caller_symbol_id": "lang_samples/ruby/nested.rb::many_branches",
"line": 17,
"argument_count": null,
"receiver_call": null,
"scope_name": null,
"edge_type": "calls",
"supplied_props": null,
"bare_name_fallback": false,
"spawned": false,
"program_call": false,
"argument_types": null,
"argument_names": null
},
{
"target_name": "zero?",
"receiver_name": "a",
"caller_symbol_id": "lang_samples/ruby/nested.rb::many_branches",
"line": 22,
"argument_count": null,
"receiver_call": null,
"scope_name": null,
"edge_type": "calls",
"supplied_props": null,
"bare_name_fallback": false,
"spawned": false,
"program_call": false,
"argument_types": null,
"argument_names": null
},
{
"target_name": "each",
"receiver_name": "items",
"caller_symbol_id": "lang_samples/ruby/nested.rb::block_heavy",
"line": 38,
"argument_count": null,
"receiver_call": null,
"scope_name": null,
"edge_type": "calls",
"supplied_props": null,
"bare_name_fallback": false,
"spawned": false,
"program_call": false,
"argument_types": null,
"argument_names": null
},
{
"target_name": "map",
"receiver_name": "group",
"caller_symbol_id": "lang_samples/ruby/nested.rb::block_heavy",
"line": 39,
"argument_count": null,
"receiver_call": null,
"scope_name": null,
"edge_type": "calls",
"supplied_props": null,
"bare_name_fallback": false,
"spawned": false,
"program_call": false,
"argument_types": null,
"argument_names": null
},
{
"target_name": "odd?",
"receiver_name": "x",
"caller_symbol_id": "lang_samples/ruby/nested.rb::heavy_case",
"line": 54,
"argument_count": null,
"receiver_call": null,
"scope_name": null,
"edge_type": "calls",
"supplied_props": null,
"bare_name_fallback": false,
"spawned": false,
"program_call": false,
"argument_types": null,
"argument_names": null
},
{
"target_name": "read",
"receiver_name": "File",
"caller_symbol_id": "lang_samples/ruby/nested.rb::risky_io",
"line": 73,
"argument_count": null,
"receiver_call": null,
"scope_name": null,
"edge_type": "calls",
"supplied_props": null,
"bare_name_fallback": true,
"spawned": false,
"program_call": false,
"argument_types": null,
"argument_names": null
}
],
"heritage": [],
"docstring": "Control-flow fixture for the Ruby complexity walker.",
"parse_errors": [],
"content_hash": "2a38411f2e58f62b77150e98ac997dfd214c2389e0541f2b0ec714b8b0a432af",
"type_refs": [],
"local_refs": [],
"registrars": [],
"references": [],
"schema_refs": [],
"grammar_missing": false
},
"ruby/perf_io_in_loop.rb": {
"file_info": {
"path": "lang_samples/ruby/perf_io_in_loop.rb",
"language": "ruby",
"size_bytes": 1420,
"is_test": false,
"is_config": false,
"is_api_contract": false,
"is_entry_point": false,
"is_manifest_entry": false,
"is_reachability_root": false,
"is_application_main": false
},
"symbols": [
{
"id": "lang_samples/ruby/perf_io_in_loop.rb::sync_fetch_each",
"name": "sync_fetch_each",
"qualified_name": "lang_samples.ruby.perf_io_in_loop.sync_fetch_each",
"kind": "function",
"signature": "sync_fetch_each(urls)",
"start_line": 6,
"end_line": 10,
"docstring": null,
"decorators": [],
"visibility": "public",
"is_async": false,
"complexity_estimate": 1,
"language": "ruby",
"parent_name": null,
"is_exported_symbol": false,
"is_declaration": false,
"type_parameter_count": null,
"extension_receiver": null,
"written_receiver": null,
"modifiers": [],
"alias_of": null
},
{
"id": "lang_samples/ruby/perf_io_in_loop.rb::read_files",
"name": "read_files",
"qualified_name": "lang_samples.ruby.perf_io_in_loop.read_files",
"kind": "function",
"signature": "read_files(paths)",
"start_line": 12,
"end_line": 14,
"docstring": null,
"decorators": [],
"visibility": "public",
"is_async": false,
"complexity_estimate": 1,
"language": "ruby",
"parent_name": null,
"is_exported_symbol": false,
"is_declaration": false,
"type_parameter_count": null,
"extension_receiver": null,
"written_receiver": null,
"modifiers": [],
"alias_of": null
},
{
"id": "lang_samples/ruby/perf_io_in_loop.rb::nested_read",
"name": "nested_read",
"qualified_name": "lang_samples.ruby.perf_io_in_loop.nested_read",
"kind": "function",
"signature": "nested_read(dirs)",
"start_line": 16,
"end_line": 22,
"docstring": null,
"decorators": [],
"visibility": "public",
"is_async": false,
"complexity_estimate": 1,
"language": "ruby",
"parent_name": null,
"is_exported_symbol": false,
"is_declaration": false,
"type_parameter_count": null,
"extension_receiver": null,
"written_receiver": null,
"modifiers": [],
"alias_of": null
},
{
"id": "lang_samples/ruby/perf_io_in_loop.rb::orders_report",
"name": "orders_report",
"qualified_name": "lang_samples.ruby.perf_io_in_loop.orders_report",
"kind": "function",
"signature": "orders_report(ids)",
"start_line": 24,
"end_line": 28,
"docstring": null,
"decorators": [],
"visibility": "public",
"is_async": false,
"complexity_estimate": 1,
"language": "ruby",
"parent_name": null,
"is_exported_symbol": false,
"is_declaration": false,
"type_parameter_count": null,
"extension_receiver": null,
"written_receiver": null,
"modifiers": [],
"alias_of": null
},
{
"id": "lang_samples/ruby/perf_io_in_loop.rb::constant_bound",
"name": "constant_bound",
"qualified_name": "lang_samples.ruby.perf_io_in_loop.constant_bound",
"kind": "function",
"signature": "constant_bound",
"start_line": 30,
"end_line": 37,
"docstring": null,
"decorators": [],
"visibility": "public",
"is_async": false,
"complexity_estimate": 1,
"language": "ruby",
"parent_name": null,
"is_exported_symbol": false,
"is_declaration": false,
"type_parameter_count": null,
"extension_receiver": null,
"written_receiver": null,
"modifiers": [],
"alias_of": null
},
{
"id": "lang_samples/ruby/perf_io_in_loop.rb::build_report",
"name": "build_report",
"qualified_name": "lang_samples.ruby.perf_io_in_loop.build_report",
"kind": "function",
"signature": "build_report(lines)",
"start_line": 39,
"end_line": 47,
"docstring": null,
"decorators": [],
"visibility": "public",
"is_async": false,
"complexity_estimate": 1,
"language": "ruby",
"parent_name": null,
"is_exported_symbol": false,
"is_declaration": false,
"type_parameter_count": null,
"extension_receiver": null,
"written_receiver": null,
"modifiers": [],
"alias_of": null
},
{
"id": "lang_samples/ruby/perf_io_in_loop.rb::bounded_concat",
"name": "bounded_concat",
"qualified_name": "lang_samples.ruby.perf_io_in_loop.bounded_concat",
"kind": "function",
"signature": "bounded_concat(lines)",
"start_line": 49,
"end_line": 55,
"docstring": null,
"decorators": [],
"visibility": "public",
"is_async": false,
"complexity_estimate": 1,
"language": "ruby",
"parent_name": null,
"is_exported_symbol": false,
"is_declaration": false,
"type_parameter_count": null,
"extension_receiver": null,
"written_receiver": null,
"modifiers": [],
"alias_of": null
},
{
"id": "lang_samples/ruby/perf_io_in_loop.rb::regex_scan",
"name": "regex_scan",
"qualified_name": "lang_samples.ruby.perf_io_in_loop.regex_scan",
"kind": "function",
"signature": "regex_scan(rows, pattern)",
"start_line": 57,
"end_line": 63,
"docstring": null,
"decorators": [],
"visibility": "public",
"is_async": false,
"complexity_estimate": 1,
"language": "ruby",
"parent_name": null,
"is_exported_symbol": false,
"is_declaration": false,
"type_parameter_count": null,
"extension_receiver": null,
"written_receiver": null,
"modifiers": [],
"alias_of": null
},
{
"id": "lang_samples/ruby/perf_io_in_loop.rb::fresh_clients",
"name": "fresh_clients",
"qualified_name": "lang_samples.ruby.perf_io_in_loop.fresh_clients",
"kind": "function",
"signature": "fresh_clients(hosts)",
"start_line": 65,
"end_line": 70,
"docstring": null,
"decorators": [],
"visibility": "public",
"is_async": false,
"complexity_estimate": 1,
"language": "ruby",
"parent_name": null,
"is_exported_symbol": false,
"is_declaration": false,
"type_parameter_count": null,
"extension_receiver": null,
"written_receiver": null,
"modifiers": [],
"alias_of": null
},
{
"id": "lang_samples/ruby/perf_io_in_loop.rb::shell_out",
"name": "shell_out",
"qualified_name": "lang_samples.ruby.perf_io_in_loop.shell_out",
"kind": "function",
"signature": "shell_out(names)",
"start_line": 72,
"end_line": 76,
"docstring": null,
"decorators": [],
"visibility": "public",
"is_async": false,
"complexity_estimate": 1,
"language": "ruby",
"parent_name": null,
"is_exported_symbol": false,
"is_declaration": false,
"type_parameter_count": null,
"extension_receiver": null,
"written_receiver": null,
"modifiers": [],
"alias_of": null
},
{
"id": "lang_samples/ruby/perf_io_in_loop.rb::locked_write",
"name": "locked_write",
"qualified_name": "lang_samples.ruby.perf_io_in_loop.locked_write",
"kind": "function",
"signature": "locked_write(mutex, items)",
"start_line": 78,
"end_line": 84,
"docstring": null,
"decorators": [],
"visibility": "public",
"is_async": false,
"complexity_estimate": 1,
"language": "ruby",
"parent_name": null,
"is_exported_symbol": false,
"is_declaration": false,
"type_parameter_count": null,
"extension_receiver": null,
"written_receiver": null,
"modifiers": [],
"alias_of": null
},
{
"id": "lang_samples/ruby/perf_io_in_loop.rb::helper_calls",
"name": "helper_calls",
"qualified_name": "lang_samples.ruby.perf_io_in_loop.helper_calls",
"kind": "function",
"signature": "helper_calls(items)",
"start_line": 86,
"end_line": 88,
"docstring": null,
"decorators": [],
"visibility": "public",
"is_async": false,
"complexity_estimate": 1,
"language": "ruby",
"parent_name": null,
"is_exported_symbol": false,
"is_declaration": false,
"type_parameter_count": null,
"extension_receiver": null,
"written_receiver": null,
"modifiers": [],
"alias_of": null
}
],
"imports": [
{
"raw_statement": "require \"net/http\"",
"module_path": "net/http",
"imported_names": [
"http"
],
"is_relative": false,
"resolved_file": null,
"bindings": [
{
"local_name": "http",
"exported_name": null,
"source_file": "net/http",
"is_module_alias": true,
"is_global": false,
"is_static_import": false,
"line": null,
"column": null
}
],
"is_reexport": false,
"is_module_declaration": false,
"type_only": false,
"deferred": false
}
],
"exports": [
"sync_fetch_each",
"read_files",
"nested_read",
"orders_report",
"constant_bound",
"build_report",
"bounded_concat",
"regex_scan",
"fresh_clients",
"shell_out",
"locked_write",
"helper_calls"
],
"export_aliases": {},
"calls": [
{
"target_name": "each",
"receiver_name": "urls",
"caller_symbol_id": "lang_samples/ruby/perf_io_in_loop.rb::sync_fetch_each",
"line": 7,
"argument_count": null,
"receiver_call": null,
"scope_name": null,
"edge_type": "calls",
"supplied_props": null,
"bare_name_fallback": false,
"spawned": false,
"program_call": false,
"argument_types": null,
"argument_names": null
},
{
"target_name": "get",
"receiver_name": "HTTP",
"caller_symbol_id": "lang_samples/ruby/perf_io_in_loop.rb::sync_fetch_each",
"line": 8,
"argument_count": null,
"receiver_call": null,
"scope_name": null,
"edge_type": "calls",
"supplied_props": null,
"bare_name_fallback": true,
"spawned": false,
"program_call": false,
"argument_types": null,
"argument_names": null
},
{
"target_name": "map",
"receiver_name": "paths",
"caller_symbol_id": "lang_samples/ruby/perf_io_in_loop.rb::read_files",
"line": 13,
"argument_count": null,
"receiver_call": null,
"scope_name": null,
"edge_type": "calls",
"supplied_props": null,
"bare_name_fallback": false,
"spawned": false,
"program_call": false,
"argument_types": null,
"argument_names": null
},
{
"target_name": "read",
"receiver_name": "File",
"caller_symbol_id": "lang_samples/ruby/perf_io_in_loop.rb::read_files",
"line": 13,
"argument_count": null,
"receiver_call": null,
"scope_name": null,
"edge_type": "calls",
"supplied_props": null,
"bare_name_fallback": true,
"spawned": false,
"program_call": false,
"argument_types": null,
"argument_names": null
},
{
"target_name": "each",
"receiver_name": "dirs",
"caller_symbol_id": "lang_samples/ruby/perf_io_in_loop.rb::nested_read",
"line": 17,
"argument_count": null,
"receiver_call": null,
"scope_name": null,
"edge_type": "calls",
"supplied_props": null,
"bare_name_fallback": false,
"spawned": false,
"program_call": false,
"argument_types": null,
"argument_names": null
},
{
"target_name": "glob",
"receiver_name": "Dir",
"caller_symbol_id": "lang_samples/ruby/perf_io_in_loop.rb::nested_read",
"line": 18,
"argument_count": null,
"receiver_call": null,
"scope_name": null,
"edge_type": "calls",
"supplied_props": null,
"bare_name_fallback": true,
"spawned": false,
"program_call": false,
"argument_types": null,
"argument_names": null
},
{
"target_name": "join",
"receiver_name": "File",
"caller_symbol_id": "lang_samples/ruby/perf_io_in_loop.rb::nested_read",
"line": 18,
"argument_count": null,
"receiver_call": null,
"scope_name": null,
"edge_type": "calls",
"supplied_props": null,
"bare_name_fallback": true,
"spawned": false,
"program_call": false,
"argument_types": null,
"argument_names": null
},
{
"target_name": "read",
"receiver_name": "File",
"caller_symbol_id": "lang_samples/ruby/perf_io_in_loop.rb::nested_read",
"line": 19,
"argument_count": null,
"receiver_call": null,
"scope_name": null,
"edge_type": "calls",
"supplied_props": null,
"bare_name_fallback": true,
"spawned": false,
"program_call": false,
"argument_types": null,
"argument_names": null
},
{
"target_name": "each",
"receiver_name": "ids",
"caller_symbol_id": "lang_samples/ruby/perf_io_in_loop.rb::orders_report",
"line": 25,
"argument_count": null,
"receiver_call": null,
"scope_name": null,
"edge_type": "calls",
"supplied_props": null,
"bare_name_fallback": false,
"spawned": false,
"program_call": false,
"argument_types": null,
"argument_names": null
},
{
"target_name": "where",
"receiver_name": "Order",
"caller_symbol_id": "lang_samples/ruby/perf_io_in_loop.rb::orders_report",
"line": 26,
"argument_count": null,
"receiver_call": null,
"scope_name": null,
"edge_type": "calls",
"supplied_props": null,
"bare_name_fallback": true,
"spawned": false,
"program_call": false,
"argument_types": null,
"argument_names": null
},
{
"target_name": "read",
"receiver_name": "File",
"caller_symbol_id": "lang_samples/ruby/perf_io_in_loop.rb::constant_bound",
"line": 32,
"argument_count": null,
"receiver_call": null,
"scope_name": null,
"edge_type": "calls",
"supplied_props": null,
"bare_name_fallback": true,
"spawned": false,
"program_call": false,
"argument_types": null,
"argument_names": null
},
{
"target_name": "read",
"receiver_name": "File",
"caller_symbol_id": "lang_samples/ruby/perf_io_in_loop.rb::constant_bound",
"line": 35,
"argument_count": null,
"receiver_call": null,
"scope_name": null,
"edge_type": "calls",
"supplied_props": null,
"bare_name_fallback": true,
"spawned": false,
"program_call": false,
"argument_types": null,
"argument_names": null
},
{
"target_name": "each",
"receiver_name": "lines",
"caller_symbol_id": "lang_samples/ruby/perf_io_in_loop.rb::build_report",
"line": 41,
"argument_count": null,
"receiver_call": null,
"scope_name": null,
"edge_type": "calls",
"supplied_props": null,
"bare_name_fallback": false,
"spawned": false,
"program_call": false,
"argument_types": null,
"argument_names": null
},
{
"target_name": "each",
"receiver_name": "lines",
"caller_symbol_id": "lang_samples/ruby/perf_io_in_loop.rb::bounded_concat",
"line": 50,
"argument_count": null,
"receiver_call": null,
"scope_name": null,
"edge_type": "calls",
"supplied_props": null,
"bare_name_fallback": false,
"spawned": false,
"program_call": false,
"argument_types": null,
"argument_names": null
},
{
"target_name": "emit",
"receiver_name": null,
"caller_symbol_id": "lang_samples/ruby/perf_io_in_loop.rb::bounded_concat",
"line": 53,
"argument_count": 1,
"receiver_call": null,
"scope_name": null,
"edge_type": "calls",
"supplied_props": null,
"bare_name_fallback": false,
"spawned": false,
"program_call": false,
"argument_types": null,
"argument_names": null
},
{
"target_name": "new",
"receiver_name": "Regexp",
"caller_symbol_id": "lang_samples/ruby/perf_io_in_loop.rb::regex_scan",
"line": 58,
"argument_count": null,
"receiver_call": null,
"scope_name": null,
"edge_type": "calls",
"supplied_props": null,
"bare_name_fallback": true,
"spawned": false,
"program_call": false,
"argument_types": null,
"argument_names": null
},
{
"target_name": "each",
"receiver_name": "rows",
"caller_symbol_id": "lang_samples/ruby/perf_io_in_loop.rb::regex_scan",
"line": 59,
"argument_count": null,
"receiver_call": null,
"scope_name": null,
"edge_type": "calls",
"supplied_props": null,
"bare_name_fallback": false,
"spawned": false,
"program_call": false,
"argument_types": null,
"argument_names": null
},
{
"target_name": "new",
"receiver_name": "Regexp",
"caller_symbol_id": "lang_samples/ruby/perf_io_in_loop.rb::regex_scan",
"line": 60,
"argument_count": null,
"receiver_call": null,
"scope_name": null,
"edge_type": "calls",
"supplied_props": null,
"bare_name_fallback": true,
"spawned": false,
"program_call": false,
"argument_types": null,
"argument_names": null
},
{
"target_name": "match?",
"receiver_name": "re",
"caller_symbol_id": "lang_samples/ruby/perf_io_in_loop.rb::regex_scan",
"line": 61,
"argument_count": null,
"receiver_call": null,
"scope_name": null,
"edge_type": "calls",
"supplied_props": null,
"bare_name_fallback": true,
"spawned": false,
"program_call": false,
"argument_types": null,
"argument_names": null
},
{
"target_name": "match?",
"receiver_name": "hoisted",
"caller_symbol_id": "lang_samples/ruby/perf_io_in_loop.rb::regex_scan",
"line": 61,
"argument_count": null,
"receiver_call": null,
"scope_name": null,
"edge_type": "calls",
"supplied_props": null,
"bare_name_fallback": true,
"spawned": false,
"program_call": false,
"argument_types": null,
"argument_names": null
},
{
"target_name": "each",
"receiver_name": "hosts",
"caller_symbol_id": "lang_samples/ruby/perf_io_in_loop.rb::fresh_clients",
"line": 66,
"argument_count": null,
"receiver_call": null,
"scope_name": null,
"edge_type": "calls",
"supplied_props": null,
"bare_name_fallback": false,
"spawned": false,
"program_call": false,
"argument_types": null,
"argument_names": null
},
{
"target_name": "new",
"receiver_name": "Faraday",
"caller_symbol_id": "lang_samples/ruby/perf_io_in_loop.rb::fresh_clients",
"line": 67,
"argument_count": null,
"receiver_call": null,
"scope_name": null,
"edge_type": "calls",
"supplied_props": null,
"bare_name_fallback": true,
"spawned": false,
"program_call": false,
"argument_types": null,
"argument_names": null
},
{
"target_name": "get",
"receiver_name": "conn",
"caller_symbol_id": "lang_samples/ruby/perf_io_in_loop.rb::fresh_clients",
"line": 68,
"argument_count": null,
"receiver_call": null,
"scope_name": null,
"edge_type": "calls",
"supplied_props": null,
"bare_name_fallback": true,
"spawned": false,
"program_call": false,
"argument_types": null,
"argument_names": null
},
{
"target_name": "each",
"receiver_name": "names",
"caller_symbol_id": "lang_samples/ruby/perf_io_in_loop.rb::shell_out",
"line": 73,
"argument_count": null,
"receiver_call": null,
"scope_name": null,
"edge_type": "calls",
"supplied_props": null,
"bare_name_fallback": false,
"spawned": false,
"program_call": false,
"argument_types": null,
"argument_names": null
},
{
"target_name": "each",
"receiver_name": "items",
"caller_symbol_id": "lang_samples/ruby/perf_io_in_loop.rb::locked_write",
"line": 79,
"argument_count": null,
"receiver_call": null,
"scope_name": null,
"edge_type": "calls",
"supplied_props": null,
"bare_name_fallback": false,
"spawned": false,
"program_call": false,
"argument_types": null,
"argument_names": null
},
{
"target_name": "synchronize",
"receiver_name": "mutex",
"caller_symbol_id": "lang_samples/ruby/perf_io_in_loop.rb::locked_write",
"line": 80,
"argument_count": null,
"receiver_call": null,
"scope_name": null,
"edge_type": "calls",
"supplied_props": null,
"bare_name_fallback": false,
"spawned": false,
"program_call": false,
"argument_types": null,
"argument_names": null
},
{
"target_name": "write",
"receiver_name": "File",
"caller_symbol_id": "lang_samples/ruby/perf_io_in_loop.rb::locked_write",
"line": 81,
"argument_count": null,
"receiver_call": null,
"scope_name": null,
"edge_type": "calls",
"supplied_props": null,
"bare_name_fallback": true,
"spawned": false,
"program_call": false,
"argument_types": null,
"argument_names": null
},
{
"target_name": "each",
"receiver_name": "items",
"caller_symbol_id": "lang_samples/ruby/perf_io_in_loop.rb::helper_calls",
"line": 87,
"argument_count": null,
"receiver_call": null,
"scope_name": null,
"edge_type": "calls",
"supplied_props": null,
"bare_name_fallback": false,
"spawned": false,
"program_call": false,
"argument_types": null,
"argument_names": null
},
{
"target_name": "transform",
"receiver_name": null,
"caller_symbol_id": "lang_samples/ruby/perf_io_in_loop.rb::helper_calls",
"line": 87,
"argument_count": 1,
"receiver_call": null,
"scope_name": null,
"edge_type": "calls",
"supplied_props": null,
"bare_name_fallback": false,
"spawned": false,
"program_call": false,
"argument_types": null,
"argument_names": null
}
],
"heritage": [],
"docstring": "Perf-dialect fixture: block-iteration loops, the sink lexicon, string\nconcat (+= flagged, << not), regex/resource construction, lock scopes.",
"parse_errors": [],
"content_hash": "44d4e6640bcfe0a0a50f76947c4eed318d8712f3a5f247d21efc890af234d0f7",
"type_refs": [],
"local_refs": [],
"registrars": [],
"references": [],
"schema_refs": [],
"grammar_missing": false
}
}