Skip to content

Try source code normalization #3

Description

@wfrisch

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions