Add Julia language recognition support. Fixes #4596#49
Add Julia language recognition support. Fixes #4596#49HasTheDev wants to merge 1 commit intoaboutcode-org:mainfrom
Conversation
b8aeec0 to
179a6cd
Compare
Signed-off-by: HasTheDev <hassanazam2021@gmail.com>
|
I've updated the PR with the Julia language support and verified the indentation and logic. Please note that the current failures in the Windows Azure Pipelines (test_gz_entropy in tests/test_entropy.py) appear to be pre-existing flaky tests unrelated to my changes, as I did not modify the entropy logic. Everything else is passing on Ubuntu and macOS. Ready for review! |
There was a problem hiding this comment.
@HasTheDev this looks good, and is mergable right now.
But since you've looked into this part already, it would be great to extend the functionality here similarly for other major languages which can be detected by extensions.
Can you also rebase from latest main, I've fixed all the tests there.
| return "" | ||
|
|
||
| @property | ||
| def is_julia_source(self): |
There was a problem hiding this comment.
Can you add this to https://github.com/HasTheDev/typecode/blob/e0a7a01c80478b3dced76bc65fa7b33dcfa62a2c/src/typecode/contenttype.py#L184C5-L184C23?
Can you also add a test which goes through all the attributes and checks if all of them exists?
|
|
||
| elif self.is_java_source is True or self.is_c_source is True: | ||
| # Recognize "known-by-extension" source types | ||
| elif self.is_java_source or self.is_c_source or self.is_julia_source: |
There was a problem hiding this comment.
This is too few source types IMHO, we should extend to major languages.
This PR adds recognition for the Julia language by updating the Type class logic and adding a dedicated test case.
This addresses the identification gap reported in aboutcode-org/scancode-toolkit#4596.