Skip to content

Conversation

jjmerchante
Copy link
Contributor

This PR improves file type detection by adding support for identifying common binary executables and compressed files.

Additionally, it allows to define custom file type patterns for both code and binary files.

Copy link
Member

@sduenas sduenas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need some examples of possible patterns in the README so users know how to run it.

@jjmerchante
Copy link
Contributor Author

I included one example of each of the possible patterns

Comment on lines 135 to 138
file_metrics = analyzer.get_file_type_metrics()
self.assertEqual(file_metrics.get("code", 0), 53)
self.assertEqual(file_metrics.get("binary", 0), 4)
self.assertEqual(file_metrics.get("other", 0), 22)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need a test that checks all of them are zero.

This commit adds binary file type detection, identifying
some popular binary executables and compressed binary files.

Signed-off-by: Jose Javier Merchante <[email protected]>
This commit allows to define custom file type patterns for code and binary files.

Signed-off-by: Jose Javier Merchante <[email protected]>
Copy link
Member

@sduenas sduenas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sduenas sduenas merged commit c407630 into Bitergia:main Mar 14, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants