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

Revise pattern to fix Coq/Verilog misclassification #4751

Closed
wants to merge 2 commits into from
Closed

Revise pattern to fix Coq/Verilog misclassification #4751

wants to merge 2 commits into from

Conversation

yumaueda
Copy link
Contributor

@yumaueda yumaueda commented Dec 18, 2019

#4750

Revise some patterns for avoiding Coq/Verilog misdetection.

Description

https://github.com/github/linguist/blob/643c091e8d1e8c20401d1267ca558d304ebae8ca/lib/linguist/heuristics.yml#L462-L463

The first pattern for Coq could also match Verilog synthesis attribute; then I revised patters for Coq and Verilog.

Checklist:

  • I am fixing a misclassified language
    • I have included a new sample for the misclassified language:
      • Sample source(s): samples/Verilog/ram.v
      • Sample license(s): MIT
    • I have included a change to the heuristics to distinguish my language from others using the same extension.

@yumaueda yumaueda changed the title Revise a pattern for Coq could also match Verilog and add some patters for Verilog. Revise some pattern for avoding Coq/Verilog misdetection Dec 18, 2019
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.

Thanks for the improvement @0x00a1e9!

Could you add a sample file to demonstrate this? One that used to be incorrectly detected as Coq. Your own files might do the trick if you can (re)license them under a permissive license (e.g., MIT).

/cc @medvednikov who helped design these heuristic rules in #4564.

@yumaueda
Copy link
Contributor Author

yumaueda commented Dec 18, 2019

I added a sample Verilog file used to be misclassified as Coq under the MIT license.

@Alhadis Alhadis changed the title Revise some pattern for avoding Coq/Verilog misdetection Revise pattern to fix Coq/Verilog misclassification Dec 19, 2019
@pchaigno
Copy link
Contributor

That Verilog sample files looks fairly different from those we already have (and as a result, the syntax highlighting doesn't work very well on that one). Any idea why that is? Is that a different dialect? In particular, the comments are different and they're the reason why the heuristic was failing.

@yumaueda
Copy link
Contributor Author

In particular, the comments are different and they're the reason why the heuristic was failing.

I only use comment syntax defined in IEEE Std 1364-2005. What did you mention to by "comments"? Seems there's only one comment part in the sample...

@pchaigno
Copy link
Contributor

What did you mention to by "comments"? Seems there's only one comment part in the sample...

That's the one I was referring to.

I'd really like to have @0x00a1e9 or @S-YOU's eyes on this.

@stale
Copy link

stale bot commented Jan 27, 2020

This pull request has been automatically marked as stale because it has not had recent activity, and will be closed if no further activity occurs. If this pull request was overlooked, forgotten, or should remain open for any other reason, please reply here to call attention to it and remove the stale status. Thank you for your contributions.

@stale stale bot added Stale and removed Stale labels Jan 27, 2020
@yumaueda yumaueda closed this Jan 31, 2020
lildude pushed a commit that referenced this pull request Nov 3, 2020
* Revise some pattern for avoding Coq/Verilog misdetection

* Add a sample Verilog file used to be misclassified as Coq.

Co-authored-by: cyan <cyan@0x00a1e9.dev>
@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.

None yet

2 participants