Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7400903
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T04:19:27+00:00 2026-05-29T04:19:27+00:00

I know that Lines of Code (LoC) is a dubious if not false code

  • 0

I know that Lines of Code (LoC) is a dubious if not false code metric and there are lots of posts to this effect.

However … I still have to provide a LoC count for a web site in a report.

I was using the Visual Studio 2010 Code Analysis Code Metrics feature to get the LoC when I wondered what does it do with or how does it count HTML, CSS and Javascript?

The VS Help text provides this description of the metric –

Lines of Code – Indicates the approximate number of lines in the code. The count is based on the IL code and is therefore not the exact number of lines in the source code file. A very high count might indicate that a type or method is trying to do too much work and should be split up. It might also indicate that the type or method might be hard to maintain.

So my multi part question is … does HTML, CSS, Javascript get compiled to IL and if it does then should I assume it is included in the VS LoC metric? If it does not get compiled to IL, what is the best way to calculate or include HTML, CSS and Javascript in the LoC metric for my report? Or should they even be included in LoC at all?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T04:19:28+00:00Added an answer on May 29, 2026 at 4:19 am

    Does HTML, CSS, Javascript get compiled to IL?

    No – those files are static. The only time they get compiled is if you compose them in code behind and add them to the Response buffer directly.

    If it does not get compiled to IL, what is the best way to calculate or include HTML, CSS and Javascript in the LoC metric for my report? Or should they even be included in LoC at all?

    I would say counting those files may not be of much use — although getting a handle on JavaScript file size could be of importance as it would have some effect on page load times (larger files will take longer to download — but unless you have 20K lines of JavaScript, it shouldn’t be a huge difference).

    There are a few tools out there that count lines of code for all file types. Microsoft’s LOC counter is here. Also, tools like NDepend (which has a free trial) can count lines of code, too.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Well, situation is that I need to know how LoC (lines of code) I
I know there's a lot of questions about this topic but I have not
Okay, we know that the following two lines are equivalent - (0 == i)
I know that you can insert multiple rows at once, is there a way
Suppose that I have a legacy java application with thousands of lines of code
Is there an easy way (like a free program) that can covert c/c++ code
How does one ignore lines in a file? Example: If you know that the
I know that this question have been asked several times. But I can't get
Before answering this question, understand that I am not asking how to create my
We all know that generic List<> does not box value types. Why on the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.