gotwarlost / istanbul

Yet another JS code coverage tool that computes statement, line, function and branch coverage with module loader hooks to transparently add coverage when running tests. Supports all JS coverage use cases including unit tests, server side functional tests and browser tests. Built for scale.
Other
8.7k stars 786 forks source link

Clover Reporter reporting the same values for LOC vs NCLOC when they should differ #823

Open amclin opened 7 years ago

amclin commented 7 years ago

The Clover Reporter is outputting the same line count for both Lines of Code, and Non-Comment Lines of Code: screen shot 2017-07-11 at 3 07 34 pm

<metrics
  statements="69239" 
  coveredstatements="2224"
  conditionals="79358"
  coveredconditionals="142"
  methods="22008"
  coveredmethods="29"
  elements="170605"
  coveredelements="2395"
  complexity="0"
  packages="44"
  files="405"
  classes="405"
  loc="175223"
  ncloc="175223" />

The reporter is putting the same output into both variables: https://github.com/gotwarlost/istanbul/blob/89e338fcb1c8a7dea3b9e8f851aa55de2bc3abee/lib/report/clover.js#L162-L163