-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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 Apache thrift support to generated? check #2392
Conversation
+1 |
Could this be limited to only files with a certain extension like we did in the other methods? |
@pchaigno Good idea, added |
return false unless ['.rb', '.py', '.go', '.js', '.m', '.java', '.h', '.cc', '.cpp'].include?(extname) | ||
return false unless lines.count > 1 | ||
|
||
return lines[0].include?("Autogenerated by Thrift Compiler") || lines[1].include?("Autogenerated by Thrift Compiler") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure which would be faster. I find the the current implementation more readable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, let's keep the current one (I was kind of hoping for a better way to write it in Ruby...).
👍 thanks for this @vighnesh1987. This should be live on GitHub with the next release of Linguist. |
Add Apache thrift support to generated? check
Awesome! |
Apache Thrift compiler generated files are currently ignored in the
generated?
check leading to massive PRs which are hard to parse. This commit fixes the same.