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

Add Haxe generated source detection #4808

Merged
merged 1 commit into from
Mar 10, 2020
Merged

Add Haxe generated source detection #4808

merged 1 commit into from
Mar 10, 2020

Conversation

Gama11
Copy link
Contributor

@Gama11 Gama11 commented Mar 1, 2020

Description

The Haxe compiler can generate source files for a whole host of different target languages. It's fairly simple to detect this with the Generated by Haxe <version> comment the files start with. I've included test files for all relevant targets that Haxe 4 supports.

Checklist:

  • I am adding new or changing current functionality
    • I have added or updated the tests for the new or changed functionality.

Copy link
Contributor

@pchaigno pchaigno left a comment

Choose a reason for hiding this comment

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

Nice! Thanks!

Copy link
Member

@lildude lildude left a comment

Choose a reason for hiding this comment

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

@Gama11 where did all the fixture files come from and how are they licensed?

Please add the source and license to the OP for this PR.

@Gama11
Copy link
Contributor Author

Gama11 commented Mar 10, 2020

@lildude I simply compiled a Hello World program to different targets with Haxe 4.0.5:

class Main {
	static function main() {
		trace("Hello World");
	}
}

e.g. haxe -main Main -js main.js.

Not sure a license makes any sense for that? :)

@lildude
Copy link
Member

lildude commented Mar 10, 2020

Not sure a license makes any sense for that? :)

Indeed, which is why we always ask for samples from real-world applications. It also helps train the classifier.

@Gama11
Copy link
Contributor Author

Gama11 commented Mar 10, 2020

Well, I can certainly swap them out with something else if you prefer, though for what is being tested here (just the source header comments) it doesn't really make any difference, other than increasing file size...

@lildude
Copy link
Member

lildude commented Mar 10, 2020

🤔 thanks for the explanation @Gama11. Yeah, I think in this case, it makes sense for these samples as is. Thanks.

@lildude lildude merged commit 7b805b6 into github-linguist:master Mar 10, 2020
@Gama11 Gama11 deleted the generated-haxe branch March 10, 2020 11:30
@github-linguist github-linguist locked as resolved and limited conversation to collaborators Jun 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants