pi-usereq 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.g.conf +20 -0
- package/.github/workflows/release-npm.yml +131 -0
- package/.gitignore +270 -0
- package/CHANGELOG.md +221 -0
- package/LICENSE +674 -0
- package/README.md +260 -0
- package/TODO.md +20 -0
- package/docs/pi.dev/agent-document-manifest.json +6399 -0
- package/docs/pi.dev/coding-agent-docs/compaction.md +394 -0
- package/docs/pi.dev/coding-agent-docs/custom-provider.md +596 -0
- package/docs/pi.dev/coding-agent-docs/development.md +71 -0
- package/docs/pi.dev/coding-agent-docs/extensions.md +2262 -0
- package/docs/pi.dev/coding-agent-docs/images/doom-extension.png +0 -0
- package/docs/pi.dev/coding-agent-docs/images/exy.png +0 -0
- package/docs/pi.dev/coding-agent-docs/images/interactive-mode.png +0 -0
- package/docs/pi.dev/coding-agent-docs/images/tree-view.png +0 -0
- package/docs/pi.dev/coding-agent-docs/json.md +82 -0
- package/docs/pi.dev/coding-agent-docs/keybindings.md +175 -0
- package/docs/pi.dev/coding-agent-docs/models.md +392 -0
- package/docs/pi.dev/coding-agent-docs/packages.md +218 -0
- package/docs/pi.dev/coding-agent-docs/prompt-templates.md +67 -0
- package/docs/pi.dev/coding-agent-docs/providers.md +195 -0
- package/docs/pi.dev/coding-agent-docs/rpc.md +1377 -0
- package/docs/pi.dev/coding-agent-docs/sdk.md +1124 -0
- package/docs/pi.dev/coding-agent-docs/session.md +412 -0
- package/docs/pi.dev/coding-agent-docs/settings.md +247 -0
- package/docs/pi.dev/coding-agent-docs/shell-aliases.md +13 -0
- package/docs/pi.dev/coding-agent-docs/skills.md +232 -0
- package/docs/pi.dev/coding-agent-docs/terminal-setup.md +106 -0
- package/docs/pi.dev/coding-agent-docs/termux.md +127 -0
- package/docs/pi.dev/coding-agent-docs/themes.md +295 -0
- package/docs/pi.dev/coding-agent-docs/tmux.md +61 -0
- package/docs/pi.dev/coding-agent-docs/tree.md +231 -0
- package/docs/pi.dev/coding-agent-docs/tui.md +887 -0
- package/docs/pi.dev/coding-agent-docs/windows.md +17 -0
- package/docs/pi.dev/mom-docs/artifacts-server.md +475 -0
- package/docs/pi.dev/mom-docs/events.md +307 -0
- package/docs/pi.dev/mom-docs/new.md +970 -0
- package/docs/pi.dev/mom-docs/sandbox.md +153 -0
- package/docs/pi.dev/mom-docs/slack-bot-minimal-guide.md +399 -0
- package/docs/pi.dev/mom-docs/v86.md +319 -0
- package/docs/pi.dev/pods-docs/gml-4.5.md +189 -0
- package/docs/pi.dev/pods-docs/gpt-oss.md +233 -0
- package/docs/pi.dev/pods-docs/implementation-plan.md +183 -0
- package/docs/pi.dev/pods-docs/kimi-k2.md +197 -0
- package/docs/pi.dev/pods-docs/models.md +116 -0
- package/docs/pi.dev/pods-docs/plan.md +166 -0
- package/docs/pi.dev/pods-docs/qwen3-coder.md +132 -0
- package/images/flowchart-bw.png +0 -0
- package/images/flowchart-bw.svg +102 -0
- package/images/flowchart.md +100 -0
- package/images/flowchart.png +0 -0
- package/images/flowchart.svg +3 -0
- package/package.json +46 -0
- package/req/docs/REFERENCES.md +4554 -0
- package/req/docs/REQUIREMENTS.md +475 -0
- package/req/docs/WORKFLOW.md +1059 -0
- package/scripts/debug-extension.ts +497 -0
- package/scripts/lib/extension-debug-harness.ts +450 -0
- package/scripts/lib/recording-extension-api.ts +786 -0
- package/scripts/lib/sdk-smoke.ts +503 -0
- package/scripts/pi-usereq-debug.sh +330 -0
- package/scripts/tool-args-to-params.ts +208 -0
- package/src/cli.ts +349 -0
- package/src/core/agent-tool-json.ts +621 -0
- package/src/core/compress-files.ts +72 -0
- package/src/core/compress-payload.ts +648 -0
- package/src/core/compress.ts +464 -0
- package/src/core/config.ts +272 -0
- package/src/core/doxygen-parser.ts +318 -0
- package/src/core/errors.ts +31 -0
- package/src/core/extension-status.ts +660 -0
- package/src/core/find-constructs.ts +319 -0
- package/src/core/find-payload.ts +915 -0
- package/src/core/generate-markdown.ts +120 -0
- package/src/core/path-context.ts +196 -0
- package/src/core/pi-notify.ts +430 -0
- package/src/core/pi-usereq-tools.ts +140 -0
- package/src/core/prompts.ts +184 -0
- package/src/core/reference-payload.ts +818 -0
- package/src/core/resources.ts +63 -0
- package/src/core/runtime-project-paths.ts +99 -0
- package/src/core/settings-menu.ts +233 -0
- package/src/core/source-analyzer.ts +1721 -0
- package/src/core/static-check.ts +674 -0
- package/src/core/token-counter.ts +729 -0
- package/src/core/tool-runner.ts +717 -0
- package/src/core/utils.ts +185 -0
- package/src/index.ts +2209 -0
- package/src/resources/guidelines/Google_C++_Style_Guide.md +3711 -0
- package/src/resources/guidelines/Google_Python_Style_Guide.md +3709 -0
- package/src/resources/prompts/analyze.md +130 -0
- package/src/resources/prompts/change.md +227 -0
- package/src/resources/prompts/check.md +139 -0
- package/src/resources/prompts/cover.md +219 -0
- package/src/resources/prompts/create.md +104 -0
- package/src/resources/prompts/fix.md +221 -0
- package/src/resources/prompts/flowchart.md +220 -0
- package/src/resources/prompts/implement.md +163 -0
- package/src/resources/prompts/new.md +226 -0
- package/src/resources/prompts/readme.md +182 -0
- package/src/resources/prompts/recreate.md +213 -0
- package/src/resources/prompts/refactor.md +213 -0
- package/src/resources/prompts/references.md +100 -0
- package/src/resources/prompts/renumber.md +119 -0
- package/src/resources/prompts/workflow.md +202 -0
- package/src/resources/prompts/write.md +99 -0
- package/src/resources/sounds/Machine-alert-beep-sound-effect.mp3 +0 -0
- package/src/resources/sounds/Soft-high-tech-notification-sound-effect.mp3 +0 -0
- package/src/resources/templates/Document_Source_Code_in_Doxygen_Style.md +130 -0
- package/src/resources/templates/HDT_Test_Authoring_Guide.md +318 -0
- package/src/resources/templates/Requirements_Template.md +78 -0
- package/tests/attended-results-scenarios.ts +758 -0
- package/tests/attended-results.test.ts +39 -0
- package/tests/cli-command-option-parity.test.ts +815 -0
- package/tests/debug-extension-harness.test.ts +463 -0
- package/tests/extension-registration.test.ts +2006 -0
- package/tests/fixtures/fixture_c.c +361 -0
- package/tests/fixtures/fixture_cpp.cpp +407 -0
- package/tests/fixtures/fixture_csharp.cs +411 -0
- package/tests/fixtures/fixture_elixir.ex +409 -0
- package/tests/fixtures/fixture_go.go +341 -0
- package/tests/fixtures/fixture_haskell.hs +250 -0
- package/tests/fixtures/fixture_java.java +430 -0
- package/tests/fixtures/fixture_javascript.js +383 -0
- package/tests/fixtures/fixture_kotlin.kt +451 -0
- package/tests/fixtures/fixture_lua.lua +276 -0
- package/tests/fixtures/fixture_perl.pl +310 -0
- package/tests/fixtures/fixture_php.php +433 -0
- package/tests/fixtures/fixture_python.py +502 -0
- package/tests/fixtures/fixture_ruby.rb +345 -0
- package/tests/fixtures/fixture_rust.rs +380 -0
- package/tests/fixtures/fixture_scala.scala +398 -0
- package/tests/fixtures/fixture_shell.sh +276 -0
- package/tests/fixtures/fixture_swift.swift +397 -0
- package/tests/fixtures/fixture_typescript.ts +434 -0
- package/tests/fixtures/fixture_zig.zig +295 -0
- package/tests/fixtures_attended_results/project/compress-line-numbers.json +5 -0
- package/tests/fixtures_attended_results/project/compress.json +5 -0
- package/tests/fixtures_attended_results/project/enable-static-check-invalid-command.json +5 -0
- package/tests/fixtures_attended_results/project/enable-static-check-valid.json +5 -0
- package/tests/fixtures_attended_results/project/files-static-check.json +5 -0
- package/tests/fixtures_attended_results/project/find-line-numbers.json +5 -0
- package/tests/fixtures_attended_results/project/find.json +5 -0
- package/tests/fixtures_attended_results/project/get-base-path.json +5 -0
- package/tests/fixtures_attended_results/project/git-check-clean.json +5 -0
- package/tests/fixtures_attended_results/project/git-check-dirty.json +5 -0
- package/tests/fixtures_attended_results/project/git-path.json +5 -0
- package/tests/fixtures_attended_results/project/git-wt-create-invalid.json +5 -0
- package/tests/fixtures_attended_results/project/git-wt-create-valid.json +5 -0
- package/tests/fixtures_attended_results/project/git-wt-delete-nonexistent.json +5 -0
- package/tests/fixtures_attended_results/project/git-wt-delete-valid.json +5 -0
- package/tests/fixtures_attended_results/project/git-wt-name.json +5 -0
- package/tests/fixtures_attended_results/project/references.json +5 -0
- package/tests/fixtures_attended_results/project/static-check.json +5 -0
- package/tests/fixtures_attended_results/project/tokens.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_c.c.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_cpp.cpp.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_csharp.cs.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_elixir.ex.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_go.go.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_haskell.hs.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_java.java.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_javascript.js.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_kotlin.kt.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_lua.lua.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_perl.pl.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_php.php.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_python.py.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_ruby.rb.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_rust.rs.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_scala.scala.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_shell.sh.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_swift.swift.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_typescript.ts.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress/fixture_zig.zig.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_c.c.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_cpp.cpp.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_csharp.cs.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_elixir.ex.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_go.go.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_haskell.hs.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_java.java.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_javascript.js.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_kotlin.kt.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_lua.lua.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_perl.pl.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_php.php.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_python.py.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_ruby.rb.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_rust.rs.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_scala.scala.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_shell.sh.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_swift.swift.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_typescript.ts.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-compress-line-numbers/fixture_zig.zig.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_c.c.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_cpp.cpp.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_csharp.cs.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_elixir.ex.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_go.go.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_haskell.hs.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_java.java.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_javascript.js.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_kotlin.kt.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_lua.lua.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_perl.pl.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_php.php.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_python.py.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_ruby.rb.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_rust.rs.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_scala.scala.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_shell.sh.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_swift.swift.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_typescript.ts.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find/fixture_zig.zig.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_c.c.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_cpp.cpp.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_csharp.cs.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_elixir.ex.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_go.go.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_haskell.hs.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_java.java.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_javascript.js.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_kotlin.kt.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_lua.lua.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_perl.pl.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_php.php.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_python.py.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_ruby.rb.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_rust.rs.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_scala.scala.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_shell.sh.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_swift.swift.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_typescript.ts.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_zig.zig.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_c.c.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_cpp.cpp.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_csharp.cs.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_elixir.ex.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_go.go.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_haskell.hs.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_java.java.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_javascript.js.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_kotlin.kt.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_lua.lua.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_perl.pl.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_php.php.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_python.py.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_ruby.rb.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_rust.rs.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_scala.scala.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_shell.sh.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_swift.swift.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_typescript.ts.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-references/fixture_zig.zig.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_c.c.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_cpp.cpp.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_csharp.cs.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_elixir.ex.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_go.go.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_haskell.hs.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_java.java.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_javascript.js.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_kotlin.kt.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_lua.lua.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_perl.pl.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_php.php.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_python.py.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_ruby.rb.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_rust.rs.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_scala.scala.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_shell.sh.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_swift.swift.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_typescript.ts.json +5 -0
- package/tests/fixtures_attended_results/standalone/files-tokens/fixture_zig.zig.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_c.c.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_cpp.cpp.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_csharp.cs.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_elixir.ex.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_go.go.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_haskell.hs.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_java.java.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_javascript.js.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_kotlin.kt.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_lua.lua.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_perl.pl.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_php.php.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_python.py.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_ruby.rb.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_rust.rs.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_scala.scala.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_shell.sh.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_swift.swift.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_typescript.ts.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-command/fixture_zig.zig.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_c.c.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_cpp.cpp.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_csharp.cs.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_elixir.ex.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_go.go.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_haskell.hs.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_java.java.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_javascript.js.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_kotlin.kt.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_lua.lua.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_perl.pl.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_php.php.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_python.py.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_ruby.rb.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_rust.rs.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_scala.scala.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_shell.sh.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_swift.swift.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_typescript.ts.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-dummy/fixture_zig.zig.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_c.c.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_cpp.cpp.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_csharp.cs.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_elixir.ex.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_go.go.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_haskell.hs.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_java.java.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_javascript.js.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_kotlin.kt.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_lua.lua.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_perl.pl.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_php.php.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_python.py.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_ruby.rb.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_rust.rs.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_scala.scala.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_shell.sh.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_swift.swift.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_typescript.ts.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_zig.zig.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_c.c.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_cpp.cpp.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_csharp.cs.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_elixir.ex.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_go.go.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_haskell.hs.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_java.java.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_javascript.js.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_kotlin.kt.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_lua.lua.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_perl.pl.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_php.php.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_python.py.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_ruby.rb.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_rust.rs.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_scala.scala.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_shell.sh.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_swift.swift.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_typescript.ts.json +5 -0
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_zig.zig.json +5 -0
- package/tests/helpers.ts +204 -0
- package/tests/oracle-project.test.ts +63 -0
- package/tests/oracle-standalone.test.ts +48 -0
- package/tests/prompt-rendering.test.ts +66 -0
- package/tests/release-workflow.test.ts +133 -0
package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_elixir.ex.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
{
|
|
2
|
+
"code": 0,
|
|
3
|
+
"stdout": "@@@ tests/fixtures/fixture_elixir.ex | elixir\n\n### MODULE: `MyApp.Server`\n> Signature: `defmodule MyApp.Server do`\n> Lines: 10-183\n```\n10: defmodule MyApp.Server do\n11: @moduledoc \"\"\"\n12: GenServer implementation for managing application state.\n14: Handles synchronous calls, asynchronous casts, and info messages.\n15: Supports state initialization with validated options.\n16: \"\"\"\n18: use GenServer\n19: import Enum\n20: alias MyApp.Config\n21: alias MyApp.Server.State\n22: require Logger\n24: @behaviour GenServer\n29: @default_timeout 5_000\n32: @max_items 1_000\n36: @doc \"\"\"\n37: Internal state struct for the server.\n39: @field name Server instance name.\n40: @field port Listening port number.\n41: @field items List of stored items.\n42: @field started_at Timestamp of server start.\n43: \"\"\"\n44: defstruct [:name, :port, items: [], started_at: nil]\n48: @type t :: %__MODULE__{\n49: name: String.t(),\n50: port: non_neg_integer(),\n51: items: list(any()),\n52: started_at: DateTime.t() | nil\n53: }\n55: @type option :: {:name, String.t()} | {:port, non_neg_integer()}\n59: @doc \"\"\"\n60: Start a new server process linked to the caller.\n62: @param opts Keyword list of options (:name, :port).\n63: @return {:ok, pid} on success or {:error, reason} on failure.\n64: \"\"\"\n65: @spec start_link(keyword()) :: GenServer.on_start()\n66: def start_link(opts) do\n67: name = Keyword.get(opts, :name, \"default\")\n68: GenServer.start_link(__MODULE__, opts, name: via_tuple(name))\n69: end\n71: @doc \"\"\"\n72: Add an item to the server's collection.\n74: @param server The server PID or registered name.\n75: @param item The item to store.\n76: @return :ok\n77: \"\"\"\n78: @spec add_item(GenServer.server(), any()) :: :ok\n79: def add_item(server, item) do\n80: GenServer.call(server, {:add_item, item})\n81: end\n83: @doc \"\"\"\n84: Retrieve all stored items.\n86: @param server The server PID or registered name.\n87: @return List of stored items.\n88: \"\"\"\n89: @spec get_items(GenServer.server()) :: list(any())\n90: def get_items(server) do\n91: GenServer.call(server, :get_items)\n92: end\n94: @doc \"\"\"\n95: Asynchronously notify the server of an event.\n97: @param server The server PID.\n98: @param event The event data to process.\n99: @return :ok\n100: \"\"\"\n101: @spec notify(GenServer.server(), any()) :: :ok\n102: def notify(server, event) do\n103: GenServer.cast(server, {:notify, event})\n104: end\n111: defp via_tuple(name) do\n112: {:via, Registry, {MyApp.Registry, name}}\n113: end\n117: @impl true\n118: def init(opts) do\n120: name = Keyword.fetch!(opts, :name)\n121: port = Keyword.get(opts, :port, 4000)\n123: state = %__MODULE__{\n124: name: name,\n125: port: port,\n126: started_at: DateTime.utc_now()\n127: }\n129: Logger.info(\"Server #{name} started on port #{port}\")\n130: {:ok, state}\n131: end\n133: @impl true\n134: def handle_call({:add_item, item}, _from, state) do\n136: if length(state.items) >= @max_items do\n137: {:reply, {:error, :capacity_exceeded}, state}\n138: else\n139: new_state = %{state | items: [item | state.items]}\n140: {:reply, :ok, new_state}\n141: end\n142: end\n144: @impl true\n145: def handle_call(:get_items, _from, state) do\n146: {:reply, Enum.reverse(state.items), state}\n147: end\n149: @impl true\n150: def handle_cast({:notify, event}, state) do\n151: Logger.debug(\"Received event: #{inspect(event)}\")\n152: {:noreply, state}\n153: end\n155: @impl true\n156: def handle_info(:timeout, state) do\n157: Logger.warn(\"Server #{state.name} timed out\")\n158: {:noreply, state}\n159: end\n164: defp handle_internal(state) do\n166: pruned = Enum.take(state.items, @max_items)\n167: %{state | items: pruned}\n168: end\n170: @doc \"\"\"\n171: Define a macro for compile-time code generation.\n173: @param expr The expression to wrap.\n174: @return Quoted AST wrapping the expression.\n175: \"\"\"\n176: defmacro my_macro(expr) do\n177: quote do\n178: result = unquote(expr)\n179: Logger.debug(\"Macro result: #{inspect(result)}\")\n180: result\n181: end\n182: end\n183: end\n```\n\n### IMPORT: `GenServer`\n> Lines: 18-18\n```\n18: use GenServer\n```\n\n### IMPORT: `Enum`\n> Lines: 19-19\n```\n19: import Enum\n```\n\n### IMPORT: `MyApp.Config`\n> Lines: 20-20\n```\n20: alias MyApp.Config\n```\n\n### IMPORT: `MyApp.Server.State`\n> Lines: 21-21\n```\n21: alias MyApp.Server.State\n```\n\n### IMPORT: `Logger`\n> Lines: 22-22\n```\n22: require Logger\n```\n\n### STRUCT: `[:name, :port, items: [], started_at: nil]`\n> Signature: `defstruct [:name, :port, items: [], started_at: nil]`\n> Lines: 44-69\n- @brief Maximum items stored in server state.\n```\n44: defstruct [:name, :port, items: [], started_at: nil]\n48: @type t :: %__MODULE__{\n49: name: String.t(),\n50: port: non_neg_integer(),\n51: items: list(any()),\n52: started_at: DateTime.t() | nil\n53: }\n55: @type option :: {:name, String.t()} | {:port, non_neg_integer()}\n59: @doc \"\"\"\n60: Start a new server process linked to the caller.\n62: @param opts Keyword list of options (:name, :port).\n63: @return {:ok, pid} on success or {:error, reason} on failure.\n64: \"\"\"\n65: @spec start_link(keyword()) :: GenServer.on_start()\n66: def start_link(opts) do\n67: name = Keyword.get(opts, :name, \"default\")\n68: GenServer.start_link(__MODULE__, opts, name: via_tuple(name))\n69: end\n```\n\n### FUNCTION: `start_link`\n> Signature: `def start_link(opts) do`\n> Lines: 66-69\n```\n66: def start_link(opts) do\n67: name = Keyword.get(opts, :name, \"default\")\n68: GenServer.start_link(__MODULE__, opts, name: via_tuple(name))\n69: end\n```\n\n### FUNCTION: `add_item`\n> Signature: `def add_item(server, item) do`\n> Lines: 79-81\n```\n79: def add_item(server, item) do\n80: GenServer.call(server, {:add_item, item})\n81: end\n```\n\n### FUNCTION: `get_items`\n> Signature: `def get_items(server) do`\n> Lines: 90-92\n```\n90: def get_items(server) do\n91: GenServer.call(server, :get_items)\n92: end\n```\n\n### FUNCTION: `notify`\n> Signature: `def notify(server, event) do`\n> Lines: 102-104\n```\n102: def notify(server, event) do\n103: GenServer.cast(server, {:notify, event})\n104: end\n```\n\n### FUNCTION: `via_tuple`\n> Signature: `defp via_tuple(name) do`\n> Lines: 111-113\n- @brief Generate a via-tuple for process registration.\n- @param name The server name.\n- @return Via-tuple for Registry lookup.\n```\n111: defp via_tuple(name) do\n112: {:via, Registry, {MyApp.Registry, name}}\n113: end\n```\n\n### FUNCTION: `init`\n> Signature: `def init(opts) do`\n> Lines: 118-131\n```\n118: def init(opts) do\n120: name = Keyword.fetch!(opts, :name)\n121: port = Keyword.get(opts, :port, 4000)\n123: state = %__MODULE__{\n124: name: name,\n125: port: port,\n126: started_at: DateTime.utc_now()\n127: }\n129: Logger.info(\"Server #{name} started on port #{port}\")\n130: {:ok, state}\n131: end\n```\n\n### FUNCTION: `handle_call`\n> Signature: `def handle_call({:add_item, item}, _from, state) do`\n> Lines: 134-142\n```\n134: def handle_call({:add_item, item}, _from, state) do\n136: if length(state.items) >= @max_items do\n137: {:reply, {:error, :capacity_exceeded}, state}\n138: else\n139: new_state = %{state | items: [item | state.items]}\n140: {:reply, :ok, new_state}\n141: end\n142: end\n```\n\n### FUNCTION: `handle_call`\n> Signature: `def handle_call(:get_items, _from, state) do`\n> Lines: 145-147\n```\n145: def handle_call(:get_items, _from, state) do\n146: {:reply, Enum.reverse(state.items), state}\n147: end\n```\n\n### FUNCTION: `handle_cast`\n> Signature: `def handle_cast({:notify, event}, state) do`\n> Lines: 150-153\n```\n150: def handle_cast({:notify, event}, state) do\n151: Logger.debug(\"Received event: #{inspect(event)}\")\n152: {:noreply, state}\n153: end\n```\n\n### FUNCTION: `handle_info`\n> Signature: `def handle_info(:timeout, state) do`\n> Lines: 156-159\n```\n156: def handle_info(:timeout, state) do\n157: Logger.warn(\"Server #{state.name} timed out\")\n158: {:noreply, state}\n159: end\n```\n\n### FUNCTION: `handle_internal`\n> Signature: `defp handle_internal(state) do`\n> Lines: 164-168\n- @brief Handle internal state cleanup and maintenance.\n- @param state Current server state.\n- @return Updated state with pruned items.\n```\n164: defp handle_internal(state) do\n166: pruned = Enum.take(state.items, @max_items)\n167: %{state | items: pruned}\n168: end\n```\n\n### FUNCTION: `my_macro`\n> Signature: `defmacro my_macro(expr) do`\n> Lines: 176-182\n```\n176: defmacro my_macro(expr) do\n177: quote do\n178: result = unquote(expr)\n179: Logger.debug(\"Macro result: #{inspect(result)}\")\n180: result\n181: end\n182: end\n```\n\n### PROTOCOL: `Printable`\n> Signature: `defprotocol Printable do`\n> Lines: 187-200\n```\n187: defprotocol Printable do\n188: @moduledoc \"\"\"\n189: Protocol for types that can be printed as formatted strings.\n190: \"\"\"\n192: @doc \"\"\"\n193: Convert a value to its formatted string representation.\n195: @param data The value to format.\n196: @return Formatted string.\n197: \"\"\"\n198: @spec print(t) :: String.t()\n199: def print(data)\n200: end\n```\n\n### FUNCTION: `print`\n> Signature: `def print(data)`\n> Lines: 199-200\n```\n199: def print(data)\n200: end\n```\n\n### IMPL: `Printable`\n> Signature: `defimpl Printable, for: MyApp.Server do`\n> Lines: 204-214\n```\n204: defimpl Printable, for: MyApp.Server do\n205: @doc \"\"\"\n206: Format a server struct for display.\n208: @param server The server struct to format.\n209: @return String in format \"Server(name:port)\".\n210: \"\"\"\n211: def print(server) do\n212: \"Server(#{server.name}:#{server.port})\"\n213: end\n214: end\n```\n\n### FUNCTION: `print`\n> Signature: `def print(server) do`\n> Lines: 211-213\n```\n211: def print(server) do\n212: \"Server(#{server.name}:#{server.port})\"\n213: end\n```\n\n### IMPL: `Printable`\n> Signature: `defimpl Printable, for: BitString do`\n> Lines: 216-220\n```\n216: defimpl Printable, for: BitString do\n217: def print(str) do\n218: \"String(#{str})\"\n219: end\n220: end\n```\n\n### FUNCTION: `print`\n> Signature: `def print(str) do`\n> Lines: 217-219\n```\n217: def print(str) do\n218: \"String(#{str})\"\n219: end\n```\n\n### MODULE: `MyApp.Utils`\n> Signature: `defmodule MyApp.Utils do`\n> Lines: 224-296\n```\n224: defmodule MyApp.Utils do\n225: @moduledoc \"\"\"\n226: Utility functions demonstrating pattern matching, guards,\n227: pipe operators, and comprehensions.\n228: \"\"\"\n230: @doc \"\"\"\n231: Classify a value using guard clauses and pattern matching.\n233: @param value The value to classify.\n234: @return Atom describing the value's category.\n235: \"\"\"\n236: @spec classify(any()) :: atom()\n237: def classify(value) when is_integer(value) and value > 0, do: :positive\n238: def classify(value) when is_integer(value) and value < 0, do: :negative\n239: def classify(0), do: :zero\n240: def classify(value) when is_binary(value), do: :string\n241: def classify(value) when is_list(value), do: :list\n242: def classify(_), do: :unknown\n244: @doc \"\"\"\n245: Process a list using pipe operator for data transformation.\n247: @param items List of strings to process.\n248: @return Sorted list of unique uppercase strings.\n249: \"\"\"\n250: @spec process_list(list(String.t())) :: list(String.t())\n251: def process_list(items) do\n252: items\n253: |> Enum.map(&String.trim/1)\n254: |> Enum.reject(&(&1 == \"\"))\n255: |> Enum.map(&String.upcase/1)\n256: |> Enum.uniq()\n257: |> Enum.sort()\n258: end\n260: @doc \"\"\"\n261: Demonstrate for-comprehension with multiple generators and filters.\n263: @param range Upper bound for the search space.\n264: @return List of Pythagorean triples.\n265: \"\"\"\n266: @spec pythagorean_triples(pos_integer()) :: list(tuple())\n267: def pythagorean_triples(range) do\n268: for a <- 1..range,\n269: b <- a..range,\n270: c <- b..range,\n271: a * a + b * b == c * c do\n272: {a, b, c}\n273: end\n274: end\n276: @doc \"\"\"\n277: Safe division returning :error tuple on zero divisor.\n279: @param a Dividend.\n280: @param b Divisor.\n281: @return {:ok, result} or {:error, :division_by_zero}.\n282: \"\"\"\n283: @spec safe_divide(number(), number()) :: {:ok, float()} | {:error, atom()}\n284: def safe_divide(_, 0), do: {:error, :division_by_zero}\n285: def safe_divide(a, b), do: {:ok, a / b}\n287: @doc \"\"\"\n288: Recursively compute factorial with guard clause.\n290: @param n Non-negative integer.\n291: @return Factorial of n.\n292: \"\"\"\n293: @spec factorial(non_neg_integer()) :: pos_integer()\n294: def factorial(0), do: 1\n295: def factorial(n) when n > 0, do: n * factorial(n - 1)\n296: end\n```\n\n### FUNCTION: `classify`\n> Signature: `def classify(value) when is_integer(value) and value > 0, do: :positive`\n> Lines: 237-258\n```\n237: def classify(value) when is_integer(value) and value > 0, do: :positive\n238: def classify(value) when is_integer(value) and value < 0, do: :negative\n239: def classify(0), do: :zero\n240: def classify(value) when is_binary(value), do: :string\n241: def classify(value) when is_list(value), do: :list\n242: def classify(_), do: :unknown\n244: @doc \"\"\"\n245: Process a list using pipe operator for data transformation.\n247: @param items List of strings to process.\n248: @return Sorted list of unique uppercase strings.\n249: \"\"\"\n250: @spec process_list(list(String.t())) :: list(String.t())\n251: def process_list(items) do\n252: items\n253: |> Enum.map(&String.trim/1)\n254: |> Enum.reject(&(&1 == \"\"))\n255: |> Enum.map(&String.upcase/1)\n256: |> Enum.uniq()\n257: |> Enum.sort()\n258: end\n```\n\n### FUNCTION: `classify`\n> Signature: `def classify(value) when is_integer(value) and value < 0, do: :negative`\n> Lines: 238-258\n```\n238: def classify(value) when is_integer(value) and value < 0, do: :negative\n239: def classify(0), do: :zero\n240: def classify(value) when is_binary(value), do: :string\n241: def classify(value) when is_list(value), do: :list\n242: def classify(_), do: :unknown\n244: @doc \"\"\"\n245: Process a list using pipe operator for data transformation.\n247: @param items List of strings to process.\n248: @return Sorted list of unique uppercase strings.\n249: \"\"\"\n250: @spec process_list(list(String.t())) :: list(String.t())\n251: def process_list(items) do\n252: items\n253: |> Enum.map(&String.trim/1)\n254: |> Enum.reject(&(&1 == \"\"))\n255: |> Enum.map(&String.upcase/1)\n256: |> Enum.uniq()\n257: |> Enum.sort()\n258: end\n```\n\n### FUNCTION: `classify`\n> Signature: `def classify(0), do: :zero`\n> Lines: 239-258\n```\n239: def classify(0), do: :zero\n240: def classify(value) when is_binary(value), do: :string\n241: def classify(value) when is_list(value), do: :list\n242: def classify(_), do: :unknown\n244: @doc \"\"\"\n245: Process a list using pipe operator for data transformation.\n247: @param items List of strings to process.\n248: @return Sorted list of unique uppercase strings.\n249: \"\"\"\n250: @spec process_list(list(String.t())) :: list(String.t())\n251: def process_list(items) do\n252: items\n253: |> Enum.map(&String.trim/1)\n254: |> Enum.reject(&(&1 == \"\"))\n255: |> Enum.map(&String.upcase/1)\n256: |> Enum.uniq()\n257: |> Enum.sort()\n258: end\n```\n\n### FUNCTION: `classify`\n> Signature: `def classify(value) when is_binary(value), do: :string`\n> Lines: 240-258\n```\n240: def classify(value) when is_binary(value), do: :string\n241: def classify(value) when is_list(value), do: :list\n242: def classify(_), do: :unknown\n244: @doc \"\"\"\n245: Process a list using pipe operator for data transformation.\n247: @param items List of strings to process.\n248: @return Sorted list of unique uppercase strings.\n249: \"\"\"\n250: @spec process_list(list(String.t())) :: list(String.t())\n251: def process_list(items) do\n252: items\n253: |> Enum.map(&String.trim/1)\n254: |> Enum.reject(&(&1 == \"\"))\n255: |> Enum.map(&String.upcase/1)\n256: |> Enum.uniq()\n257: |> Enum.sort()\n258: end\n```\n\n### FUNCTION: `classify`\n> Signature: `def classify(value) when is_list(value), do: :list`\n> Lines: 241-258\n```\n241: def classify(value) when is_list(value), do: :list\n242: def classify(_), do: :unknown\n244: @doc \"\"\"\n245: Process a list using pipe operator for data transformation.\n247: @param items List of strings to process.\n248: @return Sorted list of unique uppercase strings.\n249: \"\"\"\n250: @spec process_list(list(String.t())) :: list(String.t())\n251: def process_list(items) do\n252: items\n253: |> Enum.map(&String.trim/1)\n254: |> Enum.reject(&(&1 == \"\"))\n255: |> Enum.map(&String.upcase/1)\n256: |> Enum.uniq()\n257: |> Enum.sort()\n258: end\n```\n\n### FUNCTION: `classify`\n> Signature: `def classify(_), do: :unknown`\n> Lines: 242-258\n```\n242: def classify(_), do: :unknown\n244: @doc \"\"\"\n245: Process a list using pipe operator for data transformation.\n247: @param items List of strings to process.\n248: @return Sorted list of unique uppercase strings.\n249: \"\"\"\n250: @spec process_list(list(String.t())) :: list(String.t())\n251: def process_list(items) do\n252: items\n253: |> Enum.map(&String.trim/1)\n254: |> Enum.reject(&(&1 == \"\"))\n255: |> Enum.map(&String.upcase/1)\n256: |> Enum.uniq()\n257: |> Enum.sort()\n258: end\n```\n\n### FUNCTION: `process_list`\n> Signature: `def process_list(items) do`\n> Lines: 251-258\n```\n251: def process_list(items) do\n252: items\n253: |> Enum.map(&String.trim/1)\n254: |> Enum.reject(&(&1 == \"\"))\n255: |> Enum.map(&String.upcase/1)\n256: |> Enum.uniq()\n257: |> Enum.sort()\n258: end\n```\n\n### FUNCTION: `pythagorean_triples`\n> Signature: `def pythagorean_triples(range) do`\n> Lines: 267-274\n```\n267: def pythagorean_triples(range) do\n268: for a <- 1..range,\n269: b <- a..range,\n270: c <- b..range,\n271: a * a + b * b == c * c do\n272: {a, b, c}\n273: end\n274: end\n```\n\n### FUNCTION: `safe_divide`\n> Signature: `def safe_divide(_, 0), do: {:error, :division_by_zero}`\n> Lines: 284-296\n```\n284: def safe_divide(_, 0), do: {:error, :division_by_zero}\n285: def safe_divide(a, b), do: {:ok, a / b}\n287: @doc \"\"\"\n288: Recursively compute factorial with guard clause.\n290: @param n Non-negative integer.\n291: @return Factorial of n.\n292: \"\"\"\n293: @spec factorial(non_neg_integer()) :: pos_integer()\n294: def factorial(0), do: 1\n295: def factorial(n) when n > 0, do: n * factorial(n - 1)\n296: end\n```\n\n### FUNCTION: `safe_divide`\n> Signature: `def safe_divide(a, b), do: {:ok, a / b}`\n> Lines: 285-296\n```\n285: def safe_divide(a, b), do: {:ok, a / b}\n287: @doc \"\"\"\n288: Recursively compute factorial with guard clause.\n290: @param n Non-negative integer.\n291: @return Factorial of n.\n292: \"\"\"\n293: @spec factorial(non_neg_integer()) :: pos_integer()\n294: def factorial(0), do: 1\n295: def factorial(n) when n > 0, do: n * factorial(n - 1)\n296: end\n```\n\n### FUNCTION: `factorial`\n> Signature: `def factorial(0), do: 1`\n> Lines: 294-296\n```\n294: def factorial(0), do: 1\n295: def factorial(n) when n > 0, do: n * factorial(n - 1)\n296: end\n```\n\n### FUNCTION: `factorial`\n> Signature: `def factorial(n) when n > 0, do: n * factorial(n - 1)`\n> Lines: 295-296\n```\n295: def factorial(n) when n > 0, do: n * factorial(n - 1)\n296: end\n```\n\n### MODULE: `MyApp.Plugin`\n> Signature: `defmodule MyApp.Plugin do`\n> Lines: 300-315\n```\n300: defmodule MyApp.Plugin do\n301: @moduledoc \"\"\"\n302: Behaviour defining the plugin interface.\n303: \"\"\"\n305: @doc \"Initialize the plugin with configuration options.\"\n306: @callback init(opts :: keyword()) :: {:ok, any()} | {:error, String.t()}\n308: @doc \"Execute the plugin's main logic.\"\n309: @callback execute(state :: any()) :: :ok | {:error, String.t()}\n311: @doc \"Clean up plugin resources.\"\n312: @callback cleanup(state :: any()) :: :ok\n314: @optional_callbacks [cleanup: 1]\n315: end\n```\n\n### MODULE: `MyApp.Extra`\n> Signature: `defmodule MyApp.Extra do`\n> Lines: 318-321\n```\n318: defmodule MyApp.Extra do\n320: defstruct [:name]\n321: end\n```\n\n### STRUCT: `[:name]`\n> Signature: `defstruct [:name]`\n> Lines: 320-321\n```\n320: defstruct [:name]\n321: end\n```\n\n### MODULE: `MyApp.Audit`\n> Signature: `defmodule MyApp.Audit do`\n> Lines: 323-325\n```\n323: defmodule MyApp.Audit do\n324: defstruct [:id]\n325: end\n```\n\n### STRUCT: `[:id]`\n> Signature: `defstruct [:id]`\n> Lines: 324-325\n```\n324: defstruct [:id]\n325: end\n```\n\n### MODULE: `MyApp.State`\n> Signature: `defmodule MyApp.State do`\n> Lines: 327-329\n```\n327: defmodule MyApp.State do\n328: defstruct [:status]\n329: end\n```\n\n### STRUCT: `[:status]`\n> Signature: `defstruct [:status]`\n> Lines: 328-329\n```\n328: defstruct [:status]\n329: end\n```\n\n### MODULE: `MyApp.Payload`\n> Signature: `defmodule MyApp.Payload do`\n> Lines: 331-333\n```\n331: defmodule MyApp.Payload do\n332: defstruct [:value]\n333: end\n```\n\n### STRUCT: `[:value]`\n> Signature: `defstruct [:value]`\n> Lines: 332-333\n```\n332: defstruct [:value]\n333: end\n```\n\n### MODULE: `MyApp.Context`\n> Signature: `defmodule MyApp.Context do`\n> Lines: 335-337\n```\n335: defmodule MyApp.Context do\n336: defstruct [:meta]\n337: end\n```\n\n### STRUCT: `[:meta]`\n> Signature: `defstruct [:meta]`\n> Lines: 336-337\n```\n336: defstruct [:meta]\n337: end\n```\n\n### PROTOCOL: `Auditable`\n> Signature: `defprotocol Auditable do`\n> Lines: 339-341\n```\n339: defprotocol Auditable do\n340: def audit(data)\n341: end\n```\n\n### FUNCTION: `audit`\n> Signature: `def audit(data)`\n> Lines: 340-341\n```\n340: def audit(data)\n341: end\n```\n\n### PROTOCOL: `Renderable`\n> Signature: `defprotocol Renderable do`\n> Lines: 343-345\n```\n343: defprotocol Renderable do\n344: def render(data)\n345: end\n```\n\n### FUNCTION: `render`\n> Signature: `def render(data)`\n> Lines: 344-345\n```\n344: def render(data)\n345: end\n```\n\n### PROTOCOL: `Parsable`\n> Signature: `defprotocol Parsable do`\n> Lines: 347-349\n```\n347: defprotocol Parsable do\n348: def parse(data)\n349: end\n```\n\n### FUNCTION: `parse`\n> Signature: `def parse(data)`\n> Lines: 348-349\n```\n348: def parse(data)\n349: end\n```\n\n### PROTOCOL: `Validatable`\n> Signature: `defprotocol Validatable do`\n> Lines: 351-353\n```\n351: defprotocol Validatable do\n352: def validate(data)\n353: end\n```\n\n### FUNCTION: `validate`\n> Signature: `def validate(data)`\n> Lines: 352-353\n```\n352: def validate(data)\n353: end\n```\n\n### IMPL: `Auditable`\n> Signature: `defimpl Auditable, for: Any do`\n> Lines: 355-357\n```\n355: defimpl Auditable, for: Any do\n356: def audit(data), do: data\n357: end\n```\n\n### FUNCTION: `audit`\n> Signature: `def audit(data), do: data`\n> Lines: 356-357\n```\n356: def audit(data), do: data\n357: end\n```\n\n### IMPL: `Renderable`\n> Signature: `defimpl Renderable, for: Any do`\n> Lines: 359-361\n```\n359: defimpl Renderable, for: Any do\n360: def render(data), do: data\n361: end\n```\n\n### FUNCTION: `render`\n> Signature: `def render(data), do: data`\n> Lines: 360-361\n```\n360: def render(data), do: data\n361: end\n```\n\n### IMPL: `Parsable`\n> Signature: `defimpl Parsable, for: Any do`\n> Lines: 363-365\n```\n363: defimpl Parsable, for: Any do\n364: def parse(data), do: data\n365: end\n```\n\n### FUNCTION: `parse`\n> Signature: `def parse(data), do: data`\n> Lines: 364-365\n```\n364: def parse(data), do: data\n365: end\n```\n\n### IMPL: `Validatable`\n> Signature: `defimpl Validatable, for: Any do`\n> Lines: 367-369\n```\n367: defimpl Validatable, for: Any do\n368: def validate(data), do: data\n369: end\n```\n\n### FUNCTION: `validate`\n> Signature: `def validate(data), do: data`\n> Lines: 368-369\n```\n368: def validate(data), do: data\n369: end\n```\n\n### MODULE: `ReqCoverElixir`\n> Signature: `defmodule ReqCoverElixir do`\n> Lines: 372-408\n- @brief Coverage helper construct 1.\n- @details Provides deterministic fixture-level Doxygen coverage block 1.\n```\n372: defmodule ReqCoverElixir do\n378: def req_cover_elixir_1(value), do: value + 1\n385: def req_cover_elixir_2(value), do: value + 2\n392: def req_cover_elixir_3(value), do: value + 3\n399: def req_cover_elixir_4(value), do: value + 4\n406: def req_cover_elixir_5(value), do: value + 5\n408: end\n```\n\n### FUNCTION: `req_cover_elixir_1`\n> Signature: `def req_cover_elixir_1(value), do: value + 1`\n> Lines: 378-408\n- @brief Coverage helper construct 1.\n- @brief Coverage helper construct 2.\n- @details Provides deterministic fixture-level Doxygen coverage block 1.\n- @param value Input value for helper construct 1.\n- @return Output value for helper construct 1.\n```\n378: def req_cover_elixir_1(value), do: value + 1\n385: def req_cover_elixir_2(value), do: value + 2\n392: def req_cover_elixir_3(value), do: value + 3\n399: def req_cover_elixir_4(value), do: value + 4\n406: def req_cover_elixir_5(value), do: value + 5\n408: end\n```\n\n### FUNCTION: `req_cover_elixir_2`\n> Signature: `def req_cover_elixir_2(value), do: value + 2`\n> Lines: 385-408\n- @brief Coverage helper construct 2.\n- @brief Coverage helper construct 3.\n- @details Provides deterministic fixture-level Doxygen coverage block 2.\n- @param value Input value for helper construct 2.\n- @return Output value for helper construct 2.\n```\n385: def req_cover_elixir_2(value), do: value + 2\n392: def req_cover_elixir_3(value), do: value + 3\n399: def req_cover_elixir_4(value), do: value + 4\n406: def req_cover_elixir_5(value), do: value + 5\n408: end\n```\n\n### FUNCTION: `req_cover_elixir_3`\n> Signature: `def req_cover_elixir_3(value), do: value + 3`\n> Lines: 392-408\n- @brief Coverage helper construct 3.\n- @brief Coverage helper construct 4.\n- @details Provides deterministic fixture-level Doxygen coverage block 3.\n- @param value Input value for helper construct 3.\n- @return Output value for helper construct 3.\n```\n392: def req_cover_elixir_3(value), do: value + 3\n399: def req_cover_elixir_4(value), do: value + 4\n406: def req_cover_elixir_5(value), do: value + 5\n408: end\n```\n\n### FUNCTION: `req_cover_elixir_4`\n> Signature: `def req_cover_elixir_4(value), do: value + 4`\n> Lines: 399-408\n- @brief Coverage helper construct 4.\n- @brief Coverage helper construct 5.\n- @details Provides deterministic fixture-level Doxygen coverage block 4.\n- @param value Input value for helper construct 4.\n- @return Output value for helper construct 4.\n```\n399: def req_cover_elixir_4(value), do: value + 4\n406: def req_cover_elixir_5(value), do: value + 5\n408: end\n```\n\n### FUNCTION: `req_cover_elixir_5`\n> Signature: `def req_cover_elixir_5(value), do: value + 5`\n> Lines: 406-408\n- @brief Coverage helper construct 5.\n- @details Provides deterministic fixture-level Doxygen coverage block 5.\n- @param value Input value for helper construct 5.\n- @return Output value for helper construct 5.\n```\n406: def req_cover_elixir_5(value), do: value + 5\n408: end\n```\n",
|
|
4
|
+
"stderr": ""
|
|
5
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
{
|
|
2
|
+
"code": 0,
|
|
3
|
+
"stdout": "@@@ tests/fixtures/fixture_go.go | go\n\n### MODULE: `main`\n> Signature: `package main`\n> Lines: 12-48\n```\n12: package main\n14: import (\n15: \"context\"\n16: \"fmt\"\n17: \"io\"\n18: \"sync\"\n19: )\n24: const MaxSize = 100\n27: var globalVar = 0\n30: const (\n32: LogDebug = iota\n34: LogInfo\n36: LogError\n37: )\n43: type Server struct {\n44: Port int\n45: Host string\n46: sync.Mutex\n47: handlers map[string]HandlerFunc\n48: }\n```\n\n### IMPORT: `(`\n> Lines: 14-14\n```\n14: import (\n```\n\n### CONSTANT: `MaxSize`\n> Signature: `const MaxSize = 100`\n> Lines: 24-24\n```\n24: const MaxSize = 100\n```\n\n### CONSTANT: `globalVar`\n> Signature: `var globalVar = 0`\n> Lines: 27-27\n```\n27: var globalVar = 0\n```\n\n### STRUCT: `Server`\n> Signature: `type Server struct`\n> Lines: 43-48\n```\n43: type Server struct {\n44: Port int\n45: Host string\n46: sync.Mutex\n47: handlers map[string]HandlerFunc\n48: }\n```\n\n### TYPE_ALIAS: `HandlerFunc`\n> Signature: `type HandlerFunc func(ctx context.Context, req []byte) ([]byte, error)`\n> Lines: 51-51\n```\n51: type HandlerFunc func(ctx context.Context, req []byte) ([]byte, error)\n```\n\n### STRUCT: `Address`\n> Signature: `type Address struct`\n> Lines: 54-58\n```\n54: type Address struct {\n55: Street string\n56: City string\n57: Zip string\n58: }\n```\n\n### STRUCT: `Employee`\n> Signature: `type Employee struct`\n> Lines: 61-66\n```\n61: type Employee struct {\n62: Name string\n63: Age int\n64: Address\n65: Manager *Employee\n66: }\n```\n\n### INTERFACE: `Handler`\n> Signature: `type Handler interface`\n> Lines: 71-74\n```\n71: type Handler interface {\n73: Handle(ctx context.Context, data []byte) error\n74: }\n```\n\n### INTERFACE: `ReadWriteCloser`\n> Signature: `type ReadWriteCloser interface`\n> Lines: 77-81\n```\n77: type ReadWriteCloser interface {\n78: io.Reader\n79: io.Writer\n80: io.Closer\n81: }\n```\n\n### TYPE_ALIAS: `MyInt`\n> Signature: `type MyInt int`\n> Lines: 86-86\n```\n86: type MyInt int\n```\n\n### METHOD: `String`\n> Signature: `func (m MyInt) String() string`\n> Lines: 89-91\n```\n89: func (m MyInt) String() string {\n90: return fmt.Sprintf(\"MyInt(%d)\", int(m))\n91: }\n```\n\n### INTERFACE: `Ordered`\n> Signature: `type Ordered interface`\n> Lines: 104-106\n```\n104: type Ordered interface {\n105: ~int | ~float64 | ~string\n106: }\n```\n\n### FUNCTION: `main`\n> Signature: `func main()`\n> Lines: 111-113\n```\n111: func main() {\n112: fmt.Println(\"hello\")\n113: }\n```\n\n### FUNCTION: `init`\n> Signature: `func init()`\n> Lines: 116-119\n```\n116: func init() {\n118: globalVar = 1\n119: }\n```\n\n### METHOD: `Start`\n> Signature: `func (s *Server) Start() error`\n> Lines: 123-132\n```\n123: func (s *Server) Start() error {\n124: s.Lock()\n125: defer s.Unlock()\n127: if s.Port <= 0 {\n128: return fmt.Errorf(\"invalid port: %d\", s.Port)\n129: }\n130: fmt.Printf(\"Starting on %s:%d\\n\", s.Host, s.Port)\n131: return nil\n132: }\n```\n\n### METHOD: `Register`\n> Signature: `func (s *Server) Register(path string, handler HandlerFunc)`\n> Lines: 138-143\n- @param path The URL path to register.\n- @param handler The function to invoke for this path.\n```\n138: func (s *Server) Register(path string, handler HandlerFunc) {\n139: if s.handlers == nil {\n140: s.handlers = make(map[string]HandlerFunc)\n141: }\n142: s.handlers[path] = handler\n143: }\n```\n\n### FUNCTION: `Divide`\n> Signature: `func Divide(a, b int) (int, int, error)`\n> Lines: 180-185\n- @param a Dividend.\n- @param b Divisor; must not be zero.\n- @return Quotient and remainder, or error if b is zero.\n```\n180: func Divide(a, b int) (int, int, error) {\n181: if b == 0 {\n182: return 0, 0, fmt.Errorf(\"division by zero\")\n183: }\n184: return a / b, a % b, nil\n185: }\n```\n\n### FUNCTION: `ParseConfig`\n> Signature: `func ParseConfig(input string) (host string, port int, err error)`\n> Lines: 192-200\n- @param input Configuration string in \"host:port\" format.\n- @return Named host and port values, or error.\n```\n192: func ParseConfig(input string) (host string, port int, err error) {\n194: _, scanErr := fmt.Sscanf(input, \"%s:%d\", &host, &port)\n195: if scanErr != nil {\n196: err = scanErr\n197: return\n198: }\n199: return\n200: }\n```\n\n### FUNCTION: `Counter`\n> Signature: `func Counter() func() int`\n> Lines: 206-213\n- @return Closure yielding successive integer counts.\n```\n206: func Counter() func() int {\n207: count := 0\n208: return func() int {\n210: count++\n211: return count\n212: }\n213: }\n```\n\n### FUNCTION: `FanOut`\n> Signature: `func FanOut(items []string, workers int) <-chan string`\n> Lines: 221-243\n- @param items Slice of strings to process.\n- @param workers Number of concurrent worker goroutines.\n- @return Channel delivering processed results.\n```\n221: func FanOut(items []string, workers int) <-chan string {\n222: results := make(chan string, len(items))\n223: var wg sync.WaitGroup\n225: for i := 0; i < workers; i++ {\n226: wg.Add(1)\n227: go func(id int) {\n228: defer wg.Done()\n230: for _, item := range items {\n231: results <- fmt.Sprintf(\"[%d] %s\", id, item)\n232: }\n233: }(i)\n234: }\n237: go func() {\n238: wg.Wait()\n239: close(results)\n240: }()\n242: return results\n243: }\n```\n\n### CONSTANT: `wg`\n> Signature: `var wg sync.WaitGroup`\n> Lines: 223-223\n```\n223: var wg sync.WaitGroup\n```\n\n### FUNCTION: `Describe`\n> Signature: `func Describe(v interface{}) string`\n> Lines: 250-266\n- @param v Any value to describe.\n- @return Human-readable type description.\n```\n250: func Describe(v interface{}) string {\n251: switch val := v.(type) {\n252: case int:\n253: return fmt.Sprintf(\"int: %d\", val)\n254: case string:\n255: return fmt.Sprintf(\"string: %q\", val)\n256: case bool:\n257: if val {\n258: return \"bool: true\"\n259: }\n260: return \"bool: false\"\n261: case nil:\n262: return \"nil\"\n263: default:\n264: return fmt.Sprintf(\"unknown: %T\", val)\n265: }\n266: }\n```\n\n### FUNCTION: `SafeExecute`\n> Signature: `func SafeExecute(fn func()) (err error)`\n> Lines: 273-282\n- @param fn The function to execute safely.\n- @return Error if fn panicked, nil otherwise.\n```\n273: func SafeExecute(fn func()) (err error) {\n274: defer func() {\n275: if r := recover(); r != nil {\n277: err = fmt.Errorf(\"panic: %v\", r)\n278: }\n279: }()\n280: fn()\n281: return nil\n282: }\n```\n\n### MODULE: `utilx`\n> Signature: `package utilx`\n> Lines: 285-293\n```\n285: package utilx\n286: package configx\n287: package jobsx\n288: package metricx\n289: import \"os\"\n290: import \"time\"\n291: import \"strings\"\n292: import \"bytes\"\n293: func (s *Server) Stop() {}\n```\n\n### MODULE: `configx`\n> Signature: `package configx`\n> Lines: 286-293\n```\n286: package configx\n287: package jobsx\n288: package metricx\n289: import \"os\"\n290: import \"time\"\n291: import \"strings\"\n292: import \"bytes\"\n293: func (s *Server) Stop() {}\n```\n\n### MODULE: `jobsx`\n> Signature: `package jobsx`\n> Lines: 287-293\n```\n287: package jobsx\n288: package metricx\n289: import \"os\"\n290: import \"time\"\n291: import \"strings\"\n292: import \"bytes\"\n293: func (s *Server) Stop() {}\n```\n\n### MODULE: `metricx`\n> Signature: `package metricx`\n> Lines: 288-293\n```\n288: package metricx\n289: import \"os\"\n290: import \"time\"\n291: import \"strings\"\n292: import \"bytes\"\n293: func (s *Server) Stop() {}\n```\n\n### IMPORT: `\"os\"`\n> Lines: 289-289\n```\n289: import \"os\"\n```\n\n### IMPORT: `\"time\"`\n> Lines: 290-290\n```\n290: import \"time\"\n```\n\n### IMPORT: `\"strings\"`\n> Lines: 291-291\n```\n291: import \"strings\"\n```\n\n### IMPORT: `\"bytes\"`\n> Lines: 292-292\n```\n292: import \"bytes\"\n```\n\n### METHOD: `Stop`\n> Signature: `func (s *Server) Stop() {}`\n> Lines: 293-293\n```\n293: func (s *Server) Stop() {}\n```\n\n### METHOD: `Reset`\n> Signature: `func (s *Server) Reset() {}`\n> Lines: 294-294\n```\n294: func (s *Server) Reset() {}\n```\n\n### STRUCT: `Session`\n> Signature: `type Session struct { Id string }`\n> Lines: 295-295\n```\n295: type Session struct { Id string }\n```\n\n### STRUCT: `Bucket`\n> Signature: `type Bucket struct { Name string }`\n> Lines: 296-296\n```\n296: type Bucket struct { Name string }\n```\n\n### INTERFACE: `Closer`\n> Signature: `type Closer interface { Close() error }`\n> Lines: 297-297\n```\n297: type Closer interface { Close() error }\n```\n\n### INTERFACE: `Starter`\n> Signature: `type Starter interface { Start() error }`\n> Lines: 298-298\n```\n298: type Starter interface { Start() error }\n```\n\n### TYPE_ALIAS: `UserAlias`\n> Signature: `type UserAlias string`\n> Lines: 299-299\n```\n299: type UserAlias string\n```\n\n### TYPE_ALIAS: `Amount`\n> Signature: `type Amount int`\n> Lines: 300-300\n```\n300: type Amount int\n```\n\n### TYPE_ALIAS: `Resolver`\n> Signature: `type Resolver func(string) error`\n> Lines: 301-301\n```\n301: type Resolver func(string) error\n```\n\n### CONSTANT: `RetryCount`\n> Signature: `const RetryCount = 3`\n> Lines: 302-302\n```\n302: const RetryCount = 3\n```\n\n### CONSTANT: `LastError`\n> Signature: `var LastError error`\n> Lines: 303-303\n```\n303: var LastError error\n```\n\n### FUNCTION: `reqCoverGo1`\n> Signature: `func reqCoverGo1(value int) int { return value + 1 }`\n> Lines: 311-311\n- @brief Coverage helper construct 1.\n- @details Provides deterministic fixture-level Doxygen coverage block 1.\n- @param value Input value for helper construct 1.\n- @return Output value for helper construct 1.\n```\n311: func reqCoverGo1(value int) int { return value + 1 }\n```\n\n### FUNCTION: `reqCoverGo2`\n> Signature: `func reqCoverGo2(value int) int { return value + 2 }`\n> Lines: 318-318\n- @brief Coverage helper construct 2.\n- @details Provides deterministic fixture-level Doxygen coverage block 2.\n- @param value Input value for helper construct 2.\n- @return Output value for helper construct 2.\n```\n318: func reqCoverGo2(value int) int { return value + 2 }\n```\n\n### FUNCTION: `reqCoverGo3`\n> Signature: `func reqCoverGo3(value int) int { return value + 3 }`\n> Lines: 325-325\n- @brief Coverage helper construct 3.\n- @details Provides deterministic fixture-level Doxygen coverage block 3.\n- @param value Input value for helper construct 3.\n- @return Output value for helper construct 3.\n```\n325: func reqCoverGo3(value int) int { return value + 3 }\n```\n\n### FUNCTION: `reqCoverGo4`\n> Signature: `func reqCoverGo4(value int) int { return value + 4 }`\n> Lines: 332-332\n- @brief Coverage helper construct 4.\n- @details Provides deterministic fixture-level Doxygen coverage block 4.\n- @param value Input value for helper construct 4.\n- @return Output value for helper construct 4.\n```\n332: func reqCoverGo4(value int) int { return value + 4 }\n```\n\n### FUNCTION: `reqCoverGo5`\n> Signature: `func reqCoverGo5(value int) int { return value + 5 }`\n> Lines: 339-339\n- @brief Coverage helper construct 5.\n- @details Provides deterministic fixture-level Doxygen coverage block 5.\n- @param value Input value for helper construct 5.\n- @return Output value for helper construct 5.\n```\n339: func reqCoverGo5(value int) int { return value + 5 }\n```\n",
|
|
4
|
+
"stderr": ""
|
|
5
|
+
}
|
package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_haskell.hs.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
{
|
|
2
|
+
"code": 0,
|
|
3
|
+
"stdout": "@@@ tests/fixtures/fixture_haskell.hs | haskell\n\n### MODULE: `MyModule`\n> Signature: `module MyModule`\n> Lines: 11-21\n```\n11: module MyModule\n12: ( Name\n13: , Person(..)\n14: , Printable(..)\n15: , Expr(..)\n16: , greet\n17: , safeDiv\n18: , processList\n19: , fibonacci\n20: ) where\n```\n\n### IMPORT: `Data.List (sort, nub, intercalate)`\n> Lines: 22-22\n```\n22: import Data.List (sort, nub, intercalate)\n```\n\n### IMPORT: `Data.Maybe (fromMaybe, isJust)`\n> Lines: 23-23\n```\n23: import Data.Maybe (fromMaybe, isJust)\n```\n\n### IMPORT: `Data.Map as Map`\n> Lines: 24-24\n```\n24: import qualified Data.Map as Map\n```\n\n### IMPORT: `Control.Monad (when, unless, forM_)`\n> Lines: 25-25\n```\n25: import Control.Monad (when, unless, forM_)\n```\n\n### TYPE_ALIAS: `Name`\n> Signature: `type Name = String`\n> Lines: 30-30\n```\n30: type Name = String\n```\n\n### TYPE_ALIAS: `Config`\n> Signature: `type Config = Map.Map String Int`\n> Lines: 33-33\n```\n33: type Config = Map.Map String Int\n```\n\n### TYPE_ALIAS: `Transform`\n> Signature: `type Transform a = a -> a`\n> Lines: 36-36\n```\n36: type Transform a = a -> a\n```\n\n### STRUCT: `Person`\n> Signature: `data Person = Person`\n> Lines: 42-46\n```\n42: data Person = Person\n43: { personName :: String\n44: , personAge :: Int\n45: } deriving (Show, Eq, Ord)\n```\n\n### STRUCT: `Tree`\n> Signature: `data Tree a`\n> Lines: 49-53\n```\n49: data Tree a\n50: = Leaf\n51: | Node a (Tree a) (Tree a)\n52: deriving (Show, Eq)\n```\n\n### STRUCT: `Expr`\n> Signature: `data Expr`\n> Lines: 56-62\n```\n56: data Expr\n57: = Lit Double\n58: | Add Expr Expr\n59: | Mul Expr Expr\n60: | Neg Expr\n61: deriving (Show)\n```\n\n### STRUCT: `Result`\n> Signature: `data Result a`\n> Lines: 64-68\n```\n64: data Result a\n65: = Ok a\n66: | Err String\n67: deriving (Show)\n```\n\n### CLASS: `Printable`\n> Signature: `class Printable a where`\n> Lines: 72-79\n```\n72: class Printable a where\n74: printIt :: a -> String\n77: debugPrint :: a -> String\n78: debugPrint x = \"Debug: \" ++ printIt x\n```\n\n### CLASS: `Serializable`\n> Signature: `class Serializable a where`\n> Lines: 81-84\n```\n81: class Serializable a where\n83: serialize :: a -> [(String, String)]\n```\n\n### FUNCTION: `greet`\n> Signature: `greet :: String -> String`\n> Lines: 112-112\n```\n112: greet :: String -> String\n```\n\n### FUNCTION: `safeDiv`\n> Signature: `safeDiv :: Double -> Double -> Maybe Double`\n> Lines: 117-117\n```\n117: safeDiv :: Double -> Double -> Maybe Double\n```\n\n### FUNCTION: `eval`\n> Signature: `eval :: Expr -> Double`\n> Lines: 123-123\n```\n123: eval :: Expr -> Double\n```\n\n### FUNCTION: `processList`\n> Signature: `processList :: [Int] -> [Int]`\n> Lines: 131-131\n```\n131: processList :: [Int] -> [Int]\n```\n\n### FUNCTION: `fibonacci`\n> Signature: `fibonacci :: Int -> Integer`\n> Lines: 143-143\n```\n143: fibonacci :: Int -> Integer\n```\n\n### FUNCTION: `insertTree`\n> Signature: `insertTree :: (Ord a) => a -> Tree a -> Tree a`\n> Lines: 155-155\n```\n155: insertTree :: (Ord a) => a -> Tree a -> Tree a\n```\n\n### FUNCTION: `foldTree`\n> Signature: `foldTree :: (b -> a -> b) -> b -> Tree a -> b`\n> Lines: 164-164\n```\n164: foldTree :: (b -> a -> b) -> b -> Tree a -> b\n```\n\n### FUNCTION: `lookupConfig`\n> Signature: `lookupConfig :: Config -> String -> Int -> Int`\n> Lines: 173-173\n```\n173: lookupConfig :: Config -> String -> Int -> Int\n```\n\n### FUNCTION: `applyN`\n> Signature: `applyN :: Int -> Transform a -> a -> a`\n> Lines: 178-178\n```\n178: applyN :: Int -> Transform a -> a -> a\n```\n\n### FUNCTION: `formatPersons`\n> Signature: `formatPersons :: (Printable a) => [a] -> String`\n> Lines: 184-184\n```\n184: formatPersons :: (Printable a) => [a] -> String\n```\n\n### FUNCTION: `safeCompute`\n> Signature: `safeCompute :: Double -> Double -> Double -> Maybe Double`\n> Lines: 189-189\n```\n189: safeCompute :: Double -> Double -> Double -> Maybe Double\n```\n\n### MODULE: `Extra.One`\n> Signature: `module Extra.One where`\n> Lines: 197-197\n```\n197: module Extra.One where\n```\n\n### MODULE: `Extra.Two`\n> Signature: `module Extra.Two where`\n> Lines: 198-198\n```\n198: module Extra.Two where\n```\n\n### MODULE: `Extra.Three`\n> Signature: `module Extra.Three where`\n> Lines: 199-199\n```\n199: module Extra.Three where\n```\n\n### MODULE: `Extra.Four`\n> Signature: `module Extra.Four where`\n> Lines: 200-200\n```\n200: module Extra.Four where\n```\n\n### IMPORT: `Data.Set as Set`\n> Lines: 201-201\n```\n201: import qualified Data.Set as Set\n```\n\n### TYPE_ALIAS: `RequestId`\n> Signature: `type RequestId = Int`\n> Lines: 202-202\n```\n202: type RequestId = Int\n```\n\n### TYPE_ALIAS: `ResponseId`\n> Signature: `type ResponseId = Int`\n> Lines: 203-203\n```\n203: type ResponseId = Int\n```\n\n### CLASS: `Renderable`\n> Signature: `class Renderable a where`\n> Lines: 204-204\n```\n204: class Renderable a where\n```\n\n### CLASS: `Parsable`\n> Signature: `class Parsable a where`\n> Lines: 205-205\n```\n205: class Parsable a where\n```\n\n### CLASS: `Executable`\n> Signature: `class Executable a where`\n> Lines: 206-206\n```\n206: class Executable a where\n```\n\n### STRUCT: `Envelope`\n> Signature: `data Envelope = Envelope String`\n> Lines: 207-208\n```\n207: data Envelope = Envelope String\n```\n\n### FUNCTION: `reqCoverHaskell1`\n> Signature: `reqCoverHaskell1 :: Int -> Int`\n> Lines: 215-215\n- @brief Coverage helper construct 1.\n--\n- @details Provides deterministic fixture-level Doxygen coverage block 1.\n--\n- @param value Input value for helper construct 1.\n--\n- @return Output value for helper construct 1.\n```\n215: reqCoverHaskell1 :: Int -> Int\n```\n\n### FUNCTION: `reqCoverHaskell2`\n> Signature: `reqCoverHaskell2 :: Int -> Int`\n> Lines: 223-223\n- @brief Coverage helper construct 2.\n--\n- @details Provides deterministic fixture-level Doxygen coverage block 2.\n--\n- @param value Input value for helper construct 2.\n--\n- @return Output value for helper construct 2.\n```\n223: reqCoverHaskell2 :: Int -> Int\n```\n\n### FUNCTION: `reqCoverHaskell3`\n> Signature: `reqCoverHaskell3 :: Int -> Int`\n> Lines: 231-231\n- @brief Coverage helper construct 3.\n--\n- @details Provides deterministic fixture-level Doxygen coverage block 3.\n--\n- @param value Input value for helper construct 3.\n--\n- @return Output value for helper construct 3.\n```\n231: reqCoverHaskell3 :: Int -> Int\n```\n\n### FUNCTION: `reqCoverHaskell4`\n> Signature: `reqCoverHaskell4 :: Int -> Int`\n> Lines: 239-239\n- @brief Coverage helper construct 4.\n--\n- @details Provides deterministic fixture-level Doxygen coverage block 4.\n--\n- @param value Input value for helper construct 4.\n--\n- @return Output value for helper construct 4.\n```\n239: reqCoverHaskell4 :: Int -> Int\n```\n\n### FUNCTION: `reqCoverHaskell5`\n> Signature: `reqCoverHaskell5 :: Int -> Int`\n> Lines: 247-247\n- @brief Coverage helper construct 5.\n--\n- @details Provides deterministic fixture-level Doxygen coverage block 5.\n--\n- @param value Input value for helper construct 5.\n--\n- @return Output value for helper construct 5.\n```\n247: reqCoverHaskell5 :: Int -> Int\n```\n",
|
|
4
|
+
"stderr": ""
|
|
5
|
+
}
|
package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_java.java.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
{
|
|
2
|
+
"code": 0,
|
|
3
|
+
"stdout": "@@@ tests/fixtures/fixture_java.java | java\n- @brief Comprehensive Java test fixture for parser validation.\n- @details Covers generics with wildcards, sealed classes, records, inner classes,\nanonymous classes, lambdas, method references, switch expressions,\ntry-with-resources, annotations, and default interface methods.\n\n### MODULE: `com.example.app`\n> Signature: `package com.example.app`\n> Lines: 11-29\n```\n11: package com.example.app;\n13: import java.util.List;\n14: import java.util.Map;\n15: import java.util.Optional;\n16: import java.util.function.Function;\n17: import java.util.function.Predicate;\n18: import java.util.stream.Collectors;\n19: import static java.lang.Math.PI;\n27: @interface RequiresAuth {\n28: String role() default \"user\";\n29: }\n```\n\n### IMPORT: `java.util.List`\n> Lines: 13-13\n```\n13: import java.util.List;\n```\n\n### IMPORT: `java.util.Map`\n> Lines: 14-14\n```\n14: import java.util.Map;\n```\n\n### IMPORT: `java.util.Optional`\n> Lines: 15-15\n```\n15: import java.util.Optional;\n```\n\n### IMPORT: `java.util.function.Function`\n> Lines: 16-16\n```\n16: import java.util.function.Function;\n```\n\n### IMPORT: `java.util.function.Predicate`\n> Lines: 17-17\n```\n17: import java.util.function.Predicate;\n```\n\n### IMPORT: `java.util.stream.Collectors`\n> Lines: 18-18\n```\n18: import java.util.stream.Collectors;\n```\n\n### IMPORT: `java.lang.Math.PI`\n> Lines: 19-19\n```\n19: import static java.lang.Math.PI;\n```\n\n### DECORATOR: `interface`\n> Lines: 27-27\n- @brief Marks a method as requiring authentication before invocation.\n- @param role The minimum role level required for access.\n```\n27: @interface RequiresAuth {\n```\n\n### FUNCTION: `role`\n> Signature: `String role() default \"user\"`\n> Lines: 28-39\n```\n28: String role() default \"user\";\n29: }\n38: @SuppressWarnings(\"unchecked\")\n39: public class MyClass<T extends Comparable<T>> {\n```\n\n### DECORATOR: `SuppressWarnings(\"unchecked\")`\n> Lines: 38-38\n- @brief Primary class demonstrating various Java constructs.\n- @param <T> Generic type parameter for flexible data handling.\n```\n38: @SuppressWarnings(\"unchecked\")\n```\n\n### CLASS: `MyClass`\n> Signature: `public class MyClass<T extends Comparable<T>>`\n> Lines: 39-165\n- @brief Maximum buffer size constant.\n```\n39: public class MyClass<T extends Comparable<T>> {\n42: public static final int MAX_SIZE = 100;\n45: private List<T> items;\n51: public MyClass(List<T> items) {\n52: this.items = items;\n53: }\n59: public void greet(String name) {\n61: if (name == null) {\n62: return;\n63: }\n64: System.out.println(\"Hello, \" + name);\n65: }\n71: private static String helper() {\n72: return \"ok\";\n73: }\n80: public Optional<T> findFirst(Predicate<T> predicate) {\n81: for (T item : items) {\n83: if (predicate.test(item)) {\n84: return Optional.of(item);\n85: }\n86: }\n87: return Optional.empty();\n88: }\n96: public <R> List<R> map(Function<T, R> mapper) {\n97: return items.stream()\n98: .map(mapper)\n99: .collect(Collectors.toList());\n100: }\n107: public double sumWildcard(List<? extends Number> source) {\n108: double total = 0.0;\n109: for (Number n : source) {\n110: total += n.doubleValue();\n111: }\n112: return total;\n113: }\n121: public class Builder {\n122: private List<T> pending;\n129: public Builder add(T item) {\n130: pending.add(item);\n131: return this;\n132: }\n138: public MyClass<T> build() {\n139: return new MyClass<>(pending);\n140: }\n141: }\n149: public static class Config {\n151: public final String key;\n153: public final Object value;\n160: public Config(String key, Object value) {\n161: this.key = key;\n162: this.value = value;\n163: }\n164: }\n165: }\n```\n\n### CONSTANT: `MAX_SIZE`\n> Signature: `public static final int MAX_SIZE = 100`\n> Lines: 42-42\n- @brief Maximum buffer size constant. */\n```\n42: public static final int MAX_SIZE = 100;\n```\n\n### FUNCTION: `MyClass`\n> Signature: `public MyClass(List<T> items)`\n> Lines: 51-53\n- @brief Construct MyClass with an initial item list.\n- @param items The starting collection of items.\n```\n51: public MyClass(List<T> items) {\n52: this.items = items;\n53: }\n```\n\n### FUNCTION: `greet`\n> Signature: `public void greet(String name)`\n> Lines: 59-65\n- @brief Greet a person by name on standard output.\n- @param name The person's name; must not be null.\n```\n59: public void greet(String name) {\n61: if (name == null) {\n62: return;\n63: }\n64: System.out.println(\"Hello, \" + name);\n65: }\n```\n\n### FUNCTION: `helper`\n> Signature: `private static String helper()`\n> Lines: 71-73\n- @brief Helper method returning a status string.\n- @return Always returns \"ok\".\n```\n71: private static String helper() {\n72: return \"ok\";\n73: }\n```\n\n### FUNCTION: `findFirst`\n> Signature: `public Optional<T> findFirst(Predicate<T> predicate)`\n> Lines: 80-88\n- @brief Find the first item matching a predicate.\n- @param predicate Filter condition for items.\n- @return Optional containing the first match, or empty.\n```\n80: public Optional<T> findFirst(Predicate<T> predicate) {\n81: for (T item : items) {\n83: if (predicate.test(item)) {\n84: return Optional.of(item);\n85: }\n86: }\n87: return Optional.empty();\n88: }\n```\n\n### FUNCTION: `map`\n> Signature: `public <R> List<R> map(Function<T, R> mapper)`\n> Lines: 96-100\n- @brief Transform all items using a mapping function.\n- @param <R> The result type after transformation.\n- @param mapper Function to apply to each item.\n- @return List of transformed results.\n```\n96: public <R> List<R> map(Function<T, R> mapper) {\n97: return items.stream()\n98: .map(mapper)\n99: .collect(Collectors.toList());\n100: }\n```\n\n### FUNCTION: `sumWildcard`\n> Signature: `public double sumWildcard(List<? extends Number> source)`\n> Lines: 107-113\n- @brief Process items with a wildcard-bounded list.\n- @param source List of items extending Number.\n- @return Sum of all numeric values as double.\n```\n107: public double sumWildcard(List<? extends Number> source) {\n108: double total = 0.0;\n109: for (Number n : source) {\n110: total += n.doubleValue();\n111: }\n112: return total;\n113: }\n```\n\n### CLASS: `Builder`\n> Signature: `public class Builder`\n> Lines: 121-141\n- @brief Inner builder class for constructing MyClass instances.\n- @brief Add an item to the builder.\n- @param item Item to include in the built instance.\n- @return This builder for chaining.\n```\n121: public class Builder {\n122: private List<T> pending;\n129: public Builder add(T item) {\n130: pending.add(item);\n131: return this;\n132: }\n138: public MyClass<T> build() {\n139: return new MyClass<>(pending);\n140: }\n141: }\n```\n\n### FUNCTION: `add`\n> Signature: `public Builder add(T item)`\n> Lines: 129-132\n- @brief Add an item to the builder.\n- @param item Item to include in the built instance.\n- @return This builder for chaining.\n```\n129: public Builder add(T item) {\n130: pending.add(item);\n131: return this;\n132: }\n```\n\n### FUNCTION: `build`\n> Signature: `public MyClass<T> build()`\n> Lines: 138-140\n- @brief Finalize and create the MyClass instance.\n- @return A new MyClass populated with accumulated items.\n```\n138: public MyClass<T> build() {\n139: return new MyClass<>(pending);\n140: }\n```\n\n### CLASS: `Config`\n> Signature: `public static class Config`\n> Lines: 149-164\n- @brief Static configuration holder with validation.\n- @brief Configuration key string.\n- @brief Configuration value.\n```\n149: public static class Config {\n151: public final String key;\n153: public final Object value;\n160: public Config(String key, Object value) {\n161: this.key = key;\n162: this.value = value;\n163: }\n164: }\n```\n\n### FUNCTION: `Config`\n> Signature: `public Config(String key, Object value)`\n> Lines: 160-163\n- @brief Construct a Config entry.\n- @param key The configuration key.\n- @param value The associated value.\n```\n160: public Config(String key, Object value) {\n161: this.key = key;\n162: this.value = value;\n163: }\n```\n\n### INTERFACE: `Greeter`\n> Signature: `public interface Greeter`\n> Lines: 173-196\n- @brief Functional interface for greeting operations.\n- @brief Perform a greeting to the named person.\n- @param name Recipient of the greeting.\n```\n173: public interface Greeter {\n178: void sayHello(String name);\n184: default void sayGoodbye(String name) {\n185: System.out.println(\"Goodbye, \" + name);\n186: }\n192: static Greeter simple() {\n194: return name -> System.out.println(\"Hi, \" + name);\n195: }\n196: }\n```\n\n### FUNCTION: `sayHello`\n> Signature: `void sayHello(String name)`\n> Lines: 178-186\n- @brief Perform a greeting to the named person.\n- @brief Default farewell method with implementation.\n- @param name Recipient of the greeting.\n- @param name Person to bid farewell.\n```\n178: void sayHello(String name);\n184: default void sayGoodbye(String name) {\n185: System.out.println(\"Goodbye, \" + name);\n186: }\n```\n\n### FUNCTION: `simple`\n> Signature: `static Greeter simple()`\n> Lines: 192-195\n- @brief Static factory creating a simple Greeter.\n- @return A Greeter that prints to stdout.\n```\n192: static Greeter simple() {\n194: return name -> System.out.println(\"Hi, \" + name);\n195: }\n```\n\n### ENUM: `Color`\n> Signature: `public enum Color`\n> Lines: 204-230\n- @brief Color enum with associated hex values and behavior.\n- @brief Red color with hex #FF0000.\n- @brief Green color with hex #00FF00.\n```\n204: public enum Color {\n206: RED(\"#FF0000\"),\n208: GREEN(\"#00FF00\"),\n210: BLUE(\"#0000FF\");\n213: private final String hex;\n219: Color(String hex) {\n220: this.hex = hex;\n221: }\n227: public String getHex() {\n228: return hex;\n229: }\n230: }\n```\n\n### FUNCTION: `getHex`\n> Signature: `public String getHex()`\n> Lines: 227-229\n- @brief Get the hex code of this color.\n- @return Hex string including '#' prefix.\n```\n227: public String getHex() {\n228: return hex;\n229: }\n```\n\n### FUNCTION: `Point`\n> Signature: `public record Point(double x, double y)`\n> Lines: 240-261\n- @brief Immutable 2D coordinate record.\n- @brief Compact constructor validating coordinates.\n- @param x Horizontal coordinate.\n- @param y Vertical coordinate.\n- @throws IllegalArgumentException If either coordinate is NaN.\n```\n240: public record Point(double x, double y) {\n245: public Point {\n246: if (Double.isNaN(x) || Double.isNaN(y)) {\n247: throw new IllegalArgumentException(\"NaN coordinates\");\n248: }\n249: }\n256: public double distanceTo(Point other) {\n257: double dx = this.x - other.x;\n258: double dy = this.y - other.y;\n259: return Math.sqrt(dx * dx + dy * dy);\n260: }\n261: }\n```\n\n### FUNCTION: `distanceTo`\n> Signature: `public double distanceTo(Point other)`\n> Lines: 256-260\n- @brief Compute distance to another point.\n- @param other Target point.\n- @return Euclidean distance.\n```\n256: public double distanceTo(Point other) {\n257: double dx = this.x - other.x;\n258: double dy = this.y - other.y;\n259: return Math.sqrt(dx * dx + dy * dy);\n260: }\n```\n\n### FUNCTION: `area`\n> Signature: `public double area()`\n> Lines: 274-276\n- @brief Compute the area of this shape.\n- @return Area as a double; subclasses provide implementation.\n```\n274: public double area() {\n275: return 0.0;\n276: }\n```\n\n### CLASS: `Circle`\n> Signature: `public final class Circle extends Shape`\n> Lines: 284-304\n- @brief Circle shape with radius-based area computation.\n- @brief Radius of the circle.\n```\n284: public final class Circle extends Shape {\n286: private final double radius;\n292: public Circle(double radius) {\n293: this.radius = radius;\n294: }\n300: @Override\n301: public double area() {\n302: return PI * radius * radius;\n303: }\n304: }\n```\n\n### FUNCTION: `Circle`\n> Signature: `public Circle(double radius)`\n> Lines: 292-294\n- @brief Construct a circle with a given radius.\n- @param radius Non-negative radius value.\n```\n292: public Circle(double radius) {\n293: this.radius = radius;\n294: }\n```\n\n### DECORATOR: `Override`\n> Lines: 300-300\n- @brief Compute circle area using π×r².\n- @return The area of the circle.\n```\n300: @Override\n```\n\n### FUNCTION: `area`\n> Signature: `public double area()`\n> Lines: 301-303\n```\n301: public double area() {\n302: return PI * radius * radius;\n303: }\n```\n\n### CLASS: `Rectangle`\n> Signature: `public final class Rectangle extends Shape`\n> Lines: 311-324\n- @brief Rectangle shape with width and height.\n```\n311: public final class Rectangle extends Shape {\n312: private final double width;\n313: private final double height;\n315: public Rectangle(double width, double height) {\n316: this.width = width;\n317: this.height = height;\n318: }\n320: @Override\n321: public double area() {\n322: return width * height;\n323: }\n324: }\n```\n\n### FUNCTION: `Rectangle`\n> Signature: `public Rectangle(double width, double height)`\n> Lines: 315-318\n```\n315: public Rectangle(double width, double height) {\n316: this.width = width;\n317: this.height = height;\n318: }\n```\n\n### DECORATOR: `Override`\n> Lines: 320-320\n```\n320: @Override\n```\n\n### FUNCTION: `area`\n> Signature: `public double area()`\n> Lines: 321-323\n```\n321: public double area() {\n322: return width * height;\n323: }\n```\n\n### CLASS: `Evaluator`\n> Signature: `public class Evaluator`\n> Lines: 332-361\n- @brief Demonstrates switch expressions and try-with-resources.\n- @brief Describe a shape using pattern matching switch expression.\n- @param shape The shape to describe.\n- @return Human-readable description string.\n```\n332: public class Evaluator {\n339: public static String describe(Shape shape) {\n341: return switch (shape) {\n342: case Circle c -> \"Circle with radius \" + c.area();\n343: case Rectangle r -> \"Rectangle with area \" + r.area();\n344: default -> \"Unknown shape\";\n345: };\n346: }\n354: @RequiresAuth(role = \"admin\")\n355: public static String readFile(String path) throws java.io.IOException {\n357: try (var reader = new java.io.BufferedReader(new java.io.FileReader(path))) {\n358: return reader.lines().collect(Collectors.joining(\"\\n\"));\n359: }\n360: }\n361: }\n```\n\n### FUNCTION: `describe`\n> Signature: `public static String describe(Shape shape)`\n> Lines: 339-346\n- @brief Describe a shape using pattern matching switch expression.\n- @param shape The shape to describe.\n- @return Human-readable description string.\n```\n339: public static String describe(Shape shape) {\n341: return switch (shape) {\n342: case Circle c -> \"Circle with radius \" + c.area();\n343: case Rectangle r -> \"Rectangle with area \" + r.area();\n344: default -> \"Unknown shape\";\n345: };\n346: }\n```\n\n### FUNCTION: `switch`\n> Signature: `return switch (shape)`\n> Lines: 341-345\n```\n341: return switch (shape) {\n342: case Circle c -> \"Circle with radius \" + c.area();\n343: case Rectangle r -> \"Rectangle with area \" + r.area();\n344: default -> \"Unknown shape\";\n345: };\n```\n\n### DECORATOR: `RequiresAuth(role = \"admin\")`\n> Lines: 354-354\n- @brief Read a file safely with try-with-resources.\n- @param path File system path to read.\n- @return File contents as a string.\n- @throws java.io.IOException If the file cannot be read.\n```\n354: @RequiresAuth(role = \"admin\")\n```\n\n### FUNCTION: `readFile`\n> Signature: `public static String readFile(String path) throws java.io.IOException`\n> Lines: 355-360\n```\n355: public static String readFile(String path) throws java.io.IOException {\n357: try (var reader = new java.io.BufferedReader(new java.io.FileReader(path))) {\n358: return reader.lines().collect(Collectors.joining(\"\\n\"));\n359: }\n360: }\n```\n\n### MODULE: `com.example.extra.one`\n> Signature: `package com.example.extra.one`\n> Lines: 364-368\n```\n364: package com.example.extra.one;\n365: package com.example.extra.two;\n366: package com.example.extra.three;\n367: package com.example.extra.four;\n368: interface Runner {}\n```\n\n### MODULE: `com.example.extra.two`\n> Signature: `package com.example.extra.two`\n> Lines: 365-368\n```\n365: package com.example.extra.two;\n366: package com.example.extra.three;\n367: package com.example.extra.four;\n368: interface Runner {}\n```\n\n### MODULE: `com.example.extra.three`\n> Signature: `package com.example.extra.three`\n> Lines: 366-368\n```\n366: package com.example.extra.three;\n367: package com.example.extra.four;\n368: interface Runner {}\n```\n\n### MODULE: `com.example.extra.four`\n> Signature: `package com.example.extra.four`\n> Lines: 367-368\n```\n367: package com.example.extra.four;\n368: interface Runner {}\n```\n\n### INTERFACE: `Runner`\n> Signature: `interface Runner {}`\n> Lines: 368-368\n```\n368: interface Runner {}\n```\n\n### INTERFACE: `Mapper`\n> Signature: `public interface Mapper {}`\n> Lines: 369-369\n```\n369: public interface Mapper {}\n```\n\n### INTERFACE: `Handler`\n> Signature: `public interface Handler {}`\n> Lines: 370-370\n```\n370: public interface Handler {}\n```\n\n### INTERFACE: `Auditor`\n> Signature: `public interface Auditor {}`\n> Lines: 371-371\n```\n371: public interface Auditor {}\n```\n\n### ENUM: `ModeJava`\n> Signature: `enum ModeJava { FAST, SAFE }`\n> Lines: 372-372\n```\n372: enum ModeJava { FAST, SAFE }\n```\n\n### ENUM: `PhaseJava`\n> Signature: `enum PhaseJava { INIT, RUN }`\n> Lines: 373-373\n```\n373: enum PhaseJava { INIT, RUN }\n```\n\n### ENUM: `StatusJava`\n> Signature: `enum StatusJava { OPEN, CLOSED }`\n> Lines: 374-374\n```\n374: enum StatusJava { OPEN, CLOSED }\n```\n\n### ENUM: `KindJava`\n> Signature: `enum KindJava { A, B }`\n> Lines: 375-375\n```\n375: enum KindJava { A, B }\n```\n\n### CONSTANT: `DEFAULT_LIMIT`\n> Signature: `public static final int DEFAULT_LIMIT = 10`\n> Lines: 376-376\n```\n376: public static final int DEFAULT_LIMIT = 10;\n```\n\n### CONSTANT: `RETRY_LIMIT`\n> Signature: `public static final int RETRY_LIMIT = 3`\n> Lines: 377-377\n```\n377: public static final int RETRY_LIMIT = 3;\n```\n\n### CONSTANT: `BUFFER_SIZE`\n> Signature: `public static final int BUFFER_SIZE = 512`\n> Lines: 378-378\n```\n378: public static final int BUFFER_SIZE = 512;\n```\n\n### CONSTANT: `MAX_USERS`\n> Signature: `public static final int MAX_USERS = 99`\n> Lines: 379-379\n```\n379: public static final int MAX_USERS = 99;\n```\n\n### DECORATOR: `Trace`\n> Lines: 380-380\n```\n380: @Trace\n```\n\n### CLASS: `ReqCoverJava`\n> Signature: `class ReqCoverJava`\n> Lines: 383-429\n- @brief Coverage helper construct 1.\n- @details Provides deterministic fixture-level Doxygen coverage block 1.\n- @param value Input value for helper construct 1.\n- @return Output value for helper construct 1.\n```\n383: class ReqCoverJava {\n391: static int reqCoverJava1(int value) { return value + 1; }\n400: static int reqCoverJava2(int value) { return value + 2; }\n409: static int reqCoverJava3(int value) { return value + 3; }\n418: static int reqCoverJava4(int value) { return value + 4; }\n427: static int reqCoverJava5(int value) { return value + 5; }\n429: }\n```\n\n### FUNCTION: `reqCoverJava1`\n> Signature: `static int reqCoverJava1(int value) { return value + 1; }`\n> Lines: 391-391\n- @brief Coverage helper construct 1.\n- @details Provides deterministic fixture-level Doxygen coverage block 1.\n- @param value Input value for helper construct 1.\n- @return Output value for helper construct 1.\n```\n391: static int reqCoverJava1(int value) { return value + 1; }\n```\n\n### FUNCTION: `reqCoverJava2`\n> Signature: `static int reqCoverJava2(int value) { return value + 2; }`\n> Lines: 400-400\n- @brief Coverage helper construct 2.\n- @details Provides deterministic fixture-level Doxygen coverage block 2.\n- @param value Input value for helper construct 2.\n- @return Output value for helper construct 2.\n```\n400: static int reqCoverJava2(int value) { return value + 2; }\n```\n\n### FUNCTION: `reqCoverJava3`\n> Signature: `static int reqCoverJava3(int value) { return value + 3; }`\n> Lines: 409-409\n- @brief Coverage helper construct 3.\n- @details Provides deterministic fixture-level Doxygen coverage block 3.\n- @param value Input value for helper construct 3.\n- @return Output value for helper construct 3.\n```\n409: static int reqCoverJava3(int value) { return value + 3; }\n```\n\n### FUNCTION: `reqCoverJava4`\n> Signature: `static int reqCoverJava4(int value) { return value + 4; }`\n> Lines: 418-418\n- @brief Coverage helper construct 4.\n- @details Provides deterministic fixture-level Doxygen coverage block 4.\n- @param value Input value for helper construct 4.\n- @return Output value for helper construct 4.\n```\n418: static int reqCoverJava4(int value) { return value + 4; }\n```\n\n### FUNCTION: `reqCoverJava5`\n> Signature: `static int reqCoverJava5(int value) { return value + 5; }`\n> Lines: 427-427\n- @brief Coverage helper construct 5.\n- @details Provides deterministic fixture-level Doxygen coverage block 5.\n- @param value Input value for helper construct 5.\n- @return Output value for helper construct 5.\n```\n427: static int reqCoverJava5(int value) { return value + 5; }\n```\n",
|
|
4
|
+
"stderr": ""
|
|
5
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
{
|
|
2
|
+
"code": 0,
|
|
3
|
+
"stdout": "@@@ tests/fixtures/fixture_javascript.js | javascript\n- @brief Comprehensive JavaScript test fixture for parser validation.\n- @details Covers classes with private fields, generators, async generators,\nproxies, symbols, IIFE, dynamic imports, destructuring, computed\nproperties, and chained promise patterns.\n\n### IMPORT: `React from 'react';`\n> Lines: 11-11\n```\n11: import React from 'react';\n```\n\n### IMPORT: `{ useState, useEffect } from 'react';`\n> Lines: 12-12\n```\n12: import { useState, useEffect } from 'react';\n```\n\n### CLASS: `MyComponent`\n> Signature: `class MyComponent`\n> Lines: 20-66\n- @brief React-like component with private fields and static initialization.\n- @brief Private instance counter, not accessible outside the class.\n```\n20: class MyComponent {\n22: #instanceId;\n25: static #registry = new Map();\n28: static {\n29: console.log('MyComponent class loaded');\n30: }\n36: constructor(id = 0) {\n37: this.#instanceId = id;\n38: MyComponent.#registry.set(id, this);\n39: }\n45: render() {\n47: return null;\n48: }\n54: getId() {\n55: return this.#instanceId;\n56: }\n63: static has(id) {\n64: return MyComponent.#registry.has(id);\n65: }\n66: }\n```\n\n### CLASS: `EnhancedComponent`\n> Signature: `class EnhancedComponent extends MyComponent`\n> Lines: 75-93\n- @brief Extended component with lifecycle hooks.\n- @brief Override render to return a div element.\n- @return {Object} A simple virtual DOM node.\n```\n75: class EnhancedComponent extends MyComponent {\n80: render() {\n82: super.render();\n83: return { type: 'div', children: [] };\n84: }\n90: componentDidMount() {\n91: console.log('mounted');\n92: }\n93: }\n```\n\n### FUNCTION: `greet`\n> Signature: `function greet(name)`\n> Lines: 103-105\n- @brief Greet a person by name.\n- @param {string} name The person's name.\n- @return {string} Greeting message.\n```\n103: function greet(name) {\n104: return \"Hello \" + name;\n105: }\n```\n\n### FUNCTION: `fetchData`\n> Signature: `async function fetchData()`\n> Lines: 112-115\n- @brief Fetch data from the API endpoint asynchronously.\n- @return {Promise<Response>} The fetch response promise.\n```\n112: async function fetchData() {\n114: return await fetch('/api');\n115: }\n```\n\n### FUNCTION: `handler`\n> Signature: `const handler = (event) =>`\n> Lines: 122-126\n- @brief Event handler arrow function for UI events.\n- @param {Event} event The DOM event object.\n```\n122: const handler = (event) => {\n124: event.preventDefault();\n125: console.log(event.type);\n126: };\n```\n\n### FUNCTION: `processItems`\n> Signature: `const processItems = ({ items, count }) =>`\n> Lines: 134-136\n- @brief Arrow function with destructuring parameter.\n- @param {{ items: Array, count: number }} param0 Destructured config.\n- @return {Array} Processed item list.\n```\n134: const processItems = ({ items, count }) => {\n135: return items.slice(0, count).map(i => i.toUpperCase());\n136: };\n```\n\n### CONSTANT: `MAX_SIZE`\n> Signature: `const MAX_SIZE = 100`\n> Lines: 141-141\n```\n141: const MAX_SIZE = 100;\n```\n\n### CONSTANT: `PLUGIN_KEY`\n> Signature: `const PLUGIN_KEY = Symbol('plugin')`\n> Lines: 144-144\n```\n144: const PLUGIN_KEY = Symbol('plugin');\n```\n\n### COMPONENT: `MyWrapped`\n> Signature: `const MyWrapped = React.memo(() =>`\n> Lines: 153-155\n- @brief Memoized functional component demonstrating React.memo usage.\n- @return {null} Renders nothing; serves as a parser test case.\n```\n153: const MyWrapped = React.memo(() => {\n154: return null;\n155: });\n```\n\n### FUNCTION: `idGenerator`\n> Signature: `function* idGenerator()`\n> Lines: 164-170\n- @brief Infinite generator producing sequential integer IDs.\n@yields {number} The next unique ID.\n```\n164: function* idGenerator() {\n165: let id = 0;\n166: while (true) {\n168: yield id++;\n169: }\n170: }\n```\n\n### FUNCTION: `rangeGenerator`\n> Signature: `function* rangeGenerator(start, end)`\n> Lines: 179-183\n- @brief Generator yielding integers in a bounded range.\n- @param {number} start Inclusive lower bound.\n- @param {number} end Exclusive upper bound.\n@yields {number} Each integer from start to end-1.\n```\n179: function* rangeGenerator(start, end) {\n180: for (let i = start; i < end; i++) {\n181: yield i;\n182: }\n183: }\n```\n\n### FUNCTION: `asyncDataStream`\n> Signature: `async function* asyncDataStream(url)`\n> Lines: 194-206\n- @brief Asynchronously yield paginated API results.\n- @param {string} url Base URL for pagination.\n@yields {Object} Each page's parsed JSON data.\n```\n194: async function* asyncDataStream(url) {\n195: let page = 0;\n196: while (true) {\n197: const response = await fetch(`${url}?page=${page}`);\n198: const data = await response.json();\n199: if (data.length === 0) {\n201: return;\n202: }\n203: yield data;\n204: page++;\n205: }\n206: }\n```\n\n### FUNCTION: `initResult`\n> Signature: `const initResult = (() =>`\n> Lines: 213-217\n- @brief Immediately invoked function expression for module initialization.\n```\n213: const initResult = (() => {\n215: const config = { debug: false };\n216: return Object.freeze(config);\n217: })();\n```\n\n### FUNCTION: `createProxy`\n> Signature: `function createProxy(target)`\n> Lines: 227-240\n- @brief Create a logging proxy around any target object.\n- @param {Object} target The object to wrap with proxy traps.\n- @return {Proxy} Proxied object that logs property access.\n```\n227: function createProxy(target) {\n228: return new Proxy(target, {\n229: get(obj, prop) {\n231: console.log(`Access: ${String(prop)}`);\n232: return Reflect.get(obj, prop);\n233: },\n234: set(obj, prop, value) {\n236: console.log(`Set: ${String(prop)} = ${value}`);\n237: return Reflect.set(obj, prop, value);\n238: },\n239: });\n240: }\n```\n\n### FUNCTION: `buildDynamic`\n> Signature: `function buildDynamic(prefix)`\n> Lines: 250-258\n- @brief Build an object with computed property keys.\n- @param {string} prefix Key prefix for dynamic properties.\n- @return {Object} Object with dynamically named properties.\n```\n250: function buildDynamic(prefix) {\n251: return {\n252: [`${prefix}_name`]: 'value',\n253: [`${prefix}_id`]: 42,\n254: [Symbol.toPrimitive](hint) {\n255: return hint === 'string' ? prefix : 0;\n256: },\n257: };\n258: }\n```\n\n### FUNCTION: `fetchAndProcess`\n> Signature: `function fetchAndProcess(url)`\n> Lines: 268-280\n- @brief Demonstrate chained promise pattern with error recovery.\n- @param {string} url The resource URL to fetch.\n- @return {Promise<Object>} Processed data or fallback on error.\n```\n268: function fetchAndProcess(url) {\n269: return fetch(url)\n270: .then(res => res.json())\n271: .then(data => {\n273: return { ...data, processed: true };\n274: })\n275: .catch(err => {\n277: console.error(err);\n278: return { error: true, processed: false };\n279: });\n280: }\n```\n\n### FUNCTION: `configureApp`\n> Signature: `function configureApp({ host = 'localhost', port = 3000, db: { url: dbUrl = 'sqlite://' } = {} } = {})`\n> Lines: 290-292\n- @brief Configure application with deep destructuring defaults.\n- @param {Object} options Configuration object with nested defaults.\n- @return {Object} Resolved configuration.\n```\n290: function configureApp({ host = 'localhost', port = 3000, db: { url: dbUrl = 'sqlite://' } = {} } = {}) {\n291: return { host, port, dbUrl };\n292: }\n```\n\n### MODULE: `fs`\n> Signature: `const fs = require('fs')`\n> Lines: 297-307\n- @brief Load the Node.js filesystem module via CommonJS. */\n```\n297: const fs = require('fs');\n302: const _privateState = new WeakMap();\n```\n\n### FUNCTION: `setPrivate`\n> Signature: `function setPrivate(obj, data)`\n> Lines: 310-312\n- @brief Store private data associated with an object.\n- @param {Object} obj The key object.\n- @param {*} data The private data to associate.\n```\n310: function setPrivate(obj, data) {\n311: _privateState.set(obj, data);\n312: }\n```\n\n### FUNCTION: `loadPlugin`\n> Signature: `async function loadPlugin(name)`\n> Lines: 322-326\n- @brief Dynamically import a module at runtime.\n- @param {string} name Module specifier to import.\n- @return {Promise<Module>} The loaded module namespace.\n```\n322: async function loadPlugin(name) {\n324: const mod = await import(`./${name}.js`);\n325: return mod;\n326: }\n```\n\n### IMPORT: `fs from 'fs';`\n> Lines: 329-329\n```\n329: import fs from 'fs';\n```\n\n### IMPORT: `path from 'path';`\n> Lines: 330-330\n```\n330: import path from 'path';\n```\n\n### IMPORT: `url from 'url';`\n> Lines: 331-331\n```\n331: import url from 'url';\n```\n\n### CLASS: `ExtraService`\n> Signature: `export class ExtraService { constructor() { this.ready = true; } }`\n> Lines: 332-332\n```\n332: export class ExtraService { constructor() { this.ready = true; } }\n```\n\n### CLASS: `HelperComponent`\n> Signature: `class HelperComponent { render() { return null; } }`\n> Lines: 333-333\n```\n333: class HelperComponent { render() { return null; } }\n```\n\n### CLASS: `WidgetFactory`\n> Signature: `export default class WidgetFactory { create() { return {}; } }`\n> Lines: 334-334\n```\n334: export default class WidgetFactory { create() { return {}; } }\n```\n\n### COMPONENT: `BoundComponent`\n> Signature: `const BoundComponent = React.memo(() => null)`\n> Lines: 335-336\n```\n335: const BoundComponent = React.memo(() => null);\n336: const ForwardedWidget = React.forwardRef((_, ref) => ({ ref }));\n```\n\n### COMPONENT: `ForwardedWidget`\n> Signature: `const ForwardedWidget = React.forwardRef((_, ref) => ({ ref }))`\n> Lines: 336-336\n```\n336: const ForwardedWidget = React.forwardRef((_, ref) => ({ ref }));\n```\n\n### COMPONENT: `LazyWidget`\n> Signature: `const LazyWidget = React.lazy(() => import('./Widget'))`\n> Lines: 337-353\n```\n337: const LazyWidget = React.lazy(() => import('./Widget'));\n338: const MemoPanel = memo(() => null);\n339: const API_TOKEN = 'tok';\n340: const CACHE_SIZE = 128;\n341: const RETRY_LIMIT = 5;\n342: const pathMod = require('path');\n343: const cryptoMod = require('crypto');\n344: const utilMod = require('util');\n345: const osMod = require('os');\n353: function reqCoverJs1(value) { return value + 1; }\n```\n\n### COMPONENT: `MemoPanel`\n> Signature: `const MemoPanel = memo(() => null)`\n> Lines: 338-353\n```\n338: const MemoPanel = memo(() => null);\n339: const API_TOKEN = 'tok';\n340: const CACHE_SIZE = 128;\n341: const RETRY_LIMIT = 5;\n342: const pathMod = require('path');\n343: const cryptoMod = require('crypto');\n344: const utilMod = require('util');\n345: const osMod = require('os');\n353: function reqCoverJs1(value) { return value + 1; }\n```\n\n### CONSTANT: `API_TOKEN`\n> Signature: `const API_TOKEN = 'tok'`\n> Lines: 339-339\n```\n339: const API_TOKEN = 'tok';\n```\n\n### CONSTANT: `CACHE_SIZE`\n> Signature: `const CACHE_SIZE = 128`\n> Lines: 340-340\n```\n340: const CACHE_SIZE = 128;\n```\n\n### CONSTANT: `RETRY_LIMIT`\n> Signature: `const RETRY_LIMIT = 5`\n> Lines: 341-341\n```\n341: const RETRY_LIMIT = 5;\n```\n\n### MODULE: `pathMod`\n> Signature: `const pathMod = require('path')`\n> Lines: 342-353\n```\n342: const pathMod = require('path');\n343: const cryptoMod = require('crypto');\n344: const utilMod = require('util');\n345: const osMod = require('os');\n353: function reqCoverJs1(value) { return value + 1; }\n```\n\n### MODULE: `cryptoMod`\n> Signature: `const cryptoMod = require('crypto')`\n> Lines: 343-353\n```\n343: const cryptoMod = require('crypto');\n344: const utilMod = require('util');\n345: const osMod = require('os');\n353: function reqCoverJs1(value) { return value + 1; }\n```\n\n### MODULE: `utilMod`\n> Signature: `const utilMod = require('util')`\n> Lines: 344-353\n```\n344: const utilMod = require('util');\n345: const osMod = require('os');\n353: function reqCoverJs1(value) { return value + 1; }\n```\n\n### MODULE: `osMod`\n> Signature: `const osMod = require('os')`\n> Lines: 345-353\n```\n345: const osMod = require('os');\n353: function reqCoverJs1(value) { return value + 1; }\n```\n\n### FUNCTION: `reqCoverJs1`\n> Signature: `function reqCoverJs1(value) { return value + 1; }`\n> Lines: 353-353\n- @brief Coverage helper construct 1.\n- @details Provides deterministic fixture-level Doxygen coverage block 1.\n- @param value Input value for helper construct 1.\n- @return Output value for helper construct 1.\n```\n353: function reqCoverJs1(value) { return value + 1; }\n```\n\n### FUNCTION: `reqCoverJs2`\n> Signature: `function reqCoverJs2(value) { return value + 2; }`\n> Lines: 360-360\n- @brief Coverage helper construct 2.\n- @details Provides deterministic fixture-level Doxygen coverage block 2.\n- @param value Input value for helper construct 2.\n- @return Output value for helper construct 2.\n```\n360: function reqCoverJs2(value) { return value + 2; }\n```\n\n### FUNCTION: `reqCoverJs3`\n> Signature: `function reqCoverJs3(value) { return value + 3; }`\n> Lines: 367-367\n- @brief Coverage helper construct 3.\n- @details Provides deterministic fixture-level Doxygen coverage block 3.\n- @param value Input value for helper construct 3.\n- @return Output value for helper construct 3.\n```\n367: function reqCoverJs3(value) { return value + 3; }\n```\n\n### FUNCTION: `reqCoverJs4`\n> Signature: `function reqCoverJs4(value) { return value + 4; }`\n> Lines: 374-374\n- @brief Coverage helper construct 4.\n- @details Provides deterministic fixture-level Doxygen coverage block 4.\n- @param value Input value for helper construct 4.\n- @return Output value for helper construct 4.\n```\n374: function reqCoverJs4(value) { return value + 4; }\n```\n\n### FUNCTION: `reqCoverJs5`\n> Signature: `function reqCoverJs5(value) { return value + 5; }`\n> Lines: 381-381\n- @brief Coverage helper construct 5.\n- @details Provides deterministic fixture-level Doxygen coverage block 5.\n- @param value Input value for helper construct 5.\n- @return Output value for helper construct 5.\n```\n381: function reqCoverJs5(value) { return value + 5; }\n```\n",
|
|
4
|
+
"stderr": ""
|
|
5
|
+
}
|
package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_kotlin.kt.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
{
|
|
2
|
+
"code": 0,
|
|
3
|
+
"stdout": "@@@ tests/fixtures/fixture_kotlin.kt | kotlin\n- @brief Comprehensive Kotlin test fixture for parser validation.\n- @details Covers extension functions, inline/reified generics, DSL builders,\ndelegation, coroutine scope, destructuring, sealed interfaces,\nvalue classes, operator overloading, and lateinit.\n\n### IMPORT: `kotlin.collections.List`\n> Lines: 11-11\n```\n11: import kotlin.collections.List\n```\n\n### IMPORT: `kotlinx.coroutines.flow.Flow`\n> Lines: 12-12\n```\n12: import kotlinx.coroutines.flow.Flow\n```\n\n### IMPORT: `kotlinx.coroutines.flow.flow`\n> Lines: 13-13\n```\n13: import kotlinx.coroutines.flow.flow\n```\n\n### DECORATOR: `Deprecated`\n> Lines: 18-18\n- @brief Marks a class or function as deprecated with migration path. */\n```\n18: @Deprecated(\"Use UserV2 instead\", replaceWith = ReplaceWith(\"UserV2\"))\n```\n\n### CLASS: `User`\n> Signature: `data class User(val name: String, val age: Int = 0)`\n> Lines: 19-61\n```\n19: data class User(val name: String, val age: Int = 0)\n28: sealed class Result<out T> {\n34: data class Success<T>(val value: T) : Result<T>()\n42: data class Error(val message: String, val cause: Throwable? = null) : Result<Nothing>()\n48: object Loading : Result<Nothing>()\n56: fun <R> map(transform: (T) -> R): Result<R> = when (this) {\n57: is Success -> Success(transform(value))\n58: is Error -> Error(message, cause)\n59: is Loading -> Loading\n60: }\n61: }\n```\n\n### CLASS: `Result`\n> Signature: `sealed class Result<out T>`\n> Lines: 28-61\n- @brief Sealed class representing success/failure outcomes.\n@tparam T The success value type.\n- @brief Successful outcome holding a value.\n- @param value The result data.\n```\n28: sealed class Result<out T> {\n34: data class Success<T>(val value: T) : Result<T>()\n42: data class Error(val message: String, val cause: Throwable? = null) : Result<Nothing>()\n48: object Loading : Result<Nothing>()\n56: fun <R> map(transform: (T) -> R): Result<R> = when (this) {\n57: is Success -> Success(transform(value))\n58: is Error -> Error(message, cause)\n59: is Loading -> Loading\n60: }\n61: }\n```\n\n### CLASS: `Success`\n> Signature: `data class Success<T>(val value: T) : Result<T>()`\n> Lines: 34-60\n- @brief Successful outcome holding a value.\n- @brief Failed outcome holding an error message.\n- @param value The result data.\n- @param message Description of the failure.\n- @param cause Optional underlying exception.\n```\n34: data class Success<T>(val value: T) : Result<T>()\n42: data class Error(val message: String, val cause: Throwable? = null) : Result<Nothing>()\n48: object Loading : Result<Nothing>()\n56: fun <R> map(transform: (T) -> R): Result<R> = when (this) {\n57: is Success -> Success(transform(value))\n58: is Error -> Error(message, cause)\n59: is Loading -> Loading\n60: }\n```\n\n### CLASS: `Error`\n> Signature: `data class Error(val message: String, val cause: Throwable? = null) : Result<Nothing>()`\n> Lines: 42-60\n- @brief Failed outcome holding an error message.\n- @brief Singleton state representing an in-progress operation.\n- @param message Description of the failure.\n- @param cause Optional underlying exception.\n```\n42: data class Error(val message: String, val cause: Throwable? = null) : Result<Nothing>()\n48: object Loading : Result<Nothing>()\n56: fun <R> map(transform: (T) -> R): Result<R> = when (this) {\n57: is Success -> Success(transform(value))\n58: is Error -> Error(message, cause)\n59: is Loading -> Loading\n60: }\n```\n\n### MODULE: `Loading`\n> Signature: `object Loading : Result<Nothing>()`\n> Lines: 48-60\n- @brief Singleton state representing an in-progress operation.\n- @brief Map the success value using a transform function. @tparam R The target type after transformation.\n- @param transform Function converting T to R.\n- @return Transformed Result or original error/loading state.\n```\n48: object Loading : Result<Nothing>()\n56: fun <R> map(transform: (T) -> R): Result<R> = when (this) {\n57: is Success -> Success(transform(value))\n58: is Error -> Error(message, cause)\n59: is Loading -> Loading\n60: }\n```\n\n### FUNCTION: `map`\n> Signature: `fun <R> map(transform: (T) -> R): Result<R> = when (this)`\n> Lines: 56-60\n- @brief Map the success value using a transform function.\n@tparam R The target type after transformation.\n- @param transform Function converting T to R.\n- @return Transformed Result or original error/loading state.\n```\n56: fun <R> map(transform: (T) -> R): Result<R> = when (this) {\n57: is Success -> Success(transform(value))\n58: is Error -> Error(message, cause)\n59: is Loading -> Loading\n60: }\n```\n\n### INTERFACE: `Repository`\n> Signature: `interface Repository<T>`\n> Lines: 70-90\n- @brief Generic CRUD repository interface.\n@tparam T Entity type managed by this repository.\n- @brief Find an entity by its unique identifier.\n- @param id Entity ID.\n- @return The entity or null if not found.\n```\n70: interface Repository<T> {\n76: fun findById(id: Int): T?\n83: fun save(entity: T): Boolean\n89: fun findAll(): Flow<T>\n90: }\n```\n\n### FUNCTION: `findById`\n> Signature: `fun findById(id: Int): T?`\n> Lines: 76-96\n- @brief Find an entity by its unique identifier.\n- @brief Persist an entity.\n- @param id Entity ID.\n- @param entity The entity to save.\n- @return The entity or null if not found.\n- @return True if save succeeded.\n```\n76: fun findById(id: Int): T?\n83: fun save(entity: T): Boolean\n89: fun findAll(): Flow<T>\n90: }\n96: sealed interface Identifiable {\n```\n\n### FUNCTION: `save`\n> Signature: `fun save(entity: T): Boolean`\n> Lines: 83-96\n- @brief Persist an entity.\n- @brief Retrieve all entities as a Flow stream.\n- @param entity The entity to save.\n- @return True if save succeeded.\n- @return Flow emitting all stored entities.\n```\n83: fun save(entity: T): Boolean\n89: fun findAll(): Flow<T>\n90: }\n96: sealed interface Identifiable {\n```\n\n### FUNCTION: `findAll`\n> Signature: `fun findAll(): Flow<T>`\n> Lines: 89-96\n- @brief Retrieve all entities as a Flow stream.\n- @brief Sealed interface requiring an ID property.\n- @return Flow emitting all stored entities.\n```\n89: fun findAll(): Flow<T>\n90: }\n96: sealed interface Identifiable {\n```\n\n### CONSTANT: `id`\n> Signature: `val id: Int`\n> Lines: 98-98\n- @brief Unique entity identifier. */\n```\n98: val id: Int\n```\n\n### ENUM: `Color`\n> Signature: `enum class Color(val hex: String)`\n> Lines: 107-123\n- @brief Color enum with hex value property and companion factory.\n- @brief Red color channel.\n- @brief Green color channel.\n```\n107: enum class Color(val hex: String) {\n109: RED(\"#FF0000\"),\n111: GREEN(\"#00FF00\"),\n113: BLUE(\"#0000FF\");\n115: companion object {\n121: fun fromHex(hex: String): Color? = values().find { it.hex == hex }\n122: }\n123: }\n```\n\n### MODULE: `companion object`\n> Signature: `companion object`\n> Lines: 115-122\n- @brief Blue color channel. */\n- @brief Parse a color from its hex string.\n- @param hex Hex color code including '#' prefix.\n- @return Matching Color or null.\n```\n115: companion object {\n121: fun fromHex(hex: String): Color? = values().find { it.hex == hex }\n122: }\n```\n\n### FUNCTION: `fromHex`\n> Signature: `fun fromHex(hex: String): Color? = values().find { it.hex == hex }`\n> Lines: 121-121\n- @brief Parse a color from its hex string.\n- @param hex Hex color code including '#' prefix.\n- @return Matching Color or null.\n```\n121: fun fromHex(hex: String): Color? = values().find { it.hex == hex }\n```\n\n### CLASS: `Entity`\n> Signature: `data class Entity(`\n> Lines: 134-155\n- @brief Data class combining Identifiable with named properties.\n- @param id Unique identifier.\n- @param name Entity display name.\n- @param status Current lifecycle status.\n```\n134: data class Entity(\n135: override val id: Int,\n136: val name: String,\n137: val status: String = \"active\",\n138: ) : Identifiable\n147: @JvmInline\n148: value class EmailAddress(val value: String) {\n149: init {\n150: require(value.contains('@')) { \"Invalid email: $value\" }\n151: }\n154: val domain: String get() = value.substringAfter('@')\n155: }\n```\n\n### CONSTANT: `name`\n> Signature: `val name: String,`\n> Lines: 136-136\n```\n136: val name: String,\n```\n\n### CONSTANT: `status`\n> Signature: `val status: String = \"active\",`\n> Lines: 137-137\n```\n137: val status: String = \"active\",\n```\n\n### DECORATOR: `JvmInline`\n> Lines: 147-147\n- @brief Inline value class wrapping a validated email string.\n- @param value The raw email address string.\n```\n147: @JvmInline\n```\n\n### CONSTANT: `domain`\n> Signature: `val domain: String get() = value.substringAfter('@')`\n> Lines: 154-154\n- @brief Extract the domain part of the email. */\n```\n154: val domain: String get() = value.substringAfter('@')\n```\n\n### FUNCTION: `greet`\n> Signature: `fun greet(name: String): String`\n> Lines: 165-167\n- @brief Greet a person by name.\n- @param name The person's name.\n- @return Greeting message string.\n```\n165: fun greet(name: String): String {\n166: return \"Hello $name\"\n167: }\n```\n\n### FUNCTION: `fetchData`\n> Signature: `suspend fun fetchData(): String`\n> Lines: 174-177\n- @brief Suspend function simulating async data retrieval.\n- @return Retrieved data as a string.\n```\n174: suspend fun fetchData(): String {\n176: return \"data\"\n177: }\n```\n\n### FUNCTION: `processItems`\n> Signature: `fun processItems(items: List<String>, transform: (String) -> String): List<String>`\n> Lines: 186-188\n- @brief Higher-order function with trailing lambda syntax.\n- @param items List of strings to process.\n- @param transform Function applied to each item.\n- @return List of transformed results.\n```\n186: fun processItems(items: List<String>, transform: (String) -> String): List<String> {\n187: return items.map(transform)\n188: }\n```\n\n### CONSTANT: `String`\n> Signature: `val String.lastChar: Char?`\n> Lines: 205-205\n- @brief Extension property returning the last character or null.\n@receiver String The string to inspect.\n```\n205: val String.lastChar: Char?\n```\n\n### CLASS: `Vector2`\n> Signature: `data class Vector2(val x: Double, val y: Double)`\n> Lines: 229-249\n- @brief 2D vector with operator overloading for arithmetic.\n- @brief Add two vectors component-wise.\n- @param x Horizontal component.\n- @param y Vertical component.\n- @param other The vector to add.\n- @return Resulting sum vector.\n```\n229: data class Vector2(val x: Double, val y: Double) {\n235: operator fun plus(other: Vector2) = Vector2(x + other.x, y + other.y)\n241: operator fun unaryMinus() = Vector2(-x, -y)\n248: operator fun times(other: Vector2) = x * other.x + y * other.y\n249: }\n```\n\n### CONSTANT: `PI`\n> Signature: `val PI = 3.14159265`\n> Lines: 254-254\n- @brief Mathematical constant Pi. */\n```\n254: val PI = 3.14159265\n```\n\n### VARIABLE: `counter`\n> Signature: `var counter = 0`\n> Lines: 257-257\n- @brief Mutable package-level counter. */\n```\n257: var counter = 0\n```\n\n### MODULE: `Singleton`\n> Signature: `object Singleton`\n> Lines: 265-286\n- @brief Application-wide singleton for configuration management.\n- @brief Mutable configuration map.\n```\n265: object Singleton {\n267: private val config = mutableMapOf<String, Any>()\n274: fun set(key: String, value: Any) {\n275: config[key] = value\n276: }\n284: @Suppress(\"UNCHECKED_CAST\")\n285: fun <T> get(key: String): T? = config[key] as? T\n286: }\n```\n\n### FUNCTION: `set`\n> Signature: `fun set(key: String, value: Any)`\n> Lines: 274-276\n- @brief Store a configuration value.\n- @param key Configuration key.\n- @param value Configuration value.\n```\n274: fun set(key: String, value: Any) {\n275: config[key] = value\n276: }\n```\n\n### DECORATOR: `Suppress`\n> Lines: 284-284\n- @brief Retrieve a typed configuration value.\n@tparam T Expected value type.\n- @param key Configuration key.\n- @return The value cast to T, or null.\n```\n284: @Suppress(\"UNCHECKED_CAST\")\n```\n\n### FUNCTION: `get`\n> Signature: `fun <T> get(key: String): T? = config[key] as? T`\n> Lines: 285-292\n- @brief Companion object pattern for factory construction.\n```\n285: fun <T> get(key: String): T? = config[key] as? T\n286: }\n292: companion object Factory {\n```\n\n### MODULE: `Factory`\n> Signature: `companion object Factory`\n> Lines: 292-293\n- @brief Companion object pattern for factory construction.\n```\n292: companion object Factory {\n293: }\n```\n\n### CLASS: `DelegatingList`\n> Signature: `class DelegatingList<T>(private val inner: MutableList<T>) : List<T> by inner`\n> Lines: 303-316\n- @brief List implementation delegating to an inner mutable list.\n@tparam T Element type.\n- @brief Count of accesses to the delegated list.\n- @param inner The backing list.\n```\n303: class DelegatingList<T>(private val inner: MutableList<T>) : List<T> by inner {\n305: var accessCount = 0\n306: private set\n311: override val size: Int\n312: get() {\n313: accessCount++\n314: return inner.size\n315: }\n316: }\n```\n\n### VARIABLE: `accessCount`\n> Signature: `var accessCount = 0`\n> Lines: 305-305\n- @brief Count of accesses to the delegated list. */\n```\n305: var accessCount = 0\n```\n\n### CLASS: `Service`\n> Signature: `class Service`\n> Lines: 324-339\n- @brief Service class demonstrating lateinit and lazy initialization.\n- @brief Late-initialized dependency, set after construction.\n```\n324: class Service {\n326: lateinit var dependency: Repository<Entity>\n329: val resource: String by lazy {\n331: \"expensive_resource\"\n332: }\n338: fun isReady(): Boolean = ::dependency.isInitialized\n339: }\n```\n\n### CONSTANT: `resource`\n> Signature: `val resource: String by lazy`\n> Lines: 329-329\n- @brief Lazily computed expensive resource. */\n```\n329: val resource: String by lazy {\n```\n\n### FUNCTION: `isReady`\n> Signature: `fun isReady(): Boolean = ::dependency.isInitialized`\n> Lines: 338-347\n- @brief Check if the dependency has been initialized.\n- @return True if dependency is set.\n```\n338: fun isReady(): Boolean = ::dependency.isInitialized\n339: }\n347: class HtmlBuilder {\n```\n\n### CLASS: `HtmlBuilder`\n> Signature: `class HtmlBuilder`\n> Lines: 347-373\n- @brief Simple DSL for building HTML strings.\n- @brief Add a div element with content from a lambda.\n- @param block Lambda providing the div content.\n```\n347: class HtmlBuilder {\n348: private val elements = mutableListOf<String>()\n354: fun div(block: HtmlBuilder.() -> Unit) {\n355: val inner = HtmlBuilder()\n356: inner.block()\n357: elements.add(\"<div>${inner.build()}</div>\")\n358: }\n364: fun text(text: String) {\n365: elements.add(text)\n366: }\n372: fun build(): String = elements.joinToString(\"\")\n373: }\n```\n\n### FUNCTION: `div`\n> Signature: `fun div(block: HtmlBuilder.() -> Unit)`\n> Lines: 354-358\n- @brief Add a div element with content from a lambda.\n- @param block Lambda providing the div content.\n```\n354: fun div(block: HtmlBuilder.() -> Unit) {\n355: val inner = HtmlBuilder()\n356: inner.block()\n357: elements.add(\"<div>${inner.build()}</div>\")\n358: }\n```\n\n### CONSTANT: `inner`\n> Signature: `val inner = HtmlBuilder()`\n> Lines: 355-355\n```\n355: val inner = HtmlBuilder()\n```\n\n### FUNCTION: `text`\n> Signature: `fun text(text: String)`\n> Lines: 364-366\n- @brief Add a text node.\n- @param text The text content.\n```\n364: fun text(text: String) {\n365: elements.add(text)\n366: }\n```\n\n### FUNCTION: `build`\n> Signature: `fun build(): String = elements.joinToString(\"\")`\n> Lines: 372-381\n- @brief Build the accumulated HTML string.\n- @brief DSL entry point for building HTML content.\n- @param block Builder lambda receiving HtmlBuilder scope.\n- @return Concatenated HTML output.\n- @return Complete HTML string.\n```\n372: fun build(): String = elements.joinToString(\"\")\n373: }\n381: fun html(block: HtmlBuilder.() -> Unit): String {\n```\n\n### FUNCTION: `html`\n> Signature: `fun html(block: HtmlBuilder.() -> Unit): String`\n> Lines: 381-385\n- @brief DSL entry point for building HTML content.\n- @param block Builder lambda receiving HtmlBuilder scope.\n- @return Complete HTML string.\n```\n381: fun html(block: HtmlBuilder.() -> Unit): String {\n382: val builder = HtmlBuilder()\n383: builder.block()\n384: return builder.build()\n385: }\n```\n\n### CONSTANT: `builder`\n> Signature: `val builder = HtmlBuilder()`\n> Lines: 382-382\n```\n382: val builder = HtmlBuilder()\n```\n\n### IMPORT: `kotlin.math.max`\n> Lines: 388-388\n```\n388: import kotlin.math.max\n```\n\n### IMPORT: `kotlin.math.min`\n> Lines: 389-389\n```\n389: import kotlin.math.min\n```\n\n### INTERFACE: `Logger`\n> Signature: `interface Logger`\n> Lines: 390-394\n```\n390: interface Logger\n391: interface Parser\n392: interface Emitter\n393: interface Formatter\n394: enum class ModeKt { FAST, SAFE }\n```\n\n### INTERFACE: `Parser`\n> Signature: `interface Parser`\n> Lines: 391-394\n```\n391: interface Parser\n392: interface Emitter\n393: interface Formatter\n394: enum class ModeKt { FAST, SAFE }\n```\n\n### INTERFACE: `Emitter`\n> Signature: `interface Emitter`\n> Lines: 392-394\n```\n392: interface Emitter\n393: interface Formatter\n394: enum class ModeKt { FAST, SAFE }\n```\n\n### INTERFACE: `Formatter`\n> Signature: `interface Formatter`\n> Lines: 393-394\n```\n393: interface Formatter\n394: enum class ModeKt { FAST, SAFE }\n```\n\n### ENUM: `ModeKt`\n> Signature: `enum class ModeKt { FAST, SAFE }`\n> Lines: 394-394\n```\n394: enum class ModeKt { FAST, SAFE }\n```\n\n### ENUM: `PhaseKt`\n> Signature: `enum class PhaseKt { INIT, RUN }`\n> Lines: 395-395\n```\n395: enum class PhaseKt { INIT, RUN }\n```\n\n### ENUM: `StatusKt`\n> Signature: `enum class StatusKt { READY, WAITING }`\n> Lines: 396-396\n```\n396: enum class StatusKt { READY, WAITING }\n```\n\n### ENUM: `SignalKt`\n> Signature: `enum class SignalKt { ON, OFF }`\n> Lines: 397-397\n```\n397: enum class SignalKt { ON, OFF }\n```\n\n### DECORATOR: `Synchronized`\n> Lines: 398-398\n```\n398: @Synchronized\n```\n\n### DECORATOR: `PublishedApi`\n> Lines: 399-399\n```\n399: @PublishedApi\n```\n\n### MODULE: `CacheStore`\n> Signature: `object CacheStore`\n> Lines: 400-400\n```\n400: object CacheStore\n```\n\n### VARIABLE: `retries`\n> Signature: `var retries = 0`\n> Lines: 401-401\n```\n401: var retries = 0\n```\n\n### VARIABLE: `attempts`\n> Signature: `var attempts = 0`\n> Lines: 402-402\n```\n402: var attempts = 0\n```\n\n### VARIABLE: `state`\n> Signature: `var state = \"idle\"`\n> Lines: 403-403\n```\n403: var state = \"idle\"\n```\n\n### FUNCTION: `reqCoverKotlin1`\n> Signature: `fun reqCoverKotlin1(value: Int): Int = value + 1`\n> Lines: 413-413\n- @brief Coverage helper construct 1.\n- @details Provides deterministic fixture-level Doxygen coverage block 1.\n- @param value Input value for helper construct 1.\n- @return Output value for helper construct 1.\n```\n413: fun reqCoverKotlin1(value: Int): Int = value + 1\n```\n\n### FUNCTION: `reqCoverKotlin2`\n> Signature: `fun reqCoverKotlin2(value: Int): Int = value + 2`\n> Lines: 422-422\n- @brief Coverage helper construct 2.\n- @details Provides deterministic fixture-level Doxygen coverage block 2.\n- @param value Input value for helper construct 2.\n- @return Output value for helper construct 2.\n```\n422: fun reqCoverKotlin2(value: Int): Int = value + 2\n```\n\n### FUNCTION: `reqCoverKotlin3`\n> Signature: `fun reqCoverKotlin3(value: Int): Int = value + 3`\n> Lines: 431-431\n- @brief Coverage helper construct 3.\n- @details Provides deterministic fixture-level Doxygen coverage block 3.\n- @param value Input value for helper construct 3.\n- @return Output value for helper construct 3.\n```\n431: fun reqCoverKotlin3(value: Int): Int = value + 3\n```\n\n### FUNCTION: `reqCoverKotlin4`\n> Signature: `fun reqCoverKotlin4(value: Int): Int = value + 4`\n> Lines: 440-440\n- @brief Coverage helper construct 4.\n- @details Provides deterministic fixture-level Doxygen coverage block 4.\n- @param value Input value for helper construct 4.\n- @return Output value for helper construct 4.\n```\n440: fun reqCoverKotlin4(value: Int): Int = value + 4\n```\n\n### FUNCTION: `reqCoverKotlin5`\n> Signature: `fun reqCoverKotlin5(value: Int): Int = value + 5`\n> Lines: 449-449\n- @brief Coverage helper construct 5.\n- @details Provides deterministic fixture-level Doxygen coverage block 5.\n- @param value Input value for helper construct 5.\n- @return Output value for helper construct 5.\n```\n449: fun reqCoverKotlin5(value: Int): Int = value + 5\n```\n",
|
|
4
|
+
"stderr": ""
|
|
5
|
+
}
|
package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_lua.lua.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
{
|
|
2
|
+
"code": 0,
|
|
3
|
+
"stdout": "@@@ tests/fixtures/fixture_lua.lua | lua\n\n### FUNCTION: `globalFunc`\n> Signature: `function globalFunc(x)`\n> Lines: 14-16\n- @param x number The input value.\n---\n- @return number The input incremented by one.\n```\n14: function globalFunc(x)\n15: return x + 1\n16: end\n```\n\n### FUNCTION: `localFunc`\n> Signature: `local function localFunc(y)`\n> Lines: 22-28\n```\n22: local function localFunc(y)\n23: if type(y) ~= \"number\" then\n24: error(\"expected number, got \" .. type(y))\n25: end\n27: return y * 2\n28: end\n```\n\n### FUNCTION: `sumAll`\n> Signature: `local function sumAll(...)`\n> Lines: 33-41\n- @param ... number Variable number of numeric arguments.\n---\n- @return number Sum of all provided values.\n```\n33: local function sumAll(...)\n34: local total = 0\n35: local args = {...}\n36: for _, v in ipairs(args) do\n38: total = total + v\n39: end\n40: return total\n41: end\n```\n\n### VARIABLE: `total`\n> Signature: `local total = 0`\n> Lines: 34-34\n```\n34: local total = 0\n```\n\n### VARIABLE: `args`\n> Signature: `local args = {...}`\n> Lines: 35-35\n```\n35: local args = {...}\n```\n\n### VARIABLE: `myVar`\n> Signature: `local myVar = 42`\n> Lines: 46-46\n- @brief Module-level constant for retry limits.\n```\n46: local myVar = 42\n```\n\n### VARIABLE: `config`\n> Signature: `local config =`\n> Lines: 49-49\n- @brief Configuration table with default settings.\n```\n49: local config = {\n```\n\n### FUNCTION: `handler`\n> Signature: `local handler = function(event)`\n> Lines: 59-66\n- @param event table Event object containing type and data fields.\n```\n59: local handler = function(event)\n61: if event.type == \"click\" then\n62: print(\"clicked at \" .. event.x .. \",\" .. event.y)\n63: else\n64: print(\"event: \" .. event.type)\n65: end\n66: end\n```\n\n### VARIABLE: `MyModule`\n> Signature: `local MyModule = {}`\n> Lines: 72-72\n- @brief Table-based module using method syntax.\n```\n72: local MyModule = {}\n```\n\n### FUNCTION: `MyModule.new`\n> Signature: `function MyModule.new(name)`\n> Lines: 78-83\n- @param name string Instance identifier.\n---\n- @return table New MyModule instance.\n```\n78: function MyModule.new(name)\n79: local self = setmetatable({}, MyModule)\n80: self.name = name\n81: self._items = {}\n82: return self\n83: end\n```\n\n### VARIABLE: `self`\n> Signature: `local self = setmetatable({}, MyModule)`\n> Lines: 79-79\n```\n79: local self = setmetatable({}, MyModule)\n```\n\n### FUNCTION: `MyModule.method`\n> Signature: `MyModule.method = function(self)`\n> Lines: 88-90\n- @param self table The MyModule instance.\n---\n- @return string The instance name.\n```\n88: MyModule.method = function(self)\n89: return self.name\n90: end\n```\n\n### FUNCTION: `MyModule:addItem`\n> Signature: `function MyModule:addItem(item)`\n> Lines: 94-97\n- @param item any The item to store.\n```\n94: function MyModule:addItem(item)\n96: table.insert(self._items, item)\n97: end\n```\n\n### FUNCTION: `MyModule:count`\n> Signature: `function MyModule:count()`\n> Lines: 101-103\n- @return number Number of items.\n```\n101: function MyModule:count()\n102: return #self._items\n103: end\n```\n\n### VARIABLE: `Animal`\n> Signature: `local Animal = {}`\n> Lines: 109-109\n- @brief Base class using metatables for inheritance.\n```\n109: local Animal = {}\n```\n\n### FUNCTION: `Animal.new`\n> Signature: `function Animal.new(species)`\n> Lines: 115-119\n- @param species string The animal's species.\n---\n- @return table New Animal instance.\n```\n115: function Animal.new(species)\n116: local self = setmetatable({}, Animal)\n117: self.species = species\n118: return self\n119: end\n```\n\n### VARIABLE: `self`\n> Signature: `local self = setmetatable({}, Animal)`\n> Lines: 116-116\n```\n116: local self = setmetatable({}, Animal)\n```\n\n### FUNCTION: `Animal:speak`\n> Signature: `function Animal:speak()`\n> Lines: 123-125\n- @return string Sound description.\n```\n123: function Animal:speak()\n124: return self.species .. \" says ...\"\n125: end\n```\n\n### VARIABLE: `Dog`\n> Signature: `local Dog = setmetatable({}, { __index = Animal })`\n> Lines: 129-129\n- @brief Dog subclass inheriting from Animal.\n```\n129: local Dog = setmetatable({}, { __index = Animal })\n```\n\n### FUNCTION: `Dog.new`\n> Signature: `function Dog.new(name)`\n> Lines: 135-140\n- @param name string The dog's name.\n---\n- @return table New Dog instance.\n```\n135: function Dog.new(name)\n136: local self = Animal.new(\"Dog\")\n137: setmetatable(self, Dog)\n138: self.dogName = name\n139: return self\n140: end\n```\n\n### VARIABLE: `self`\n> Signature: `local self = Animal.new(\"Dog\")`\n> Lines: 136-136\n```\n136: local self = Animal.new(\"Dog\")\n```\n\n### FUNCTION: `Dog:speak`\n> Signature: `function Dog:speak()`\n> Lines: 144-146\n- @return string The dog's vocalization.\n```\n144: function Dog:speak()\n145: return self.dogName .. \" says Woof!\"\n146: end\n```\n\n### FUNCTION: `makeCounter`\n> Signature: `local function makeCounter(step)`\n> Lines: 153-160\n- @param step number Increment amount per call.\n---\n- @return function Closure returning successive counts.\n```\n153: local function makeCounter(step)\n154: local count = 0\n155: return function()\n157: count = count + step\n158: return count\n159: end\n160: end\n```\n\n### VARIABLE: `count`\n> Signature: `local count = 0`\n> Lines: 154-154\n```\n154: local count = 0\n```\n\n### FUNCTION: `fibonacci`\n> Signature: `local function fibonacci(limit)`\n> Lines: 167-176\n- @param limit number Maximum number of values to yield.\n---\n- @return function Coroutine wrap function.\n```\n167: local function fibonacci(limit)\n168: return coroutine.wrap(function()\n169: local a, b = 0, 1\n170: for _ = 1, limit do\n171: coroutine.yield(a)\n173: a, b = b, a + b\n174: end\n175: end)\n176: end\n```\n\n### FUNCTION: `safeCall`\n> Signature: `local function safeCall(fn, ...)`\n> Lines: 184-192\n- @param fn function The function to execute.\n---\n- @param ... any Arguments to pass to fn.\n---\n- @return boolean, any Success flag and result or error message.\n```\n184: local function safeCall(fn, ...)\n185: local ok, result = pcall(fn, ...)\n186: if not ok then\n188: print(\"Error: \" .. tostring(result))\n189: return false, nil\n190: end\n191: return true, result\n192: end\n```\n\n### VARIABLE: `mixedTable`\n> Signature: `local mixedTable =`\n> Lines: 197-197\n- @brief Complex table demonstrating all key types.\n```\n197: local mixedTable = {\n```\n\n### FUNCTION: `range`\n> Signature: `local function range(from, to)`\n> Lines: 219-228\n- @param from number Start of range (inclusive).\n---\n- @param to number End of range (inclusive).\n---\n- @return function Iterator function.\n```\n219: local function range(from, to)\n220: local i = from - 1\n221: return function()\n222: i = i + 1\n223: if i <= to then\n224: return i\n225: end\n227: end\n228: end\n```\n\n### VARIABLE: `i`\n> Signature: `local i = from - 1`\n> Lines: 220-220\n```\n220: local i = from - 1\n```\n\n### FUNCTION: `req_cover_lua_1`\n> Signature: `function req_cover_lua_1(value)`\n> Lines: 236-238\n- @brief Coverage helper construct 1.\n--\n- @details Provides deterministic fixture-level Doxygen coverage block 1.\n--\n- @param value Input value for helper construct 1.\n--\n- @return Output value for helper construct 1.\n```\n236: function req_cover_lua_1(value)\n237: return value + 1\n238: end\n```\n\n### FUNCTION: `req_cover_lua_2`\n> Signature: `function req_cover_lua_2(value)`\n> Lines: 245-247\n- @brief Coverage helper construct 2.\n--\n- @details Provides deterministic fixture-level Doxygen coverage block 2.\n--\n- @param value Input value for helper construct 2.\n--\n- @return Output value for helper construct 2.\n```\n245: function req_cover_lua_2(value)\n246: return value + 2\n247: end\n```\n\n### FUNCTION: `req_cover_lua_3`\n> Signature: `function req_cover_lua_3(value)`\n> Lines: 254-256\n- @brief Coverage helper construct 3.\n--\n- @details Provides deterministic fixture-level Doxygen coverage block 3.\n--\n- @param value Input value for helper construct 3.\n--\n- @return Output value for helper construct 3.\n```\n254: function req_cover_lua_3(value)\n255: return value + 3\n256: end\n```\n\n### FUNCTION: `req_cover_lua_4`\n> Signature: `function req_cover_lua_4(value)`\n> Lines: 263-265\n- @brief Coverage helper construct 4.\n--\n- @details Provides deterministic fixture-level Doxygen coverage block 4.\n--\n- @param value Input value for helper construct 4.\n--\n- @return Output value for helper construct 4.\n```\n263: function req_cover_lua_4(value)\n264: return value + 4\n265: end\n```\n\n### FUNCTION: `req_cover_lua_5`\n> Signature: `function req_cover_lua_5(value)`\n> Lines: 272-274\n- @brief Coverage helper construct 5.\n--\n- @details Provides deterministic fixture-level Doxygen coverage block 5.\n--\n- @param value Input value for helper construct 5.\n--\n- @return Output value for helper construct 5.\n```\n272: function req_cover_lua_5(value)\n273: return value + 5\n274: end\n```\n",
|
|
4
|
+
"stderr": ""
|
|
5
|
+
}
|
package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_perl.pl.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
{
|
|
2
|
+
"code": 0,
|
|
3
|
+
"stdout": "@@@ tests/fixtures/fixture_perl.pl | perl\n\n### MODULE: `MyPackage`\n> Signature: `package MyPackage`\n> Lines: 16-16\n- @brief Comprehensive Perl test fixture for parser validation.\n- @brief Documentation block for the fixture module.\n- @details Covers OOP with bless, Moose-like attributes, closures,\nhere-docs, wantarray, dispatch tables, prototypes, AUTOLOAD,\nand regular expressions.\nSingle line comment\n=pod\n- @details This module demonstrates advanced Perl constructs including\nobject-oriented patterns, closures, and metaprogramming.\n=cut\n```\n16: package MyPackage;\n```\n\n### IMPORT: `strict`\n> Lines: 18-18\n```\n18: use strict;\n```\n\n### IMPORT: `warnings`\n> Lines: 19-19\n```\n19: use warnings;\n```\n\n### IMPORT: `Carp qw(croak confess)`\n> Lines: 20-20\n```\n20: use Carp qw(croak confess);\n```\n\n### IMPORT: `Exporter`\n> Lines: 21-21\n```\n21: require Exporter;\n```\n\n### CONSTANT: `MAX_SIZE`\n> Signature: `use constant MAX_SIZE => 100`\n> Lines: 22-22\n```\n22: use constant MAX_SIZE => 100;\n```\n\n### FUNCTION: `new`\n> Signature: `sub new`\n> Lines: 48-48\n- @brief Create a new MyPackage instance.\n- @param class The class name (implicit first argument).\n- @param %args Named arguments: name (required), age (optional).\n- @return Blessed hashref instance.\n=cut\n```\n48: sub new {\n```\n\n### FUNCTION: `name`\n> Signature: `sub name`\n> Lines: 62-62\n- @brief Accessor for the name attribute.\n- @return The instance name string.\n```\n62: sub name {\n```\n\n### FUNCTION: `is_valid`\n> Signature: `sub is_valid`\n> Lines: 74-74\n- @brief Check if the instance is in a valid state.\n- @return 1 if valid, 0 otherwise.\n```\n74: sub is_valid {\n```\n\n### FUNCTION: `greet`\n> Signature: `sub greet`\n> Lines: 83-83\n- @brief Print a greeting to stdout.\n- @param $name The person's name.\n```\n83: sub greet {\n```\n\n### FUNCTION: `process`\n> Signature: `sub process`\n> Lines: 95-95\n- @brief Process data and return result.\n- @return 1 indicating success.\n```\n95: sub process {\n```\n\n### FUNCTION: `format_output`\n> Signature: `sub format_output`\n> Lines: 102-102\n- @brief Format output depending on context (list vs scalar).\n- @param @items List of items to format.\n- @return In list context: formatted items. In scalar: count.\n```\n102: sub format_output {\n```\n\n### FUNCTION: `helper`\n> Signature: `sub helper`\n> Lines: 115-115\n- @brief Standalone helper for internal use.\n- @return Always returns \"ok\".\n```\n115: sub helper {\n```\n\n### FUNCTION: `extract_emails`\n> Signature: `sub extract_emails`\n> Lines: 124-124\n- @brief Extract all email addresses from text.\n- @param $text Input text to scan.\n- @return List of matched email addresses.\n```\n124: sub extract_emails {\n```\n\n### FUNCTION: `replace_all`\n> Signature: `sub replace_all`\n> Lines: 139-139\n- @brief Replace all occurrences of a pattern in text.\n- @param $text Input text.\n- @param $pattern Regex pattern to find.\n- @param $replacement Replacement string.\n- @return Modified text with substitutions applied.\n```\n139: sub replace_all {\n```\n\n### FUNCTION: `make_multiplier`\n> Signature: `sub make_multiplier`\n> Lines: 150-150\n- @brief Create a multiplier closure.\n- @param $factor The multiplication factor.\n- @return Coderef that multiplies its argument by factor.\n```\n150: sub make_multiplier {\n```\n\n### FUNCTION: `dispatch`\n> Signature: `sub dispatch`\n> Lines: 178-178\n```\n178: sub dispatch {\n```\n\n### FUNCTION: `generate_template`\n> Signature: `sub generate_template`\n> Lines: 190-190\n- @brief Generate a template string using a here-document.\n- @param $name Name to insert into the template.\n- @return Formatted multi-line string.\n```\n190: sub generate_template {\n```\n\n### FUNCTION: `AUTOLOAD`\n> Signature: `sub AUTOLOAD`\n> Lines: 210-210\n- @brief Handle undefined method calls dynamically.\n- @details Methods named get_* return the corresponding attribute.\n- @param @args Arguments passed to the auto-loaded method.\n- @return The attribute value or undef.\n```\n210: sub AUTOLOAD {\n```\n\n### FUNCTION: `safe_execute`\n> Signature: `sub safe_execute`\n> Lines: 230-230\n- @brief Execute a block with error trapping.\n- @param $code Coderef to execute.\n- @return Result of execution or undef on error.\n```\n230: sub safe_execute {\n```\n\n### MODULE: `Extra::One`\n> Signature: `package Extra::One`\n> Lines: 248-248\n```\n248: package Extra::One;\n```\n\n### MODULE: `Extra::Two`\n> Signature: `package Extra::Two`\n> Lines: 249-249\n```\n249: package Extra::Two;\n```\n\n### MODULE: `Extra::Three`\n> Signature: `package Extra::Three`\n> Lines: 250-250\n```\n250: package Extra::Three;\n```\n\n### MODULE: `Extra::Four`\n> Signature: `package Extra::Four`\n> Lines: 251-251\n```\n251: package Extra::Four;\n```\n\n### CONSTANT: `RETRY_LIMIT`\n> Signature: `use constant RETRY_LIMIT => 5`\n> Lines: 252-252\n```\n252: use constant RETRY_LIMIT => 5;\n```\n\n### CONSTANT: `API_HOST`\n> Signature: `use constant API_HOST => 'localhost'`\n> Lines: 253-253\n```\n253: use constant API_HOST => 'localhost';\n```\n\n### CONSTANT: `FEATURE_FLAG`\n> Signature: `use constant FEATURE_FLAG => 1`\n> Lines: 254-254\n```\n254: use constant FEATURE_FLAG => 1;\n```\n\n### CONSTANT: `CACHE_SIZE`\n> Signature: `use constant CACHE_SIZE => 256`\n> Lines: 255-255\n```\n255: use constant CACHE_SIZE => 256;\n```\n\n### CONSTANT: `DEFAULT_USER`\n> Signature: `use constant DEFAULT_USER => 'guest'`\n> Lines: 256-256\n```\n256: use constant DEFAULT_USER => 'guest';\n```\n\n### IMPORT: `lib 'lib'`\n> Lines: 257-257\n```\n257: use lib 'lib';\n```\n\n### FUNCTION: `req_cover_perl_1`\n> Signature: `sub req_cover_perl_1`\n> Lines: 265-265\n- @brief Coverage helper construct 1.\n- @details Provides deterministic fixture-level Doxygen coverage block 1.\n- @param value Input value for helper construct 1.\n- @return Output value for helper construct 1.\n```\n265: sub req_cover_perl_1 {\n```\n\n### FUNCTION: `req_cover_perl_2`\n> Signature: `sub req_cover_perl_2`\n> Lines: 275-275\n- @brief Coverage helper construct 2.\n- @details Provides deterministic fixture-level Doxygen coverage block 2.\n- @param value Input value for helper construct 2.\n- @return Output value for helper construct 2.\n```\n275: sub req_cover_perl_2 {\n```\n\n### FUNCTION: `req_cover_perl_3`\n> Signature: `sub req_cover_perl_3`\n> Lines: 285-285\n- @brief Coverage helper construct 3.\n- @details Provides deterministic fixture-level Doxygen coverage block 3.\n- @param value Input value for helper construct 3.\n- @return Output value for helper construct 3.\n```\n285: sub req_cover_perl_3 {\n```\n\n### FUNCTION: `req_cover_perl_4`\n> Signature: `sub req_cover_perl_4`\n> Lines: 295-295\n- @brief Coverage helper construct 4.\n- @details Provides deterministic fixture-level Doxygen coverage block 4.\n- @param value Input value for helper construct 4.\n- @return Output value for helper construct 4.\n```\n295: sub req_cover_perl_4 {\n```\n\n### FUNCTION: `req_cover_perl_5`\n> Signature: `sub req_cover_perl_5`\n> Lines: 305-305\n- @brief Coverage helper construct 5.\n- @details Provides deterministic fixture-level Doxygen coverage block 5.\n- @param value Input value for helper construct 5.\n- @return Output value for helper construct 5.\n```\n305: sub req_cover_perl_5 {\n```\n",
|
|
4
|
+
"stderr": ""
|
|
5
|
+
}
|
package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_php.php.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
{
|
|
2
|
+
"code": 0,
|
|
3
|
+
"stdout": "@@@ tests/fixtures/fixture_php.php | php\n- @brief Comprehensive PHP test fixture for parser validation.\n- @details Covers enums with methods, union/intersection types, readonly\nproperties, constructor promotion, arrow functions, match expressions,\nfirst-class callables, attributes, fibers, and named arguments.\n\n### NAMESPACE: `App\\Models`\n> Signature: `namespace App\\Models`\n> Lines: 12-15\n```\n12: namespace App\\Models;\n14: use App\\Contracts\\Repository;\n15: use App\\Events\\{ModelCreated, ModelDeleted};\n```\n\n### IMPORT: `App\\Contracts\\Repository`\n> Lines: 14-14\n```\n14: use App\\Contracts\\Repository;\n```\n\n### IMPORT: `App\\Events\\{ModelCreated, ModelDeleted}`\n> Lines: 15-15\n```\n15: use App\\Events\\{ModelCreated, ModelDeleted};\n```\n\n### IMPORT: `Psr\\Log\\LoggerInterface`\n> Lines: 16-16\n```\n16: use Psr\\Log\\LoggerInterface;\n```\n\n### IMPORT: `'config.php'`\n> Lines: 17-17\n```\n17: require_once 'config.php';\n```\n\n### CONSTANT: `VERSION`\n> Signature: `const VERSION = \"1.0\"`\n> Lines: 22-22\n- @brief Application version string. */\n```\n22: const VERSION = \"1.0\";\n```\n\n### CONSTANT: `MAX_PER_PAGE`\n> Signature: `const MAX_PER_PAGE = 50`\n> Lines: 25-25\n- @brief Maximum number of query results per page. */\n```\n25: const MAX_PER_PAGE = 50;\n```\n\n### FUNCTION: `isActive`\n> Signature: `public function isActive(): bool`\n> Lines: 45-47\n- @brief Check if the status represents an active state.\n- @return bool True if the entity is publicly visible.\n```\n45: public function isActive(): bool {\n46: return $this === self::Published;\n47: }\n```\n\n### FUNCTION: `label`\n> Signature: `public function label(): string`\n> Lines: 53-59\n- @brief Get a human-readable label for display.\n- @return string Formatted status label.\n```\n53: public function label(): string {\n54: return match($this) {\n55: self::Draft => 'Draft',\n56: self::Published => 'Published',\n57: self::Archived => 'Archived',\n58: };\n59: }\n```\n\n### CLASS: `BaseModel`\n> Signature: `abstract class BaseModel`\n> Lines: 69-111\n- @brief Abstract base model with common persistence operations.\n- @brief Construct a model with promoted properties.\n- @details Uses constructor promotion for compact field declaration.\n- @param int $id Unique identifier (readonly after construction).\n- @param \\DateTimeImmutable $createdAt Timestamp of creation.\n```\n69: abstract class BaseModel {\n75: public function __construct(\n76: public readonly int $id,\n77: public readonly \\DateTimeImmutable $createdAt = new \\DateTimeImmutable(),\n78: ) {}\n84: public function save(): bool {\n86: if (!$this->validate()) {\n87: return false;\n88: }\n89: return true;\n90: }\n96: abstract protected function validate(): bool;\n102: private static function validateConstraints(): bool {\n103: return true;\n104: }\n110: abstract public function toArray(): array;\n111: }\n```\n\n### FUNCTION: `__construct`\n> Signature: `public function __construct(`\n> Lines: 75-78\n- @brief Construct a model with promoted properties.\n- @param int $id Unique identifier (readonly after construction).\n- @param \\DateTimeImmutable $createdAt Timestamp of creation.\n```\n75: public function __construct(\n76: public readonly int $id,\n77: public readonly \\DateTimeImmutable $createdAt = new \\DateTimeImmutable(),\n78: ) {}\n```\n\n### FUNCTION: `save`\n> Signature: `public function save(): bool`\n> Lines: 84-90\n- @brief Persist the model to the data store.\n- @return bool True if save succeeded.\n```\n84: public function save(): bool {\n86: if (!$this->validate()) {\n87: return false;\n88: }\n89: return true;\n90: }\n```\n\n### FUNCTION: `validateConstraints`\n> Signature: `private static function validateConstraints(): bool`\n> Lines: 102-104\n- @brief Internal validation helper with type narrowing.\n- @return bool True if entity passes all constraint checks.\n```\n102: private static function validateConstraints(): bool {\n103: return true;\n104: }\n```\n\n### CLASS: `User`\n> Signature: `final class User extends BaseModel`\n> Lines: 120-179\n- @brief Concrete user entity with union and intersection types.\n- @brief User's display name.\n```\n120: final class User extends BaseModel {\n122: private string $name;\n125: private ?string $email;\n133: public function __construct(\n134: int $id,\n135: string $name,\n136: ?string $email = null,\n137: ) {\n138: parent::__construct($id);\n139: $this->name = $name;\n140: $this->email = $email;\n141: }\n147: public function getName(): string {\n148: return $this->name;\n149: }\n155: public function getIdentifier(): string|int {\n157: return $this->email ?? $this->id;\n158: }\n164: protected function validate(): bool {\n165: return strlen($this->name) > 0;\n166: }\n172: public function toArray(): array {\n173: return [\n174: 'id' => $this->id,\n175: 'name' => $this->name,\n176: 'email' => $this->email,\n177: ];\n178: }\n179: }\n```\n\n### FUNCTION: `__construct`\n> Signature: `public function __construct(`\n> Lines: 133-141\n- @brief Construct a User with promoted and explicit properties.\n- @param int $id Unique user ID.\n- @param string $name Display name.\n- @param string|null $email Optional email address.\n```\n133: public function __construct(\n134: int $id,\n135: string $name,\n136: ?string $email = null,\n137: ) {\n138: parent::__construct($id);\n139: $this->name = $name;\n140: $this->email = $email;\n141: }\n```\n\n### FUNCTION: `getName`\n> Signature: `public function getName(): string`\n> Lines: 147-149\n- @brief Get the user's display name.\n- @return string The user name.\n```\n147: public function getName(): string {\n148: return $this->name;\n149: }\n```\n\n### FUNCTION: `getIdentifier`\n> Signature: `public function getIdentifier(): string|int`\n> Lines: 155-158\n- @brief Get a value that may be string or int.\n- @return string|int The identifier in either format.\n```\n155: public function getIdentifier(): string|int {\n157: return $this->email ?? $this->id;\n158: }\n```\n\n### FUNCTION: `validate`\n> Signature: `protected function validate(): bool`\n> Lines: 164-166\n- @brief Validate user-specific constraints.\n- @return bool True if name is non-empty.\n```\n164: protected function validate(): bool {\n165: return strlen($this->name) > 0;\n166: }\n```\n\n### FUNCTION: `toArray`\n> Signature: `public function toArray(): array`\n> Lines: 172-178\n- @brief Serialize user to array.\n- @return array<string, mixed> User data array.\n```\n172: public function toArray(): array {\n173: return [\n174: 'id' => $this->id,\n175: 'name' => $this->name,\n176: 'email' => $this->email,\n177: ];\n178: }\n```\n\n### INTERFACE: `Repo`\n> Signature: `interface Repo`\n> Lines: 187-207\n- @brief Generic repository interface for data access patterns.\n- @brief Retrieve all entities.\n- @return iterable<BaseModel> Collection of models.\n```\n187: interface Repo {\n192: public function findAll(): iterable;\n199: public function findById(int $id): ?BaseModel;\n206: public function count(array $criteria = []): int;\n207: }\n```\n\n### FUNCTION: `findAll`\n> Signature: `public function findAll(): iterable`\n> Lines: 192-215\n- @brief Retrieve all entities.\n- @brief Find a single entity by ID.\n- @param int $id Entity identifier.\n- @return iterable<BaseModel> Collection of models.\n- @return BaseModel|null The found entity or null.\n```\n192: public function findAll(): iterable;\n199: public function findById(int $id): ?BaseModel;\n206: public function count(array $criteria = []): int;\n207: }\n215: trait Cacheable {\n```\n\n### FUNCTION: `findById`\n> Signature: `public function findById(int $id): ?BaseModel`\n> Lines: 199-215\n- @brief Find a single entity by ID.\n- @brief Count entities matching a filter.\n- @param int $id Entity identifier.\n- @param array<string, mixed> $criteria Filter criteria.\n- @return BaseModel|null The found entity or null.\n- @return int Number of matching entities.\n```\n199: public function findById(int $id): ?BaseModel;\n206: public function count(array $criteria = []): int;\n207: }\n215: trait Cacheable {\n```\n\n### FUNCTION: `count`\n> Signature: `public function count(array $criteria = []): int`\n> Lines: 206-215\n- @brief Count entities matching a filter.\n- @param array<string, mixed> $criteria Filter criteria.\n- @return int Number of matching entities.\n```\n206: public function count(array $criteria = []): int;\n207: }\n215: trait Cacheable {\n```\n\n### TRAIT: `Cacheable`\n> Signature: `trait Cacheable`\n> Lines: 215-241\n- @brief Provides caching capabilities for models.\n- @brief Cache TTL in seconds.\n```\n215: trait Cacheable {\n217: protected int $cacheTtl = 3600;\n223: public function cache(): bool {\n225: return true;\n226: }\n232: public function invalidateCache(): void {\n234: }\n240: abstract public function cacheKey(): string;\n241: }\n```\n\n### FUNCTION: `cache`\n> Signature: `public function cache(): bool`\n> Lines: 223-226\n- @brief Store the current object in cache.\n- @return bool True if caching succeeded.\n```\n223: public function cache(): bool {\n225: return true;\n226: }\n```\n\n### FUNCTION: `invalidateCache`\n> Signature: `public function invalidateCache(): void`\n> Lines: 232-234\n- @brief Invalidate the cached version of this object.\n- @return void\n```\n232: public function invalidateCache(): void {\n234: }\n```\n\n### TRAIT: `SoftDeletable`\n> Signature: `trait SoftDeletable`\n> Lines: 247-266\n- @brief Adds soft delete functionality to models.\n- @brief Timestamp of soft deletion or null if active.\n```\n247: trait SoftDeletable {\n249: protected ?\\DateTimeImmutable $deletedAt = null;\n255: public function softDelete(): void {\n256: $this->deletedAt = new \\DateTimeImmutable();\n257: }\n263: public function isDeleted(): bool {\n264: return $this->deletedAt !== null;\n265: }\n266: }\n```\n\n### FUNCTION: `softDelete`\n> Signature: `public function softDelete(): void`\n> Lines: 255-257\n- @brief Mark the entity as soft-deleted.\n- @return void\n```\n255: public function softDelete(): void {\n256: $this->deletedAt = new \\DateTimeImmutable();\n257: }\n```\n\n### FUNCTION: `isDeleted`\n> Signature: `public function isDeleted(): bool`\n> Lines: 263-265\n- @brief Check if the entity is currently deleted.\n- @return bool True if soft-deleted.\n```\n263: public function isDeleted(): bool {\n264: return $this->deletedAt !== null;\n265: }\n```\n\n### CLASS: `CachedUser`\n> Signature: `final class CachedUser extends User`\n> Lines: 275-286\n- @brief User entity with caching and soft-delete capabilities.\n```\n275: final class CachedUser extends User {\n276: use Cacheable;\n277: use SoftDeletable;\n283: public function cacheKey(): string {\n284: return \"user:{$this->id}\";\n285: }\n286: }\n```\n\n### IMPORT: `Cacheable`\n> Lines: 276-276\n```\n276: use Cacheable;\n```\n\n### IMPORT: `SoftDeletable`\n> Lines: 277-277\n```\n277: use SoftDeletable;\n```\n\n### FUNCTION: `cacheKey`\n> Signature: `public function cacheKey(): string`\n> Lines: 283-285\n- @brief Generate a unique cache key for this user.\n- @return string Cache key in format \"user:{id}\".\n```\n283: public function cacheKey(): string {\n284: return \"user:{$this->id}\";\n285: }\n```\n\n### CLASS: `Route`\n> Signature: `class Route`\n> Lines: 295-305\n- @brief PHP attribute for annotating controller methods with routes.\n- @brief Define a route attribute.\n- @param string $path URL path pattern.\n- @param string $method HTTP method (GET, POST, etc.).\n```\n295: class Route {\n301: public function __construct(\n302: public readonly string $path,\n303: public readonly string $method = 'GET',\n304: ) {}\n305: }\n```\n\n### FUNCTION: `__construct`\n> Signature: `public function __construct(`\n> Lines: 301-304\n- @brief Define a route attribute.\n- @param string $path URL path pattern.\n- @param string $method HTTP method (GET, POST, etc.).\n```\n301: public function __construct(\n302: public readonly string $path,\n303: public readonly string $method = 'GET',\n304: ) {}\n```\n\n### FUNCTION: `helper`\n> Signature: `function helper(): bool`\n> Lines: 314-316\n- @brief Standalone helper returning a boolean result.\n- @return bool Always returns true.\n```\n314: function helper(): bool {\n315: return true;\n316: }\n```\n\n### FUNCTION: `processData`\n> Signature: `function processData(mixed $data): string`\n> Lines: 324-333\n- @brief Process data using match expression for type dispatching.\n- @param mixed $data Input data of any type.\n- @return string Description of the processed data.\n```\n324: function processData(mixed $data): string {\n326: return match(true) {\n327: is_string($data) => \"string: \" . strlen($data),\n328: is_int($data) => \"int: $data\",\n329: is_array($data) => \"array: \" . count($data),\n330: $data instanceof BaseModel => \"model: \" . $data->id,\n331: default => \"unknown\",\n332: };\n333: }\n```\n\n### FUNCTION: `applyTransform`\n> Signature: `function applyTransform(array $items, callable $fn): array`\n> Lines: 342-344\n- @brief Higher-order function using arrow function syntax.\n- @param array<int> $items Array of integers.\n- @param callable(int): int $fn Transform function.\n- @return array<int> Transformed array.\n```\n342: function applyTransform(array $items, callable $fn): array {\n343: return array_map(fn(int $x): int => $fn($x), $items);\n344: }\n```\n\n### FUNCTION: `createMultiplier`\n> Signature: `function createMultiplier(int $factor): \\Closure`\n> Lines: 352-355\n- @brief Create a closure that multiplies its argument.\n- @param int $factor The multiplication factor.\n- @return \\Closure(int): int A multiplier closure.\n```\n352: function createMultiplier(int $factor): \\Closure {\n354: return fn(int $x): int => $x * $factor;\n355: }\n```\n\n### FUNCTION: `readFileContent`\n> Signature: `function readFileContent(string $path): string|false`\n> Lines: 363-368\n- @brief Read file contents with comprehensive error handling.\n- @param string $path File system path.\n- @return string|false File contents or false on failure.\n```\n363: function readFileContent(string $path): string|false {\n364: if (!file_exists($path)) {\n365: return false;\n366: }\n367: return file_get_contents($path);\n368: }\n```\n\n### NAMESPACE: `App\\Services`\n> Signature: `namespace App\\Services`\n> Lines: 371-375\n```\n371: namespace App\\Services;\n372: namespace App\\Http;\n373: namespace App\\Domain;\n374: namespace App\\Support;\n375: interface ServiceContract {}\n```\n\n### NAMESPACE: `App\\Http`\n> Signature: `namespace App\\Http`\n> Lines: 372-375\n```\n372: namespace App\\Http;\n373: namespace App\\Domain;\n374: namespace App\\Support;\n375: interface ServiceContract {}\n```\n\n### NAMESPACE: `App\\Domain`\n> Signature: `namespace App\\Domain`\n> Lines: 373-375\n```\n373: namespace App\\Domain;\n374: namespace App\\Support;\n375: interface ServiceContract {}\n```\n\n### NAMESPACE: `App\\Support`\n> Signature: `namespace App\\Support`\n> Lines: 374-375\n```\n374: namespace App\\Support;\n375: interface ServiceContract {}\n```\n\n### INTERFACE: `ServiceContract`\n> Signature: `interface ServiceContract {}`\n> Lines: 375-375\n```\n375: interface ServiceContract {}\n```\n\n### INTERFACE: `CacheContract`\n> Signature: `interface CacheContract {}`\n> Lines: 376-376\n```\n376: interface CacheContract {}\n```\n\n### INTERFACE: `LoggerContract`\n> Signature: `interface LoggerContract {}`\n> Lines: 377-377\n```\n377: interface LoggerContract {}\n```\n\n### INTERFACE: `EventContract`\n> Signature: `interface EventContract {}`\n> Lines: 378-378\n```\n378: interface EventContract {}\n```\n\n### TRAIT: `HandlesEvents`\n> Signature: `trait HandlesEvents {}`\n> Lines: 379-379\n```\n379: trait HandlesEvents {}\n```\n\n### TRAIT: `TracksChanges`\n> Signature: `trait TracksChanges {}`\n> Lines: 380-380\n```\n380: trait TracksChanges {}\n```\n\n### TRAIT: `AuthorizesRequests`\n> Signature: `trait AuthorizesRequests {}`\n> Lines: 381-381\n```\n381: trait AuthorizesRequests {}\n```\n\n### CONSTANT: `API_LIMIT`\n> Signature: `const API_LIMIT = 50`\n> Lines: 382-382\n```\n382: const API_LIMIT = 50;\n```\n\n### CONSTANT: `DEFAULT_PAGE`\n> Signature: `const DEFAULT_PAGE = 1`\n> Lines: 383-383\n```\n383: const DEFAULT_PAGE = 1;\n```\n\n### CONSTANT: `TIMEOUT`\n> Signature: `const TIMEOUT = 30`\n> Lines: 384-384\n```\n384: const TIMEOUT = 30;\n```\n\n### CLASS: `ApiClient`\n> Signature: `final class ApiClient {}`\n> Lines: 385-385\n```\n385: final class ApiClient {}\n```\n\n### FUNCTION: `req_cover_php_1`\n> Signature: `function req_cover_php_1(int $value): int { return $value + 1; }`\n> Lines: 395-395\n- @brief Coverage helper construct 1.\n- @details Provides deterministic fixture-level Doxygen coverage block 1.\n- @param value Input value for helper construct 1.\n- @return Output value for helper construct 1.\n```\n395: function req_cover_php_1(int $value): int { return $value + 1; }\n```\n\n### FUNCTION: `req_cover_php_2`\n> Signature: `function req_cover_php_2(int $value): int { return $value + 2; }`\n> Lines: 404-404\n- @brief Coverage helper construct 2.\n- @details Provides deterministic fixture-level Doxygen coverage block 2.\n- @param value Input value for helper construct 2.\n- @return Output value for helper construct 2.\n```\n404: function req_cover_php_2(int $value): int { return $value + 2; }\n```\n\n### FUNCTION: `req_cover_php_3`\n> Signature: `function req_cover_php_3(int $value): int { return $value + 3; }`\n> Lines: 413-413\n- @brief Coverage helper construct 3.\n- @details Provides deterministic fixture-level Doxygen coverage block 3.\n- @param value Input value for helper construct 3.\n- @return Output value for helper construct 3.\n```\n413: function req_cover_php_3(int $value): int { return $value + 3; }\n```\n\n### FUNCTION: `req_cover_php_4`\n> Signature: `function req_cover_php_4(int $value): int { return $value + 4; }`\n> Lines: 422-422\n- @brief Coverage helper construct 4.\n- @details Provides deterministic fixture-level Doxygen coverage block 4.\n- @param value Input value for helper construct 4.\n- @return Output value for helper construct 4.\n```\n422: function req_cover_php_4(int $value): int { return $value + 4; }\n```\n\n### FUNCTION: `req_cover_php_5`\n> Signature: `function req_cover_php_5(int $value): int { return $value + 5; }`\n> Lines: 431-431\n- @brief Coverage helper construct 5.\n- @details Provides deterministic fixture-level Doxygen coverage block 5.\n- @param value Input value for helper construct 5.\n- @return Output value for helper construct 5.\n```\n431: function req_cover_php_5(int $value): int { return $value + 5; }\n```\n",
|
|
4
|
+
"stderr": ""
|
|
5
|
+
}
|
package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_python.py.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
{
|
|
2
|
+
"code": 0,
|
|
3
|
+
"stdout": "@@@ tests/fixtures/fixture_python.py | python\n- @brief Comprehensive Python test fixture for parser validation.\n- @details Covers classes, protocols, decorators, generators, async functions, and rich Doxygen-tagged constructs used to validate extraction workflows and deterministic parser behavior.\n\n### IMPORT: `asyncio #!< @brief Async IO support. @details Used for async test fixtures. # noqa: F401`\n> Lines: 7-7\n- @brief Async IO support.\n- @details Used for async test fixtures. # noqa: F401\n```\n7: import asyncio\n```\n\n### IMPORT: `os #!< @brief OS interface module. @details Provides OS-dependent functionality. # noqa: F401`\n> Lines: 8-8\n- @brief OS interface module.\n- @details Provides OS-dependent functionality. # noqa: F401\n```\n8: import os\n```\n\n### IMPORT: `sys #!< @brief System-specific parameters. @see sys.exit() for exit handling.`\n> Lines: 9-9\n- @brief System-specific parameters.\n- @see sys.exit() for exit handling.\n```\n9: import sys\n```\n\n### IMPORT: `Path #!< @brief Object-oriented filesystem paths. @note Preferred over os.path. # noqa: F401`\n> Lines: 10-10\n- @brief Object-oriented filesystem paths.\n- @note Preferred over os.path. # noqa: F401\n```\n10: from pathlib import Path\n```\n\n### IMPORT: `(`\n> Lines: 11-11\n```\n11: from typing import (\n```\n\n### IMPORT: `dataclass, field`\n> Lines: 15-15\n```\n15: from dataclasses import dataclass, field\n```\n\n### IMPORT: `ABC, abstractmethod`\n> Lines: 16-16\n```\n16: from abc import ABC, abstractmethod\n```\n\n### IMPORT: `contextmanager`\n> Lines: 17-17\n```\n17: from contextlib import contextmanager\n```\n\n### VARIABLE: `MAX_RETRIES`\n> Signature: `MAX_RETRIES = 3 #!< @brief Maximum retry attempts. @details Applied to network operations. @warning Tune per use case. @satisfies retry-policy`\n> Lines: 19-19\n- @brief Maximum retry attempts.\n- @details Applied to network operations.\n- @warning Tune per use case.\n- @satisfies retry-policy\n```\n19: MAX_RETRIES = 3\n```\n\n### VARIABLE: `DEFAULT_TIMEOUT`\n> Signature: `DEFAULT_TIMEOUT = 30.0 #!< @brief Default timeout in seconds. @note For I/O operations.`\n> Lines: 20-20\n- @brief Default timeout in seconds.\n- @note For I/O operations.\n```\n20: DEFAULT_TIMEOUT = 30.0\n```\n\n### DECORATOR: `dataclass`\n> Lines: 26-26\n```\n26: @dataclass(slots=True)\n```\n\n### CLASS: `Config`\n> Signature: `class Config`\n> Lines: 27-61\n- @brief Stores key-value pairs with optional default fallback.\n- @details Dataclass-based configuration with validation.\n- @note Immutable after creation when frozen=True is used.\n- @see __post_init__() for validation logic.\n```\n27: class Config:\n35: name: str\n36: values: Dict[str, str] = field(default_factory=dict)\n37: debug: bool = False\n39: def get(self, key: str, default: str = \"\") -> str:\n47: if key in self.values:\n48: return self.values[key]\n50: return default\n52: def __post_init__(self) -> None:\n58: if not self.name.strip():\n59: raise ValueError(\"Config name cannot be empty\")\n```\n\n### FUNCTION: `get`\n> Signature: `def get(self, key: str, default: str = \"\") -> str`\n> Lines: 39-51\n- @brief Stores key-value pairs with optional default fallback.\n- @details Dataclass-based configuration with validation.\n- @param key The configuration key to look up.\n- @param default Fallback value if key is missing.\n- @return The configuration value or default.\n- @note Immutable after creation when frozen=True is used.\n- @see __post_init__() for validation logic.\n```\n39: def get(self, key: str, default: str = \"\") -> str:\n47: if key in self.values:\n48: return self.values[key]\n50: return default\n```\n\n### FUNCTION: `__post_init__`\n> Signature: `def __post_init__(self) -> None`\n> Lines: 52-61\n- @brief Ensures name is non-empty and normalizes values. @raises ValueError If name is empty or whitespace.\n```\n52: def __post_init__(self) -> None:\n58: if not self.name.strip():\n59: raise ValueError(\"Config name cannot be empty\")\n```\n\n### CLASS: `MyClass`\n> Signature: `class MyClass`\n> Lines: 62-167\n- @brief Base class demonstrating various Python constructs.\n- @details Includes nested classes, properties, and static methods.\n```\n62: class MyClass:\n69: class InnerHelper:\n74: def __init__(self, tag: str):\n79: self.tag = tag\n81: def describe(self) -> str:\n86: return f\"Helper({self.tag})\"\n88: def __init__(self, name: str, retries: int = MAX_RETRIES):\n94: self._name = name\n95: self._retries = retries\n97: self._call_count = 0\n99: @property\n100: def name(self) -> str:\n105: return self._name\n107: @name.setter\n108: def name(self, value: str) -> None:\n114: if not value:\n115: raise ValueError(\"Name cannot be empty\")\n116: self._name = value\n118: @staticmethod\n119: def create_default() -> \"MyClass\":\n124: return MyClass(\"default\")\n126: @classmethod\n127: def from_dict(cls, data: dict) -> \"MyClass\":\n134: return cls(\n135: name=data[\"name\"],\n136: retries=data.get(\"retries\", MAX_RETRIES),\n137: )\n139: def process(self, items: List[str], *, verbose: bool = False) -> Optional[str]:\n146: self._call_count += 1\n147: for item in items:\n149: if not item.strip():\n150: continue\n151: if verbose:\n152: print(f\"Processing: {item}\")\n154: return item if len(item) > 1 else item.upper()\n155: return None\n157: def compute(self, x: int, y: int) -> int:\n165: return (x + y) if (x > 0 and y > 0) else abs(x - y)\n```\n\n### CLASS: `InnerHelper`\n> Signature: `class InnerHelper`\n> Lines: 69-87\n- @brief Base class demonstrating various Python constructs.\n- @brief Handles auxiliary computations within MyClass scope.\n- @details Includes nested classes, properties, and static methods.\n```\n69: class InnerHelper:\n74: def __init__(self, tag: str):\n79: self.tag = tag\n81: def describe(self) -> str:\n86: return f\"Helper({self.tag})\"\n```\n\n### FUNCTION: `__init__`\n> Signature: `def __init__(self, tag: str)`\n> Lines: 74-80\n- @brief Handles auxiliary computations within MyClass scope.\n- @param tag Short label for categorization.\n```\n74: def __init__(self, tag: str):\n79: self.tag = tag\n```\n\n### FUNCTION: `describe`\n> Signature: `def describe(self) -> str`\n> Lines: 81-87\n- @return String combining class name and tag.\n```\n81: def describe(self) -> str:\n86: return f\"Helper({self.tag})\"\n```\n\n### FUNCTION: `__init__`\n> Signature: `def __init__(self, name: str, retries: int = MAX_RETRIES)`\n> Lines: 88-98\n- @param name Identifier for this instance.\n- @param retries Maximum retry attempts; defaults to MAX_RETRIES.\n```\n88: def __init__(self, name: str, retries: int = MAX_RETRIES):\n94: self._name = name\n95: self._retries = retries\n97: self._call_count = 0\n```\n\n### DECORATOR: `property`\n> Lines: 99-99\n```\n99: @property\n```\n\n### FUNCTION: `name`\n> Signature: `def name(self) -> str`\n> Lines: 100-106\n- @return The name string set during initialization.\n```\n100: def name(self) -> str:\n105: return self._name\n```\n\n### DECORATOR: `name.setter`\n> Lines: 107-107\n```\n107: @name.setter\n```\n\n### FUNCTION: `name`\n> Signature: `def name(self, value: str) -> None`\n> Lines: 108-117\n- @param value New name; must be non-empty. @raises ValueError If value is empty.\n```\n108: def name(self, value: str) -> None:\n114: if not value:\n115: raise ValueError(\"Name cannot be empty\")\n116: self._name = value\n```\n\n### DECORATOR: `staticmethod`\n> Lines: 118-118\n```\n118: @staticmethod\n```\n\n### FUNCTION: `create_default`\n> Signature: `def create_default() -> \"MyClass\"`\n> Lines: 119-125\n- @return A new MyClass instance with name='default'.\n```\n119: def create_default() -> \"MyClass\":\n124: return MyClass(\"default\")\n```\n\n### DECORATOR: `classmethod`\n> Lines: 126-126\n```\n126: @classmethod\n```\n\n### FUNCTION: `from_dict`\n> Signature: `def from_dict(cls, data: dict) -> \"MyClass\"`\n> Lines: 127-138\n- @param data Dictionary with 'name' and optional 'retries' keys.\n- @return A new instance populated from data. @raises KeyError If 'name' key is missing.\n```\n127: def from_dict(cls, data: dict) -> \"MyClass\":\n134: return cls(\n135: name=data[\"name\"],\n136: retries=data.get(\"retries\", MAX_RETRIES),\n137: )\n```\n\n### FUNCTION: `process`\n> Signature: `def process(self, items: List[str], *, verbose: bool = False) -> Optional[str]`\n> Lines: 139-156\n- @param items List of strings to process sequentially.\n- @param verbose Enable detailed logging when True.\n- @return The first valid item found or None if all are empty.\n```\n139: def process(self, items: List[str], *, verbose: bool = False) -> Optional[str]:\n146: self._call_count += 1\n147: for item in items:\n149: if not item.strip():\n150: continue\n151: if verbose:\n152: print(f\"Processing: {item}\")\n154: return item if len(item) > 1 else item.upper()\n155: return None\n```\n\n### FUNCTION: `compute`\n> Signature: `def compute(self, x: int, y: int) -> int`\n> Lines: 157-167\n- @param x First operand.\n- @param y Second operand.\n- @return Sum if both positive, difference otherwise.\n```\n157: def compute(self, x: int, y: int) -> int:\n165: return (x + y) if (x > 0 and y > 0) else abs(x - y)\n```\n\n### CLASS: `AbstractProcessor`\n> Signature: `class AbstractProcessor(ABC)`\n> Lines: 168-196\n- @brief Defines the interface that concrete processors must implement.\n- @details ABC-based interface with abstract methods.\n- @note Subclasses must implement execute() and execute_async().\n- @see ConcreteProcessor for a working implementation.\n- @sa ABC documentation for abstract base class patterns.\n```\n168: class AbstractProcessor(ABC):\n178: @abstractmethod\n179: def execute(self, data: bytes) -> bool:\n185: ...\n187: @abstractmethod\n188: async def execute_async(self, data: bytes) -> bool:\n194: ...\n```\n\n### DECORATOR: `abstractmethod`\n> Lines: 178-178\n- @brief Defines the interface that concrete processors must implement.\n- @details ABC-based interface with abstract methods.\n- @note Subclasses must implement execute() and execute_async().\n- @see ConcreteProcessor for a working implementation.\n- @sa ABC documentation for abstract base class patterns.\n```\n178: @abstractmethod\n```\n\n### FUNCTION: `execute`\n> Signature: `def execute(self, data: bytes) -> bool`\n> Lines: 179-186\n- @param data The raw input bytes to process.\n- @return True if processing succeeded, False otherwise.\n```\n179: def execute(self, data: bytes) -> bool:\n185: ...\n```\n\n### DECORATOR: `abstractmethod`\n> Lines: 187-187\n```\n187: @abstractmethod\n```\n\n### FUNCTION: `execute_async`\n> Signature: `async def execute_async(self, data: bytes) -> bool`\n> Lines: 188-196\n- @param data The raw input bytes to process.\n- @return True if processing succeeded.\n```\n188: async def execute_async(self, data: bytes) -> bool:\n194: ...\n```\n\n### CLASS: `ConcreteProcessor`\n> Signature: `class ConcreteProcessor(AbstractProcessor)`\n> Lines: 197-231\n- @brief Processes byte data by decoding and validating content.\n- @details Implements synchronous and async execute methods.\n- @note Thread-safe for read operations.\n- @see AbstractProcessor for interface definition.\n```\n197: class ConcreteProcessor(AbstractProcessor):\n206: def execute(self, data: bytes) -> bool:\n213: try:\n214: text = data.decode(\"utf-8\")\n216: return bool(text.strip())\n217: except UnicodeDecodeError:\n218: return False\n219: finally:\n221: pass\n223: async def execute_async(self, data: bytes) -> bool:\n229: return self.execute(data)\n```\n\n### FUNCTION: `execute`\n> Signature: `def execute(self, data: bytes) -> bool`\n> Lines: 206-222\n- @brief Processes byte data by decoding and validating content.\n- @details Implements synchronous and async execute methods.\n- @param data Raw bytes, expected UTF-8 encoded text.\n- @return True if decoding and validation succeed. @raises UnicodeDecodeError Propagated if data is not valid UTF-8.\n- @note Thread-safe for read operations.\n- @see AbstractProcessor for interface definition.\n```\n206: def execute(self, data: bytes) -> bool:\n213: try:\n214: text = data.decode(\"utf-8\")\n216: return bool(text.strip())\n217: except UnicodeDecodeError:\n218: return False\n219: finally:\n221: pass\n```\n\n### FUNCTION: `execute_async`\n> Signature: `async def execute_async(self, data: bytes) -> bool`\n> Lines: 223-231\n- @param data Raw bytes to process asynchronously.\n- @return True if valid content found.\n```\n223: async def execute_async(self, data: bytes) -> bool:\n229: return self.execute(data)\n```\n\n### CLASS: `GenericContainer`\n> Signature: `class GenericContainer(Generic[T])`\n> Lines: 232-271\n- @brief Type-safe collection with iteration and lookup support.\n- @details Generic collection with find and iteration. @tparam T The element type stored in this container.\n- @note Implements __iter__ for iteration protocol.\n- @see typing.Generic for generics documentation.\n```\n232: class GenericContainer(Generic[T]):\n242: def __init__(self) -> None:\n244: self._items: List[T] = []\n246: def add(self, item: T) -> None:\n251: self._items.append(item)\n253: def __iter__(self) -> Iterator[T]:\n258: yield from self._items\n260: def find(self, predicate) -> Optional[T]:\n266: for item in self._items:\n267: if predicate(item):\n268: return item\n269: return None\n```\n\n### FUNCTION: `__init__`\n> Signature: `def __init__(self) -> None`\n> Lines: 242-245\n- @brief Type-safe collection with iteration and lookup support.\n- @details Generic collection with find and iteration.\n@tparam T The element type stored in this container.\n- @note Implements __iter__ for iteration protocol.\n- @see typing.Generic for generics documentation.\n```\n242: def __init__(self) -> None:\n244: self._items: List[T] = []\n```\n\n### FUNCTION: `add`\n> Signature: `def add(self, item: T) -> None`\n> Lines: 246-252\n- @param item Element of type T to add.\n```\n246: def add(self, item: T) -> None:\n251: self._items.append(item)\n```\n\n### FUNCTION: `__iter__`\n> Signature: `def __iter__(self) -> Iterator[T]`\n> Lines: 253-259\n- @return Iterator yielding items of type T.\n```\n253: def __iter__(self) -> Iterator[T]:\n258: yield from self._items\n```\n\n### FUNCTION: `find`\n> Signature: `def find(self, predicate) -> Optional[T]`\n> Lines: 260-271\n- @param predicate Callable accepting T and returning bool.\n- @return The first matching item or None.\n```\n260: def find(self, predicate) -> Optional[T]:\n266: for item in self._items:\n267: if predicate(item):\n268: return item\n269: return None\n```\n\n### CLASS: `Renderable`\n> Signature: `class Renderable(Protocol)`\n> Lines: 272-285\n- @brief Structural typing interface for render-capable objects.\n```\n272: class Renderable(Protocol):\n278: def render(self) -> str:\n283: ...\n```\n\n### FUNCTION: `render`\n> Signature: `def render(self) -> str`\n> Lines: 278-285\n- @brief Structural typing interface for render-capable objects.\n- @return Rendered string output.\n```\n278: def render(self) -> str:\n283: ...\n```\n\n### DECORATOR: `property`\n> Lines: 286-286\n```\n286: @property\n```\n\n### FUNCTION: `regular_function`\n> Signature: `def regular_function(x: int) -> int`\n> Lines: 287-295\n- @param x Input integer value.\n- @return The input value unchanged.\n```\n287: def regular_function(x: int) -> int:\n293: return x\n```\n\n### FUNCTION: `function_with_walrus`\n> Signature: `def function_with_walrus(data: List[int]) -> Optional[int]`\n> Lines: 296-307\n- @param data List of integers to scan.\n- @return The first value greater than 10, or None.\n```\n296: def function_with_walrus(data: List[int]) -> Optional[int]:\n303: if (n := next((x for x in data if x > 10), None)) is not None:\n304: return n\n305: return None\n```\n\n### FUNCTION: `multi_return_paths`\n> Signature: `def multi_return_paths(value: int) -> Union[str, int, None]`\n> Lines: 308-325\n- @param value Integer selector for branching logic.\n- @return A string, integer, or None depending on value.\n```\n308: def multi_return_paths(value: int) -> Union[str, int, None]:\n314: match value:\n315: case 0:\n316: return \"zero\"\n317: case n if n < 0:\n319: return abs(n)\n320: case n if n > 100:\n321: return None\n322: case _:\n323: return str(value)\n```\n\n### FUNCTION: `generator_function`\n> Signature: `def generator_function(limit: int) -> Iterator[int]`\n> Lines: 326-336\n- @param limit Upper bound (exclusive) for generation. @yield Squared integers from 0 to limit-1.\n```\n326: def generator_function(limit: int) -> Iterator[int]:\n332: for i in range(limit):\n334: yield i * i\n```\n\n### FUNCTION: `async_generator`\n> Signature: `async def async_generator(items: List[str]) -> AsyncIterator[str]`\n> Lines: 337-347\n- @param items Source strings to process. @yield Upper-cased non-empty strings.\n```\n337: async def async_generator(items: List[str]) -> AsyncIterator[str]:\n343: for item in items:\n344: if item.strip():\n345: yield item.upper()\n```\n\n### DECORATOR: `contextmanager`\n> Lines: 348-348\n- @brief Context manager decorator.\n- @see contextlib.contextmanager\n```\n348: @contextmanager\n```\n\n### FUNCTION: `managed_resource`\n> Signature: `def managed_resource(path: str)`\n> Lines: 349-362\n- @param path File system path to the resource. @yield The opened file handle. @raises IOError If the resource cannot be opened.\n```\n349: def managed_resource(path: str):\n356: f = open(path, \"r\")\n357: try:\n358: yield f\n359: finally:\n360: f.close()\n```\n\n### FUNCTION: `closure_factory`\n> Signature: `def closure_factory(multiplier: int)`\n> Lines: 363-379\n- @param multiplier The fixed multiplier for the returned function.\n- @return A callable that multiplies input by multiplier.\n```\n363: def closure_factory(multiplier: int):\n369: def inner(x: int) -> int:\n376: return x * multiplier\n377: return inner\n```\n\n### FUNCTION: `inner`\n> Signature: `def inner(x: int) -> int`\n> Lines: 369-376\n- @param multiplier The fixed multiplier for the returned function.\n- @param x Value to multiply.\n- @return A callable that multiplies input by multiplier.\n- @return Product of x and the captured multiplier.\n```\n369: def inner(x: int) -> int:\n376: return x * multiplier\n```\n\n### FUNCTION: `uses_unpacking`\n> Signature: `def uses_unpacking(*args: int, **kwargs: str) -> Dict[str, Union[int, str]]`\n> Lines: 380-393\n- @param args Positional integer arguments.\n- @param kwargs Named string arguments.\n- @return Combined dictionary of all arguments.\n```\n380: def uses_unpacking(*args: int, **kwargs: str) -> Dict[str, Union[int, str]]:\n387: result: Dict[str, Union[int, str]] = {}\n388: for i, val in enumerate(args):\n389: result[f\"arg_{i}\"] = val\n390: result.update(kwargs)\n391: return result\n```\n\n### VARIABLE: `EVEN_SQUARES`\n> Signature: `EVEN_SQUARES = [x ** 2 for x in range(20) if x % 2 == 0]`\n> Lines: 398-398\n```\n398: EVEN_SQUARES = [x ** 2 for x in range(20) if x % 2 == 0]\n```\n\n### FUNCTION: `async_function`\n> Signature: `async def async_function()`\n> Lines: 401-408\n- @brief Minimal async function for testing async detection.\n```\n401: async def async_function():\n406: await asyncio.sleep(0)\n```\n\n### FUNCTION: `deeply_nested_logic`\n> Signature: `def deeply_nested_logic(matrix: List[List[int]]) -> int`\n> Lines: 409-429\n- @param matrix 2D list of integers.\n- @return Cumulative sum of positive even values.\n```\n409: def deeply_nested_logic(matrix: List[List[int]]) -> int:\n415: total = 0\n416: for row in matrix:\n417: for val in row:\n418: if val > 0:\n419: if val % 2 == 0:\n421: total += val\n422: else:\n423: continue\n424: else:\n426: pass\n427: return total\n```\n\n### FUNCTION: `exception_handling_example`\n> Signature: `def exception_handling_example(path: str) -> Optional[str]`\n> Lines: 430-453\n- @param path File path to attempt reading.\n- @return File contents or None on failure.\n```\n430: def exception_handling_example(path: str) -> Optional[str]:\n436: try:\n437: with open(path, \"r\") as f:\n438: content = f.read()\n439: if not content:\n440: raise ValueError(\"Empty file\")\n441: return content\n442: except FileNotFoundError:\n444: return None\n445: except (PermissionError, OSError) as e:\n447: sys.exit(1)\n448: except Exception:\n449: raise\n450: finally:\n452: pass\n```\n\n### VARIABLE: `MAX_BATCH`\n> Signature: `MAX_BATCH = 64 # inline extension comment`\n> Lines: 455-455\n```\n455: MAX_BATCH = 64\n```\n\n### VARIABLE: `CACHE_LIMIT`\n> Signature: `CACHE_LIMIT = 128`\n> Lines: 457-457\n```\n457: CACHE_LIMIT = 128\n```\n\n### VARIABLE: `MAX_USERS`\n> Signature: `MAX_USERS = 500`\n> Lines: 459-459\n```\n459: MAX_USERS = 500\n```\n\n### FUNCTION: `req_cover_py_1`\n> Signature: `def req_cover_py_1(value: int) -> int`\n> Lines: 467-469\n- @brief Coverage helper construct 1.\n- @details Provides deterministic fixture-level Doxygen coverage block 1.\n- @param value Input value for helper construct 1.\n- @return Output value for helper construct 1.\n```\n467: def req_cover_py_1(value: int) -> int:\n468: return value + 1\n```\n\n### FUNCTION: `req_cover_py_2`\n> Signature: `def req_cover_py_2(value: int) -> int`\n> Lines: 475-477\n- @brief Coverage helper construct 2.\n- @details Provides deterministic fixture-level Doxygen coverage block 2.\n- @param value Input value for helper construct 2.\n- @return Output value for helper construct 2.\n```\n475: def req_cover_py_2(value: int) -> int:\n476: return value + 2\n```\n\n### FUNCTION: `req_cover_py_3`\n> Signature: `def req_cover_py_3(value: int) -> int`\n> Lines: 483-485\n- @brief Coverage helper construct 3.\n- @details Provides deterministic fixture-level Doxygen coverage block 3.\n- @param value Input value for helper construct 3.\n- @return Output value for helper construct 3.\n```\n483: def req_cover_py_3(value: int) -> int:\n484: return value + 3\n```\n\n### FUNCTION: `req_cover_py_4`\n> Signature: `def req_cover_py_4(value: int) -> int`\n> Lines: 491-493\n- @brief Coverage helper construct 4.\n- @details Provides deterministic fixture-level Doxygen coverage block 4.\n- @param value Input value for helper construct 4.\n- @return Output value for helper construct 4.\n```\n491: def req_cover_py_4(value: int) -> int:\n492: return value + 4\n```\n\n### FUNCTION: `req_cover_py_5`\n> Signature: `def req_cover_py_5(value: int) -> int`\n> Lines: 499-501\n- @brief Coverage helper construct 5.\n- @details Provides deterministic fixture-level Doxygen coverage block 5.\n- @param value Input value for helper construct 5.\n- @return Output value for helper construct 5.\n```\n499: def req_cover_py_5(value: int) -> int:\n500: return value + 5\n```\n",
|
|
4
|
+
"stderr": ""
|
|
5
|
+
}
|
package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_ruby.rb.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
{
|
|
2
|
+
"code": 0,
|
|
3
|
+
"stdout": "@@@ tests/fixtures/fixture_ruby.rb | ruby\n\n### IMPORT: `'json'`\n> Lines: 10-10\n```\n10: require 'json'\n```\n\n### IMPORT: `'set'`\n> Lines: 11-11\n```\n11: require 'set'\n```\n\n### IMPORT: `'helper'`\n> Lines: 12-12\n```\n12: require_relative 'helper'\n```\n\n### CONSTANT: `MAX_RETRIES`\n> Signature: `MAX_RETRIES = 42`\n> Lines: 15-15\n- @brief Maximum retry attempts for transient failures.\n```\n15: MAX_RETRIES = 42\n```\n\n### CONSTANT: `DEFAULT_ENCODING`\n> Signature: `DEFAULT_ENCODING = 'utf-8'.freeze`\n> Lines: 18-18\n- @brief Frozen string constant for default encoding.\n```\n18: DEFAULT_ENCODING = 'utf-8'.freeze\n```\n\n### DECORATOR: `:name, :age`\n> Lines: 20-20\n```\n20: attr_accessor :name, :age\n```\n\n### MODULE: `Loggable`\n> Signature: `module Loggable`\n> Lines: 26-39\n- @brief Mixin providing logging capabilities to including classes.\n- @brief Log a message to stdout with the class name prefix.\n- @param message [String] The message to log.\n```\n26: module Loggable\n29: def log(message)\n30: puts \"[#{self.class.name}] #{message}\"\n31: end\n35: def log_error(error)\n36: puts \"[ERROR] #{error.message}\"\n37: puts error.backtrace.first(5).join(\"\\n\") if error.backtrace\n38: end\n39: end\n```\n\n### FUNCTION: `log`\n> Signature: `def log(message)`\n> Lines: 29-31\n- @brief Log a message to stdout with the class name prefix.\n- @param message [String] The message to log.\n```\n29: def log(message)\n30: puts \"[#{self.class.name}] #{message}\"\n31: end\n```\n\n### FUNCTION: `log_error`\n> Signature: `def log_error(error)`\n> Lines: 35-38\n- @brief Log an error with backtrace information.\n- @param error [Exception] The exception to log.\n```\n35: def log_error(error)\n36: puts \"[ERROR] #{error.message}\"\n37: puts error.backtrace.first(5).join(\"\\n\") if error.backtrace\n38: end\n```\n\n### CLASS: `MyClass`\n> Signature: `class MyClass`\n> Lines: 47-153\n```\n47: class MyClass\n48: include Loggable\n49: include Comparable\n52: attr_accessor :name\n55: attr_reader :created_at\n60: def initialize(name, **options)\n61: @name = name\n62: @options = options\n63: @created_at = Time.now\n65: @options[:retries] ||= MAX_RETRIES\n66: end\n71: def self.create(attrs)\n72: new(attrs[:name], **attrs.except(:name))\n73: end\n78: def self.bulk_create(names)\n79: names.map { |n| new(n) }\n80: end\n84: def valid?\n85: !@name.nil? && !@name.empty?\n86: end\n91: def matches?(pattern)\n92: return false if @name.nil?\n93: pattern.match?(@name)\n94: end\n99: def <=>(other)\n100: @name <=> other.name\n101: end\n106: def +(other)\n107: self.class.new(\"#{@name}+#{other.name}\")\n108: end\n112: def to_s\n113: \"MyClass(#{@name})\"\n114: end\n121: def method_missing(method, *args, &block)\n122: if method.to_s.start_with?('find_by_')\n123: field = method.to_s.sub('find_by_', '')\n124: \"Finding by #{field}: #{args.first}\"\n125: else\n126: super\n127: end\n128: end\n134: def respond_to_missing?(method, include_private = false)\n135: method.to_s.start_with?('find_by_') || super\n136: end\n138: protected\n142: def internal_config\n143: @options.dup\n144: end\n146: private\n150: def validate!\n151: raise \"Invalid name\" unless valid?\n152: end\n153: end\n```\n\n### DECORATOR: `:name`\n> Lines: 52-52\n- @brief Read/write accessor for the instance name.\n```\n52: attr_accessor :name\n```\n\n### DECORATOR: `:created_at`\n> Lines: 55-55\n- @brief Read-only accessor for the creation timestamp.\n```\n55: attr_reader :created_at\n```\n\n### FUNCTION: `initialize`\n> Signature: `def initialize(name, **options)`\n> Lines: 60-66\n- @brief Initialize a new MyClass instance.\n- @param name [String] The instance identifier.\n- @param options [Hash] Optional configuration hash.\n```\n60: def initialize(name, **options)\n61: @name = name\n62: @options = options\n63: @created_at = Time.now\n65: @options[:retries] ||= MAX_RETRIES\n66: end\n```\n\n### FUNCTION: `create`\n> Signature: `def self.create(attrs)`\n> Lines: 71-73\n- @brief Factory method creating an instance from a hash.\n- @param attrs [Hash] Attribute hash with :name key required.\n- @return [MyClass] A new instance populated from attrs.\n```\n71: def self.create(attrs)\n72: new(attrs[:name], **attrs.except(:name))\n73: end\n```\n\n### FUNCTION: `bulk_create`\n> Signature: `def self.bulk_create(names)`\n> Lines: 78-80\n- @brief Build multiple instances from an array of names.\n- @param names [Array<String>] Names to create instances for.\n- @return [Array<MyClass>] Array of new instances.\n```\n78: def self.bulk_create(names)\n79: names.map { |n| new(n) }\n80: end\n```\n\n### FUNCTION: `valid?`\n> Signature: `def valid?`\n> Lines: 84-86\n- @brief Predicate checking if the instance is valid.\n- @return [Boolean] True if name is non-empty.\n```\n84: def valid?\n85: !@name.nil? && !@name.empty?\n86: end\n```\n\n### FUNCTION: `matches?`\n> Signature: `def matches?(pattern)`\n> Lines: 91-94\n- @brief Check if name matches a pattern.\n- @param pattern [Regexp] Regular expression to test against.\n- @return [Boolean] True if name matches the pattern.\n```\n91: def matches?(pattern)\n92: return false if @name.nil?\n93: pattern.match?(@name)\n94: end\n```\n\n### FUNCTION: `to_s`\n> Signature: `def to_s`\n> Lines: 112-114\n- @brief Convert to string representation.\n- @return [String] Human-readable description.\n```\n112: def to_s\n113: \"MyClass(#{@name})\"\n114: end\n```\n\n### FUNCTION: `method_missing`\n> Signature: `def method_missing(method, *args, &block)`\n> Lines: 121-128\n```\n121: def method_missing(method, *args, &block)\n122: if method.to_s.start_with?('find_by_')\n123: field = method.to_s.sub('find_by_', '')\n124: \"Finding by #{field}: #{args.first}\"\n125: else\n126: super\n127: end\n128: end\n```\n\n### FUNCTION: `respond_to_missing?`\n> Signature: `def respond_to_missing?(method, include_private = false)`\n> Lines: 134-136\n- @brief Declare which dynamic methods respond_to? should recognize.\n- @param method [Symbol] The method name to check.\n- @param include_private [Boolean] Whether to include private methods.\n- @return [Boolean] True if the method is handled dynamically.\n```\n134: def respond_to_missing?(method, include_private = false)\n135: method.to_s.start_with?('find_by_') || super\n136: end\n```\n\n### FUNCTION: `internal_config`\n> Signature: `def internal_config`\n> Lines: 142-144\n- @brief Protected helper for internal computations.\n- @return [Hash] Current options hash.\n```\n142: def internal_config\n143: @options.dup\n144: end\n```\n\n### FUNCTION: `validate!`\n> Signature: `def validate!`\n> Lines: 150-152\n```\n150: def validate!\n151: raise \"Invalid name\" unless valid?\n152: end\n```\n\n### CLASS: `SpecialClass`\n> Signature: `class SpecialClass < MyClass`\n> Lines: 160-174\n- @brief Specialized subclass with additional behavior.\n- @brief Initialize with a priority level.\n- @param name [String] Instance name.\n- @param priority [Integer] Processing priority (lower = first).\n```\n160: class SpecialClass < MyClass\n164: def initialize(name, priority: 0, **options)\n165: super(name, **options)\n166: @priority = priority\n167: end\n171: def to_s\n172: \"SpecialClass(#{@name}, pri=#{@priority})\"\n173: end\n174: end\n```\n\n### FUNCTION: `initialize`\n> Signature: `def initialize(name, priority: 0, **options)`\n> Lines: 164-167\n- @brief Initialize with a priority level.\n- @param name [String] Instance name.\n- @param priority [Integer] Processing priority (lower = first).\n```\n164: def initialize(name, priority: 0, **options)\n165: super(name, **options)\n166: @priority = priority\n167: end\n```\n\n### FUNCTION: `to_s`\n> Signature: `def to_s`\n> Lines: 171-173\n- @brief Override to_s with priority information.\n- @return [String] Description including priority.\n```\n171: def to_s\n172: \"SpecialClass(#{@name}, pri=#{@priority})\"\n173: end\n```\n\n### MODULE: `MyModule`\n> Signature: `module MyModule`\n> Lines: 180-207\n- @brief Utility module providing helper methods.\n- @brief Module-level helper returning a boolean.\n- @return [Boolean] Always returns true.\n```\n180: module MyModule\n183: def helper\n184: true\n185: end\n191: def process_with_block(data)\n192: if block_given?\n193: yield(data)\n194: else\n195: data\n196: end\n197: end\n204: def self.format_list(items)\n205: items.map(&:to_s).join(', ')\n206: end\n207: end\n```\n\n### FUNCTION: `helper`\n> Signature: `def helper`\n> Lines: 183-185\n- @brief Module-level helper returning a boolean.\n- @return [Boolean] Always returns true.\n```\n183: def helper\n184: true\n185: end\n```\n\n### FUNCTION: `process_with_block`\n> Signature: `def process_with_block(data)`\n> Lines: 191-197\n- @brief Process data with block yield pattern.\n- @param data [Object] Data to process.\n@yield [Object] Yields data for caller-defined processing.\n- @return [Object] The block's return value or data itself.\n```\n191: def process_with_block(data)\n192: if block_given?\n193: yield(data)\n194: else\n195: data\n196: end\n197: end\n```\n\n### FUNCTION: `format_list`\n> Signature: `def self.format_list(items)`\n> Lines: 204-206\n- @brief Utility function accessible without mixing in.\n- @param items [Array] Items to format.\n- @return [String] Comma-separated formatted string.\n```\n204: def self.format_list(items)\n205: items.map(&:to_s).join(', ')\n206: end\n```\n\n### FUNCTION: `distance_from_origin`\n> Signature: `def distance_from_origin`\n> Lines: 216-218\n- @brief Compute the Euclidean distance from origin.\n- @return [Float] Distance from (0, 0).\n```\n216: def distance_from_origin\n217: Math.sqrt(x**2 + y**2)\n218: end\n```\n\n### CLASS: `DynamicModel`\n> Signature: `class DynamicModel`\n> Lines: 225-238\n- @brief Demonstrates metaprogramming with define_method.\n- @brief Dynamically defined getter for #{field}.\n```\n225: class DynamicModel\n227: %w[title body author].each do |field|\n229: define_method(field) do\n230: instance_variable_get(\"@#{field}\")\n231: end\n234: define_method(\"#{field}=\") do |value|\n235: instance_variable_set(\"@#{field}\", value)\n236: end\n237: end\n238: end\n```\n\n### FUNCTION: `with_retry`\n> Signature: `def with_retry(attempts: MAX_RETRIES)`\n> Lines: 255-268\n```\n255: def with_retry(attempts: MAX_RETRIES)\n256: tries = 0\n257: begin\n258: tries += 1\n259: yield\n260: rescue StandardError => e\n262: retry if tries < attempts\n263: raise \"Failed after #{attempts} attempts: #{e.message}\"\n264: ensure\n266: puts \"Completed after #{tries} attempt(s)\"\n267: end\n268: end\n```\n\n### MODULE: `StringExtensions`\n> Signature: `module StringExtensions`\n> Lines: 274-282\n- @brief Refinement adding utility methods to String.\n- @brief Check if the string is a valid email address.\n- @return [Boolean] True if string matches email pattern.\n```\n274: module StringExtensions\n275: refine String do\n278: def email?\n279: match?(/\\A[\\w+\\-.]+@[a-z\\d\\-]+(\\.[a-z\\d\\-]+)*\\.[a-z]+\\z/i)\n280: end\n281: end\n282: end\n```\n\n### FUNCTION: `email?`\n> Signature: `def email?`\n> Lines: 278-280\n- @brief Check if the string is a valid email address.\n- @return [Boolean] True if string matches email pattern.\n```\n278: def email?\n279: match?(/\\A[\\w+\\-.]+@[a-z\\d\\-]+(\\.[a-z\\d\\-]+)*\\.[a-z]+\\z/i)\n280: end\n```\n\n### CLASS: `ServiceObject`\n> Signature: `class ServiceObject; end # inline class comment`\n> Lines: 287-307\n```\n287: class ServiceObject; end\n288: class ReportBuilder; end\n289: module Metrics; end\n290: module Extras; end\n291: MAX_LIMIT = 100\n292: API_VERSION = \"v2\"\n293: CACHE_SIZE = 1024\n294: attr_writer :token\n295: attr_reader :state\n296: require 'yaml'\n297: require 'logger'\n305: def req_cover_ruby_1(value)\n306: value + 1\n307: end\n```\n\n### CLASS: `ReportBuilder`\n> Signature: `class ReportBuilder; end`\n> Lines: 288-307\n```\n288: class ReportBuilder; end\n289: module Metrics; end\n290: module Extras; end\n291: MAX_LIMIT = 100\n292: API_VERSION = \"v2\"\n293: CACHE_SIZE = 1024\n294: attr_writer :token\n295: attr_reader :state\n296: require 'yaml'\n297: require 'logger'\n305: def req_cover_ruby_1(value)\n306: value + 1\n307: end\n```\n\n### MODULE: `Metrics`\n> Signature: `module Metrics; end`\n> Lines: 289-307\n```\n289: module Metrics; end\n290: module Extras; end\n291: MAX_LIMIT = 100\n292: API_VERSION = \"v2\"\n293: CACHE_SIZE = 1024\n294: attr_writer :token\n295: attr_reader :state\n296: require 'yaml'\n297: require 'logger'\n305: def req_cover_ruby_1(value)\n306: value + 1\n307: end\n```\n\n### MODULE: `Extras`\n> Signature: `module Extras; end`\n> Lines: 290-307\n```\n290: module Extras; end\n291: MAX_LIMIT = 100\n292: API_VERSION = \"v2\"\n293: CACHE_SIZE = 1024\n294: attr_writer :token\n295: attr_reader :state\n296: require 'yaml'\n297: require 'logger'\n305: def req_cover_ruby_1(value)\n306: value + 1\n307: end\n```\n\n### CONSTANT: `MAX_LIMIT`\n> Signature: `MAX_LIMIT = 100`\n> Lines: 291-291\n```\n291: MAX_LIMIT = 100\n```\n\n### CONSTANT: `API_VERSION`\n> Signature: `API_VERSION = \"v2\"`\n> Lines: 292-292\n```\n292: API_VERSION = \"v2\"\n```\n\n### CONSTANT: `CACHE_SIZE`\n> Signature: `CACHE_SIZE = 1024`\n> Lines: 293-293\n```\n293: CACHE_SIZE = 1024\n```\n\n### DECORATOR: `:token`\n> Lines: 294-294\n```\n294: attr_writer :token\n```\n\n### DECORATOR: `:state`\n> Lines: 295-295\n```\n295: attr_reader :state\n```\n\n### IMPORT: `'yaml'`\n> Lines: 296-296\n```\n296: require 'yaml'\n```\n\n### IMPORT: `'logger'`\n> Lines: 297-297\n```\n297: require 'logger'\n```\n\n### FUNCTION: `req_cover_ruby_1`\n> Signature: `def req_cover_ruby_1(value)`\n> Lines: 305-307\n- @brief Coverage helper construct 1.\n- @details Provides deterministic fixture-level Doxygen coverage block 1.\n- @param value Input value for helper construct 1.\n- @return Output value for helper construct 1.\n```\n305: def req_cover_ruby_1(value)\n306: value + 1\n307: end\n```\n\n### FUNCTION: `req_cover_ruby_2`\n> Signature: `def req_cover_ruby_2(value)`\n> Lines: 314-316\n- @brief Coverage helper construct 2.\n- @details Provides deterministic fixture-level Doxygen coverage block 2.\n- @param value Input value for helper construct 2.\n- @return Output value for helper construct 2.\n```\n314: def req_cover_ruby_2(value)\n315: value + 2\n316: end\n```\n\n### FUNCTION: `req_cover_ruby_3`\n> Signature: `def req_cover_ruby_3(value)`\n> Lines: 323-325\n- @brief Coverage helper construct 3.\n- @details Provides deterministic fixture-level Doxygen coverage block 3.\n- @param value Input value for helper construct 3.\n- @return Output value for helper construct 3.\n```\n323: def req_cover_ruby_3(value)\n324: value + 3\n325: end\n```\n\n### FUNCTION: `req_cover_ruby_4`\n> Signature: `def req_cover_ruby_4(value)`\n> Lines: 332-334\n- @brief Coverage helper construct 4.\n- @details Provides deterministic fixture-level Doxygen coverage block 4.\n- @param value Input value for helper construct 4.\n- @return Output value for helper construct 4.\n```\n332: def req_cover_ruby_4(value)\n333: value + 4\n334: end\n```\n\n### FUNCTION: `req_cover_ruby_5`\n> Signature: `def req_cover_ruby_5(value)`\n> Lines: 341-343\n- @brief Coverage helper construct 5.\n- @details Provides deterministic fixture-level Doxygen coverage block 5.\n- @param value Input value for helper construct 5.\n- @return Output value for helper construct 5.\n```\n341: def req_cover_ruby_5(value)\n342: value + 5\n343: end\n```\n",
|
|
4
|
+
"stderr": ""
|
|
5
|
+
}
|
package/tests/fixtures_attended_results/standalone/files-find-line-numbers/fixture_rust.rs.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
{
|
|
2
|
+
"code": 0,
|
|
3
|
+
"stdout": "@@@ tests/fixtures/fixture_rust.rs | rust\n\n### IMPORT: `std::io`\n> Lines: 9-9\n```\n9: use std::io;\n```\n\n### IMPORT: `std::collections::HashMap`\n> Lines: 10-10\n```\n10: use std::collections::HashMap;\n```\n\n### IMPORT: `std::fmt::{self, Display, Formatter}`\n> Lines: 11-11\n```\n11: use std::fmt::{self, Display, Formatter};\n```\n\n### IMPORT: `std::sync::{Arc, Mutex}`\n> Lines: 12-12\n```\n12: use std::sync::{Arc, Mutex};\n```\n\n### DECORATOR: `derive(Debug, Clone, PartialEq)`\n> Lines: 19-19\n- @brief Holds a single i32 field with Debug/Clone derives.\n```\n19: #[derive(Debug, Clone, PartialEq)]\n```\n\n### STRUCT: `MyStruct`\n> Signature: `pub struct MyStruct`\n> Lines: 20-23\n- @brief Primary integer field.\n```\n20: pub struct MyStruct {\n22: field: i32,\n23: }\n```\n\n### DECORATOR: `derive(Debug)`\n> Lines: 29-29\n```\n29: #[derive(Debug)]\n```\n\n### STRUCT: `BorrowedData`\n> Signature: `pub struct BorrowedData<'a>`\n> Lines: 30-35\n- @brief Reference to externally-owned string data.\n- @brief Numeric tag for identification.\n```\n30: pub struct BorrowedData<'a> {\n32: content: &'a str,\n34: tag: u64,\n35: }\n```\n\n### STRUCT: `TypedMap`\n> Signature: `pub struct TypedMap<K: std::hash::Hash + Eq, V: Clone>`\n> Lines: 41-44\n- @brief Internal hash map storage.\n```\n41: pub struct TypedMap<K: std::hash::Hash + Eq, V: Clone> {\n43: inner: HashMap<K, V>,\n44: }\n```\n\n### ENUM: `MyEnum`\n> Signature: `pub enum MyEnum`\n> Lines: 51-58\n- @brief Represents either structured data, a simple flag, or a pair.\n- @brief Unit variant carrying no data.\n- @brief Tuple variant holding a string payload.\n```\n51: pub enum MyEnum {\n53: A,\n55: B(String),\n57: C { x: i32, y: i32 },\n58: }\n```\n\n### TRAIT: `MyTrait`\n> Signature: `pub trait MyTrait`\n> Lines: 65-79\n- @brief Implementors must provide both sync and optional async execution.\n```\n65: pub trait MyTrait {\n67: fn do_work(&self);\n73: fn do_work_with_ctx(&self, ctx: &str) -> bool {\n75: println!(\"ctx: {}\", ctx);\n76: self.do_work();\n77: true\n78: }\n79: }\n```\n\n### FUNCTION: `do_work`\n> Signature: `fn do_work(&self)`\n> Lines: 67-78\n```\n67: fn do_work(&self);\n73: fn do_work_with_ctx(&self, ctx: &str) -> bool {\n75: println!(\"ctx: {}\", ctx);\n76: self.do_work();\n77: true\n78: }\n```\n\n### FUNCTION: `do_work_with_ctx`\n> Signature: `fn do_work_with_ctx(&self, ctx: &str) -> bool`\n> Lines: 73-78\n- @param ctx Contextual string passed to the implementation.\n- @return True if work completed successfully.\n```\n73: fn do_work_with_ctx(&self, ctx: &str) -> bool {\n75: println!(\"ctx: {}\", ctx);\n76: self.do_work();\n77: true\n78: }\n```\n\n### TRAIT: `Parser`\n> Signature: `pub trait Parser<'a>`\n> Lines: 85-94\n- @brief The output type produced by parsing.\n```\n85: pub trait Parser<'a> {\n87: type Output;\n93: fn parse(&self, input: &'a [u8]) -> Result<Self::Output, io::Error>;\n94: }\n```\n\n### TYPE_ALIAS: `Output`\n> Signature: `type Output`\n> Lines: 87-87\n- @brief The output type produced by parsing.\n```\n87: type Output;\n```\n\n### FUNCTION: `parse`\n> Signature: `fn parse(&self, input: &'a [u8]) -> Result<Self::Output, io::Error>`\n> Lines: 93-96\n- @param input Byte slice to parse.\n- @return Parsed output or an IO error.\n```\n93: fn parse(&self, input: &'a [u8]) -> Result<Self::Output, io::Error>;\n94: }\n96: impl MyStruct {\n```\n\n### IMPL: `MyStruct`\n> Signature: `impl MyStruct`\n> Lines: 96-132\n- @return A MyStruct with field initialized to 0.\n```\n96: impl MyStruct {\n100: fn new() -> Self {\n101: Self { field: 0 }\n102: }\n108: pub fn with_value(val: i32) -> Self {\n109: Self { field: val }\n110: }\n115: pub fn value(&self) -> i32 {\n116: self.field\n117: }\n123: pub fn try_update(&mut self, new_val: i32) -> Option<i32> {\n124: if new_val == self.field {\n125: return None;\n126: }\n127: let old = self.field;\n128: self.field = new_val;\n130: Some(old)\n131: }\n132: }\n```\n\n### FUNCTION: `new`\n> Signature: `fn new() -> Self`\n> Lines: 100-102\n- @return A MyStruct with field initialized to 0.\n```\n100: fn new() -> Self {\n101: Self { field: 0 }\n102: }\n```\n\n### FUNCTION: `with_value`\n> Signature: `pub fn with_value(val: i32) -> Self`\n> Lines: 108-110\n- @param val The initial field value.\n- @return A new MyStruct.\n```\n108: pub fn with_value(val: i32) -> Self {\n109: Self { field: val }\n110: }\n```\n\n### FUNCTION: `value`\n> Signature: `pub fn value(&self) -> i32`\n> Lines: 115-117\n- @return The stored integer.\n```\n115: pub fn value(&self) -> i32 {\n116: self.field\n117: }\n```\n\n### FUNCTION: `try_update`\n> Signature: `pub fn try_update(&mut self, new_val: i32) -> Option<i32>`\n> Lines: 123-131\n- @param new_val New value to set.\n- @return Old value if updated, None if new_val equals current.\n```\n123: pub fn try_update(&mut self, new_val: i32) -> Option<i32> {\n124: if new_val == self.field {\n125: return None;\n126: }\n127: let old = self.field;\n128: self.field = new_val;\n130: Some(old)\n131: }\n```\n\n### IMPL: `MyStruct`\n> Signature: `impl MyTrait for MyStruct`\n> Lines: 134-139\n```\n134: impl MyTrait for MyStruct {\n136: fn do_work(&self) {\n137: println!(\"{:?}\", self);\n138: }\n139: }\n```\n\n### FUNCTION: `do_work`\n> Signature: `fn do_work(&self)`\n> Lines: 136-138\n```\n136: fn do_work(&self) {\n137: println!(\"{:?}\", self);\n138: }\n```\n\n### IMPL: `MyStruct`\n> Signature: `impl Display for MyStruct`\n> Lines: 141-149\n- @param f Formatter to write into.\n```\n141: impl Display for MyStruct {\n146: fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {\n147: write!(f, \"MyStruct({})\", self.field)\n148: }\n149: }\n```\n\n### FUNCTION: `fmt`\n> Signature: `fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result`\n> Lines: 146-148\n- @param f Formatter to write into.\n- @return fmt::Result indicating success or failure.\n```\n146: fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {\n147: write!(f, \"MyStruct({})\", self.field)\n148: }\n```\n\n### IMPL: `TypedMap`\n> Signature: `impl<K, V> TypedMap<K, V>`\n> Lines: 153-177\n```\n153: impl<K, V> TypedMap<K, V>\n154: where\n155: K: std::hash::Hash + Eq + Display,\n156: V: Clone + Default,\n157: {\n163: pub fn insert(&mut self, key: K, value: V) -> Option<V> {\n164: self.inner.insert(key, value)\n165: }\n171: pub fn get_or_default(&self, key: &K) -> V {\n172: match self.inner.get(key) {\n173: Some(v) => v.clone(),\n174: None => V::default(),\n175: }\n176: }\n177: }\n```\n\n### FUNCTION: `insert`\n> Signature: `pub fn insert(&mut self, key: K, value: V) -> Option<V>`\n> Lines: 163-165\n- @param key The lookup key.\n- @param value The value to associate with the key.\n- @return Previous value for this key, or None.\n```\n163: pub fn insert(&mut self, key: K, value: V) -> Option<V> {\n164: self.inner.insert(key, value)\n165: }\n```\n\n### FUNCTION: `get_or_default`\n> Signature: `pub fn get_or_default(&self, key: &K) -> V`\n> Lines: 171-176\n- @param key The key to look up.\n- @return Cloned value if found, or the default for V.\n```\n171: pub fn get_or_default(&self, key: &K) -> V {\n172: match self.inner.get(key) {\n173: Some(v) => v.clone(),\n174: None => V::default(),\n175: }\n176: }\n```\n\n### MODULE: `my_module`\n> Signature: `pub mod my_module`\n> Lines: 182-189\n- @brief Sub-module containing utility helpers.\n- @brief Inline module with pub(crate) scoped items.\n```\n182: pub mod my_module;\n185: pub(crate) mod internal {\n187: pub(crate) static COUNTER: std::sync::atomic::AtomicUsize =\n188: std::sync::atomic::AtomicUsize::new(0);\n189: }\n```\n\n### MODULE: `internal`\n> Signature: `pub(crate) mod internal`\n> Lines: 185-189\n- @brief Inline module with pub(crate) scoped items.\n```\n185: pub(crate) mod internal {\n187: pub(crate) static COUNTER: std::sync::atomic::AtomicUsize =\n188: std::sync::atomic::AtomicUsize::new(0);\n189: }\n```\n\n### CONSTANT: `COUNTER`\n> Signature: `pub(crate) static COUNTER: std::sync::atomic::AtomicUsize =`\n> Lines: 187-187\n```\n187: pub(crate) static COUNTER: std::sync::atomic::AtomicUsize =\n```\n\n### MACRO: `hashmap`\n> Signature: `macro_rules! hashmap`\n> Lines: 196-196\n- @brief Usage: `hashmap!{ \"a\" => 1, \"b\" => 2 }`.\n```\n196: macro_rules! hashmap {\n```\n\n### MACRO: `my_macro`\n> Signature: `macro_rules! my_macro`\n> Lines: 205-205\n```\n205: macro_rules! my_macro {\n```\n\n### CONSTANT: `MY_CONST`\n> Signature: `const MY_CONST: i32 = 42`\n> Lines: 217-217\n- @brief Compile-time constant for maximum retry attempts.\n```\n217: const MY_CONST: i32 = 42;\n```\n\n### CONSTANT: `MY_STATIC`\n> Signature: `static MY_STATIC: i32 = 0`\n> Lines: 220-220\n- @brief Mutable static requiring unsafe access.\n```\n220: static MY_STATIC: i32 = 0;\n```\n\n### CONSTANT: `CONFIG`\n> Signature: `static CONFIG: std::sync::LazyLock<HashMap<String, String>> =`\n> Lines: 223-223\n- @brief Thread-safe lazy-initialized global configuration.\n```\n223: static CONFIG: std::sync::LazyLock<HashMap<String, String>> =\n```\n\n### TYPE_ALIAS: `IoResult`\n> Signature: `pub type IoResult<T> = Result<T, io::Error>`\n> Lines: 229-229\n- @brief Alias for a common Result type with IO errors.\n```\n229: pub type IoResult<T> = Result<T, io::Error>;\n```\n\n### TYPE_ALIAS: `MyAlias`\n> Signature: `pub type MyAlias = i32`\n> Lines: 232-232\n- @brief Simple integer alias.\n```\n232: pub type MyAlias = i32;\n```\n\n### FUNCTION: `my_function`\n> Signature: `pub fn my_function(input: Option<&str>) -> String`\n> Lines: 240-249\n- @param input Optional string to evaluate.\n- @return Processed string or a fallback default.\n```\n240: pub fn my_function(input: Option<&str>) -> String {\n242: let text = match input {\n243: Some(s) if !s.is_empty() => s,\n244: Some(_) => return String::from(\"empty\"),\n245: None => return String::from(\"none\"),\n246: };\n248: text.to_uppercase()\n249: }\n```\n\n### FUNCTION: `async_function`\n> Signature: `pub async fn async_function() -> String`\n> Lines: 254-257\n- @return A greeting string after async computation.\n```\n254: pub async fn async_function() -> String {\n256: String::from(\"hello async\")\n257: }\n```\n\n### FUNCTION: `filter_with`\n> Signature: `pub fn filter_with<F>(items: &[i32], predicate: F) -> Vec<i32>`\n> Lines: 264-269\n- @param items Slice of integers to filter.\n- @param predicate Closure returning true for items to keep.\n- @return Vector of items passing the predicate.\n```\n264: pub fn filter_with<F>(items: &[i32], predicate: F) -> Vec<i32>\n265: where\n266: F: Fn(&i32) -> bool,\n267: {\n268: items.iter().copied().filter(|x| predicate(x)).collect()\n269: }\n```\n\n### FUNCTION: `create_worker`\n> Signature: `pub fn create_worker(use_struct: bool) -> Box<dyn MyTrait>`\n> Lines: 275-281\n- @param use_struct If true, returns MyStruct; otherwise panics.\n- @return A heap-allocated trait object implementing MyTrait.\n```\n275: pub fn create_worker(use_struct: bool) -> Box<dyn MyTrait> {\n276: if use_struct {\n277: Box::new(MyStruct::new())\n278: } else {\n279: panic!(\"No alternative implementation available\");\n280: }\n281: }\n```\n\n### FUNCTION: `read_raw`\n> Signature: `pub unsafe fn read_raw(ptr: *const i32) -> i32`\n> Lines: 288-291\n- @param ptr Raw pointer to an i32 value.\n- @return The value pointed to by ptr.\n- @sa fety Caller must ensure ptr is valid and aligned.\n```\n288: pub unsafe fn read_raw(ptr: *const i32) -> i32 {\n290: *ptr\n291: }\n```\n\n### FUNCTION: `ffi_double`\n> Signature: `pub extern \"C\" fn ffi_double(x: i32) -> i32`\n> Lines: 297-299\n- @param x Integer to double.\n- @return The input multiplied by 2.\n```\n297: pub extern \"C\" fn ffi_double(x: i32) -> i32 {\n298: x * 2\n299: }\n```\n\n### FUNCTION: `describe_enum`\n> Signature: `pub fn describe_enum(val: &MyEnum) -> String`\n> Lines: 305-315\n- @param val An enum variant to match against.\n- @return A description string for the matched variant.\n```\n305: pub fn describe_enum(val: &MyEnum) -> String {\n306: match val {\n307: MyEnum::A => String::from(\"unit\"),\n308: MyEnum::B(s) => format!(\"string: {}\", s),\n309: MyEnum::C { x, y } => {\n311: let mag = ((x * x + y * y) as f64).sqrt();\n312: format!(\"point({}, {}) mag={:.2}\", x, y, mag)\n313: }\n314: }\n315: }\n```\n\n### IMPORT: `std::time::Duration`\n> Lines: 318-318\n```\n318: use std::time::Duration;\n```\n\n### MODULE: `ext_tools`\n> Signature: `pub mod ext_tools { pub fn id() -> i32 { 1 } }`\n> Lines: 319-319\n```\n319: pub mod ext_tools { pub fn id() -> i32 { 1 } }\n```\n\n### MODULE: `ext_local`\n> Signature: `mod ext_local { pub fn ping() -> i32 { 2 } }`\n> Lines: 320-320\n```\n320: mod ext_local { pub fn ping() -> i32 { 2 } }\n```\n\n### MODULE: `ext_api`\n> Signature: `pub mod ext_api { pub fn pong() -> i32 { 3 } }`\n> Lines: 321-321\n```\n321: pub mod ext_api { pub fn pong() -> i32 { 3 } }\n```\n\n### DECORATOR: `inline`\n> Lines: 322-322\n```\n322: #[inline]\n```\n\n### DECORATOR: `allow(dead_code)`\n> Lines: 323-323\n```\n323: #[allow(dead_code)]\n```\n\n### DECORATOR: `cfg(test)`\n> Lines: 324-324\n```\n324: #[cfg(test)]\n```\n\n### ENUM: `Status`\n> Signature: `pub enum Status { Ready, Busy }`\n> Lines: 325-325\n```\n325: pub enum Status { Ready, Busy }\n```\n\n### ENUM: `Mode`\n> Signature: `pub enum Mode { Alpha, Beta }`\n> Lines: 326-326\n```\n326: pub enum Mode { Alpha, Beta }\n```\n\n### ENUM: `Signal`\n> Signature: `pub enum Signal { On, Off }`\n> Lines: 327-327\n```\n327: pub enum Signal { On, Off }\n```\n\n### ENUM: `ErrorKind`\n> Signature: `pub enum ErrorKind { Io, Parse }`\n> Lines: 328-328\n```\n328: pub enum ErrorKind { Io, Parse }\n```\n\n### STRUCT: `ExtraNode`\n> Signature: `pub struct ExtraNode { pub id: i32 }`\n> Lines: 329-329\n```\n329: pub struct ExtraNode { pub id: i32 }\n```\n\n### STRUCT: `InnerNode`\n> Signature: `struct InnerNode { id: i32 }`\n> Lines: 330-330\n```\n330: struct InnerNode { id: i32 }\n```\n\n### TRAIT: `Inspectable`\n> Signature: `pub trait Inspectable { fn inspect(&self) -> i32; }`\n> Lines: 331-331\n```\n331: pub trait Inspectable { fn inspect(&self) -> i32; }\n```\n\n### TRAIT: `Named`\n> Signature: `trait Named { fn name(&self) -> &'static str; }`\n> Lines: 332-332\n```\n332: trait Named { fn name(&self) -> &'static str; }\n```\n\n### TRAIT: `Executable`\n> Signature: `pub trait Executable { fn exec(&self) -> i32; }`\n> Lines: 333-333\n```\n333: pub trait Executable { fn exec(&self) -> i32; }\n```\n\n### IMPL: `ExtraNode`\n> Signature: `impl Inspectable for ExtraNode { fn inspect(&self) -> i32 { self.id } }`\n> Lines: 334-334\n```\n334: impl Inspectable for ExtraNode { fn inspect(&self) -> i32 { self.id } }\n```\n\n### IMPL: `InnerNode`\n> Signature: `impl Named for InnerNode { fn name(&self) -> &'static str { \"inner\" } }`\n> Lines: 335-335\n```\n335: impl Named for InnerNode { fn name(&self) -> &'static str { \"inner\" } }\n```\n\n### IMPL: `MyEnum`\n> Signature: `impl Executable for MyEnum { fn exec(&self) -> i32 { 1 } }`\n> Lines: 336-336\n```\n336: impl Executable for MyEnum { fn exec(&self) -> i32 { 1 } }\n```\n\n### MACRO: `ext_macro`\n> Signature: `macro_rules! ext_macro { () => { 42 } }`\n> Lines: 337-337\n```\n337: macro_rules! ext_macro { () => { 42 } }\n```\n\n### MACRO: `trace_macro`\n> Signature: `macro_rules! trace_macro { ($v:expr) => { $v }; }`\n> Lines: 338-338\n```\n338: macro_rules! trace_macro { ($v:expr) => { $v }; }\n```\n\n### MACRO: `build_pair`\n> Signature: `macro_rules! build_pair { ($a:expr,$b:expr) => { ($a,$b) }; }`\n> Lines: 339-339\n```\n339: macro_rules! build_pair { ($a:expr,$b:expr) => { ($a,$b) }; }\n```\n\n### CONSTANT: `LIMIT`\n> Signature: `pub const LIMIT: usize = 8`\n> Lines: 340-340\n```\n340: pub const LIMIT: usize = 8;\n```\n\n### TYPE_ALIAS: `ItemId`\n> Signature: `pub type ItemId = u64`\n> Lines: 341-341\n```\n341: pub type ItemId = u64;\n```\n\n### TYPE_ALIAS: `AliasValue`\n> Signature: `type AliasValue = i32`\n> Lines: 342-342\n```\n342: type AliasValue = i32;\n```\n\n### FUNCTION: `req_cover_rust_1`\n> Signature: `fn req_cover_rust_1(value: i32) -> i32 { value + 1 }`\n> Lines: 350-350\n- @brief Coverage helper construct 1.\n- @details Provides deterministic fixture-level Doxygen coverage block 1.\n- @param value Input value for helper construct 1.\n- @return Output value for helper construct 1.\n```\n350: fn req_cover_rust_1(value: i32) -> i32 { value + 1 }\n```\n\n### FUNCTION: `req_cover_rust_2`\n> Signature: `fn req_cover_rust_2(value: i32) -> i32 { value + 2 }`\n> Lines: 357-357\n- @brief Coverage helper construct 2.\n- @details Provides deterministic fixture-level Doxygen coverage block 2.\n- @param value Input value for helper construct 2.\n- @return Output value for helper construct 2.\n```\n357: fn req_cover_rust_2(value: i32) -> i32 { value + 2 }\n```\n\n### FUNCTION: `req_cover_rust_3`\n> Signature: `fn req_cover_rust_3(value: i32) -> i32 { value + 3 }`\n> Lines: 364-364\n- @brief Coverage helper construct 3.\n- @details Provides deterministic fixture-level Doxygen coverage block 3.\n- @param value Input value for helper construct 3.\n- @return Output value for helper construct 3.\n```\n364: fn req_cover_rust_3(value: i32) -> i32 { value + 3 }\n```\n\n### FUNCTION: `req_cover_rust_4`\n> Signature: `fn req_cover_rust_4(value: i32) -> i32 { value + 4 }`\n> Lines: 371-371\n- @brief Coverage helper construct 4.\n- @details Provides deterministic fixture-level Doxygen coverage block 4.\n- @param value Input value for helper construct 4.\n- @return Output value for helper construct 4.\n```\n371: fn req_cover_rust_4(value: i32) -> i32 { value + 4 }\n```\n\n### FUNCTION: `req_cover_rust_5`\n> Signature: `fn req_cover_rust_5(value: i32) -> i32 { value + 5 }`\n> Lines: 378-378\n- @brief Coverage helper construct 5.\n- @details Provides deterministic fixture-level Doxygen coverage block 5.\n- @param value Input value for helper construct 5.\n- @return Output value for helper construct 5.\n```\n378: fn req_cover_rust_5(value: i32) -> i32 { value + 5 }\n```\n",
|
|
4
|
+
"stderr": ""
|
|
5
|
+
}
|