{"action":"created","issue":{"url":"https://api.github.com/repos/gotwarlost/istanbul/issues/571","repository_url":"https://api.github.com/repos/gotwarlost/istanbul","labels_url":"https://api.github.com/repos/gotwarlost/istanbul/issues/571/labels{/name}","comments_url":"https://api.github.com/repos/gotwarlost/istanbul/issues/571/comments","events_url":"https://api.github.com/repos/gotwarlost/istanbul/issues/571/events","html_url":"https://github.com/gotwarlost/istanbul/issues/571","id":140733253,"number":571,"title":"riot tag based coverage report incorrectness","user":{"login":"deeperx","id":621232,"avatar_url":"https://avatars.githubusercontent.com/u/621232?v=3","gravatar_id":"","url":"https://api.github.com/users/deeperx","html_url":"https://github.com/deeperx","followers_url":"https://api.github.com/users/deeperx/followers","following_url":"https://api.github.com/users/deeperx/following{/other_user}","gists_url":"https://api.github.com/users/deeperx/gists{/gist_id}","starred_url":"https://api.github.com/users/deeperx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deeperx/subscriptions","organizations_url":"https://api.github.com/users/deeperx/orgs","repos_url":"https://api.github.com/users/deeperx/repos","events_url":"https://api.github.com/users/deeperx/events{/privacy}","received_events_url":"https://api.github.com/users/deeperx/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-14T16:58:04Z","updated_at":"2016-03-16T13:18:01Z","closed_at":null,"body":"* LCOV reporting generates wrong coverage report on source code lines\r\n\r\n* While, HTML reporting works perfectly fine\r\n\r\nYou can see the difference in below screenshots.\r\n\r\nHow is it possible that LCOV reporting gets its data from **unprocessed** ```src/hello.tag``` file while HTML reporting gets its data from **processed** ```src/hello.tag``` file? What is the difference? I've read their source codes but I couldn't find anything there.\r\n\r\n\r\n# Reproduce:\r\n\r\n**Example project:**\r\n\r\ngit clone https://github.com/vitogit/tdd-mocha-chai-riot\r\n\r\n\r\n**Karma Config (_updated_):**\r\n\r\n```javascript\r\nmodule.exports = function(config) {\r\n  config.set({\r\n    basePath: '',\r\n    frameworks: ['mocha','chai','riot'],\r\n    plugins: [\r\n      'karma-mocha',\r\n      'karma-mocha-reporter',\r\n      'karma-phantomjs-launcher',\r\n      'karma-chai',\r\n      'karma-riot',\r\n      'karma-coverage'\r\n    ],\r\n    files: [\r\n      'node_modules/chai/chai.js',\r\n      'src/**/*.tag',\r\n      'test/**/*.js'\r\n    ],\r\n    preprocessors: {\r\n      '**/*.tag': ['riot', 'coverage']\r\n    },\r\n    coverageReporter: {\r\n      dir: 'coverage/',\r\n      reporters: [\r\n        // works correctly\r\n        { type: 'html', subdir: 'report-html' },\r\n\r\n        // does not work correctly -- gets its input from unprocessed riot tag file\r\n        { type: 'lcovonly', subdir: '.', file: 'lcov.info' }\r\n      ]\r\n    },\r\n    browsers: ['PhantomJS'],\r\n    reporters: ['mocha', 'coverage'],\r\n    failOnEmptyTestSuite: false,\r\n    autoWatch: true\r\n  })\r\n}\r\n```\r\n\r\n**How to run?**\r\n\r\n```bash\r\nnpm i && npm i karma-coverage --save-dev\r\nkarma start\r\ncat coverage/lcov.info\r\n```\r\n\r\n**_You can also see html based coverage reports inside coverage directory's html coverage reports._**\r\n\r\n**LCOV is incorrect:**\r\n\r\n<img width=\"711\" alt=\"screen shot 2016-03-14 at 15 10 26\" src=\"https://cloud.githubusercontent.com/assets/621232/13745487/f897271c-e9f6-11e5-8df4-aaa62413dd7d.png\">\r\n\r\n**HTML is correct:**\r\n\r\n<img width=\"612\" alt=\"screen shot 2016-03-14 at 15 11 51\" src=\"https://cloud.githubusercontent.com/assets/621232/13745513/1ab6fa8e-e9f7-11e5-9b29-d8265d4c3230.png\">"},"comment":{"url":"https://api.github.com/repos/gotwarlost/istanbul/issues/comments/197323743","html_url":"https://github.com/gotwarlost/istanbul/issues/571#issuecomment-197323743","issue_url":"https://api.github.com/repos/gotwarlost/istanbul/issues/571","id":197323743,"user":{"login":"deeperx","id":621232,"avatar_url":"https://avatars.githubusercontent.com/u/621232?v=3","gravatar_id":"","url":"https://api.github.com/users/deeperx","html_url":"https://github.com/deeperx","followers_url":"https://api.github.com/users/deeperx/followers","following_url":"https://api.github.com/users/deeperx/following{/other_user}","gists_url":"https://api.github.com/users/deeperx/gists{/gist_id}","starred_url":"https://api.github.com/users/deeperx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deeperx/subscriptions","organizations_url":"https://api.github.com/users/deeperx/orgs","repos_url":"https://api.github.com/users/deeperx/repos","events_url":"https://api.github.com/users/deeperx/events{/privacy}","received_events_url":"https://api.github.com/users/deeperx/received_events","type":"User","site_admin":false},"created_at":"2016-03-16T13:18:01Z","updated_at":"2016-03-16T13:18:01Z","body":"By the way, actually, what I really wonder is why html coverage output is true while lcov coverage output is not?"}}