Project language makeup is inaccurately reported when a single file contains more than one language. #128608
Unanswered
Nius
asked this question in
Repositories
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Select Topic Area
Product Feedback
Body
I recently published a project that is a simple web application (HTML, CSS, JS) which, due to the target end-user's demographic and the expected use case, is deployed entirely in a single file. Since the file has a .HTML extension the repository's front page reports the project as being 100% HTML, when in reality the project is 53% JS, 33% CSS and only 13% HTML by line count.
Counting by lines is probably not the way to go since files can easily be minified - in fact my application includes a minified release of JQuery on a single line. Counting characters between language switches is probably the best way to measure multiple languages in a single file. In the case of HTML/CSS/JS the transitions are <script> and <style> tags. Add <? for PHP and <% for JSP, and I'm sure there are probably others.
The point is my project is mis-identified as being entirely HTML when in reality it's mostly a Javascript project.
Beta Was this translation helpful? Give feedback.
All reactions