Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try source code normalization #3

Open
wfrisch opened this issue Apr 14, 2024 · 0 comments
Open

Try source code normalization #3

wfrisch opened this issue Apr 14, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request low priority Low priority features

Comments

@wfrisch
Copy link
Owner

wfrisch commented Apr 14, 2024

normalize.py already contains a few functions to normalize C/C++ sources before hashing. So far it's very simple:

  • remove comments
  • remove empty lines
  • pipe through clang-format

This would mostly improve detection for embedded libraries in projects that were treated with an auto-formatter. It's not clear whether this is common at all. Before implementing this properly, try it on a large codebase, i.e. an entire distro. If it delivers at least 1 or 2 additional hits, considering adding this feature.

@wfrisch wfrisch added the enhancement New feature or request label Apr 14, 2024
@wfrisch wfrisch self-assigned this Apr 15, 2024
@wfrisch wfrisch added the low priority Low priority features label Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request low priority Low priority features
Projects
None yet
Development

No branches or pull requests

1 participant