Skip to content

[Feature] Add support for .hh C++ header extension#619

Merged
Shashankss1205 merged 1 commit intoCodeGraphContext:mainfrom
magic-peach:main
Feb 17, 2026
Merged

[Feature] Add support for .hh C++ header extension#619
Shashankss1205 merged 1 commit intoCodeGraphContext:mainfrom
magic-peach:main

Conversation

@magic-peach
Copy link
Copy Markdown
Contributor

Summary

This PR adds support for the .hh C++ header file extension as requested in issue #469.

Changes Made

  • Added .hh extension to the parsers dictionary in graph_builder.py
  • Added .hh extension handling in the _pre_scan_for_imports method

Background

The .hh extension is a common C++ header file extension used in many projects, particularly those following modern C++ conventions. While .h and .hpp are already supported, .hh was missing from the supported extensions.

Technical Details

The .hh extension is now treated the same way as .h and .hpp extensions:

  • It uses the TreeSitterParser with 'cpp' language
  • Files with .hh extension are included in the pre-scan for imports
  • All existing C++ parsing capabilities apply to .hh files

Testing

The change follows the exact same pattern as existing .h and .hpp extensions, ensuring consistent behavior across all C++ header file types.

Closes #469

- Add .hh extension to parsers dictionary
- Add .hh extension to pre_scan_for_imports method

The .hh extension is a common C++ header file extension used
in many projects, particularly those following modern C++ conventions.

Closes CodeGraphContext#469
@vercel
Copy link
Copy Markdown

vercel bot commented Feb 9, 2026

@magic-peach is attempting to deploy a commit to the shashankss1205's projects Team on Vercel.

A member of the Team first needs to authorize it.

@Shashankss1205
Copy link
Copy Markdown
Collaborator

Can you please add a ss of it working??

You can write a simpler .hh file in a temp folder, index it using cgc i and then do cgc visualize to get a graphical representation. Please do share a screenshot of the last graph image. Thanks!

@Shashankss1205 Shashankss1205 merged commit 1f737d5 into CodeGraphContext:main Feb 17, 2026
1 check failed
psihius pushed a commit to psihius/CodeGraphContext that referenced this pull request Mar 24, 2026
[Feature] Add support for .hh C++ header extension
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for additional C++ header extension (.hh)

2 participants