{"action":"closed","issue":{"url":"https://api.github.com/repos/SonarSource/sonar-dotnet/issues/2176","repository_url":"https://api.github.com/repos/SonarSource/sonar-dotnet","labels_url":"https://api.github.com/repos/SonarSource/sonar-dotnet/issues/2176/labels{/name}","comments_url":"https://api.github.com/repos/SonarSource/sonar-dotnet/issues/2176/comments","events_url":"https://api.github.com/repos/SonarSource/sonar-dotnet/issues/2176/events","html_url":"https://github.com/SonarSource/sonar-dotnet/issues/2176","id":392671736,"node_id":"MDU6SXNzdWUzOTI2NzE3MzY=","number":2176,"title":"Variable assignment are not counted as executable lines of code in VB","user":{"login":"nicolas-harraudeau-sonarsource","id":40498978,"node_id":"MDQ6VXNlcjQwNDk4OTc4","avatar_url":"https://avatars1.githubusercontent.com/u/40498978?v=4","gravatar_id":"","url":"https://api.github.com/users/nicolas-harraudeau-sonarsource","html_url":"https://github.com/nicolas-harraudeau-sonarsource","followers_url":"https://api.github.com/users/nicolas-harraudeau-sonarsource/followers","following_url":"https://api.github.com/users/nicolas-harraudeau-sonarsource/following{/other_user}","gists_url":"https://api.github.com/users/nicolas-harraudeau-sonarsource/gists{/gist_id}","starred_url":"https://api.github.com/users/nicolas-harraudeau-sonarsource/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicolas-harraudeau-sonarsource/subscriptions","organizations_url":"https://api.github.com/users/nicolas-harraudeau-sonarsource/orgs","repos_url":"https://api.github.com/users/nicolas-harraudeau-sonarsource/repos","events_url":"https://api.github.com/users/nicolas-harraudeau-sonarsource/events{/privacy}","received_events_url":"https://api.github.com/users/nicolas-harraudeau-sonarsource/received_events","type":"User","site_admin":false},"labels":[{"id":572766545,"node_id":"MDU6TGFiZWw1NzI3NjY1NDU=","url":"https://api.github.com/repos/SonarSource/sonar-dotnet/labels/Area:%20Metrics","name":"Area: Metrics","color":"5319e7","default":false},{"id":669054291,"node_id":"MDU6TGFiZWw2NjkwNTQyOTE=","url":"https://api.github.com/repos/SonarSource/sonar-dotnet/labels/Area:%20VB.Net","name":"Area: VB.Net","color":"5319e7","default":false},{"id":731543503,"node_id":"MDU6TGFiZWw3MzE1NDM1MDM=","url":"https://api.github.com/repos/SonarSource/sonar-dotnet/labels/Status:%20Needs%20Review","name":"Status: Needs Review","color":"b60205","default":false},{"id":572764976,"node_id":"MDU6TGFiZWw1NzI3NjQ5NzY=","url":"https://api.github.com/repos/SonarSource/sonar-dotnet/labels/Type:%20Bug","name":"Type: Bug","color":"e11d21","default":false}],"state":"closed","locked":false,"assignee":{"login":"Evangelink","id":11340282,"node_id":"MDQ6VXNlcjExMzQwMjgy","avatar_url":"https://avatars0.githubusercontent.com/u/11340282?v=4","gravatar_id":"","url":"https://api.github.com/users/Evangelink","html_url":"https://github.com/Evangelink","followers_url":"https://api.github.com/users/Evangelink/followers","following_url":"https://api.github.com/users/Evangelink/following{/other_user}","gists_url":"https://api.github.com/users/Evangelink/gists{/gist_id}","starred_url":"https://api.github.com/users/Evangelink/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Evangelink/subscriptions","organizations_url":"https://api.github.com/users/Evangelink/orgs","repos_url":"https://api.github.com/users/Evangelink/repos","events_url":"https://api.github.com/users/Evangelink/events{/privacy}","received_events_url":"https://api.github.com/users/Evangelink/received_events","type":"User","site_admin":false},"assignees":[{"login":"Evangelink","id":11340282,"node_id":"MDQ6VXNlcjExMzQwMjgy","avatar_url":"https://avatars0.githubusercontent.com/u/11340282?v=4","gravatar_id":"","url":"https://api.github.com/users/Evangelink","html_url":"https://github.com/Evangelink","followers_url":"https://api.github.com/users/Evangelink/followers","following_url":"https://api.github.com/users/Evangelink/following{/other_user}","gists_url":"https://api.github.com/users/Evangelink/gists{/gist_id}","starred_url":"https://api.github.com/users/Evangelink/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Evangelink/subscriptions","organizations_url":"https://api.github.com/users/Evangelink/orgs","repos_url":"https://api.github.com/users/Evangelink/repos","events_url":"https://api.github.com/users/Evangelink/events{/privacy}","received_events_url":"https://api.github.com/users/Evangelink/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/SonarSource/sonar-dotnet/milestones/42","html_url":"https://github.com/SonarSource/sonar-dotnet/milestone/42","labels_url":"https://api.github.com/repos/SonarSource/sonar-dotnet/milestones/42/labels","id":3826799,"node_id":"MDk6TWlsZXN0b25lMzgyNjc5OQ==","number":42,"title":"7.10","description":"","creator":{"login":"agigleux","id":1057037,"node_id":"MDQ6VXNlcjEwNTcwMzc=","avatar_url":"https://avatars3.githubusercontent.com/u/1057037?v=4","gravatar_id":"","url":"https://api.github.com/users/agigleux","html_url":"https://github.com/agigleux","followers_url":"https://api.github.com/users/agigleux/followers","following_url":"https://api.github.com/users/agigleux/following{/other_user}","gists_url":"https://api.github.com/users/agigleux/gists{/gist_id}","starred_url":"https://api.github.com/users/agigleux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/agigleux/subscriptions","organizations_url":"https://api.github.com/users/agigleux/orgs","repos_url":"https://api.github.com/users/agigleux/repos","events_url":"https://api.github.com/users/agigleux/events{/privacy}","received_events_url":"https://api.github.com/users/agigleux/received_events","type":"User","site_admin":false},"open_issues":5,"closed_issues":14,"state":"open","created_at":"2018-11-16T13:35:49Z","updated_at":"2018-12-20T09:15:44Z","due_on":"2018-12-21T08:00:00Z","closed_at":null},"comments":0,"created_at":"2018-12-19T16:09:40Z","updated_at":"2018-12-20T09:15:44Z","closed_at":"2018-12-20T09:15:44Z","author_association":"NONE","body":"### Description\r\n\r\nThe executable lines of code metric is not giving the same result for C# and VB. This is because variable assignment are not counted.\r\n\r\n### Repro steps\r\n\r\nAnalyze the following C# code:\r\n```\r\npublic class Class2\r\n{\r\n    public void Foo(bool flag)\r\n    {\r\n        if (flag)\r\n        {\r\n            flag = true; flag = false; flag = true;\r\n        }\r\n    }\r\n    private void Bar(string[] Array)\r\n    {\r\n        foreach (string a in Array)\r\n        {\r\n            foreach (string b in Array)\r\n            {\r\n            }\r\n        }\r\n    }\r\n}\r\n```\r\nAnd this VB  code\r\n```\r\nPublic Class Class2\r\n    Public Sub Foo(ByVal flag _\r\n                   As Boolean)\r\n        If flag _\r\n            Then\r\n            flag = True : flag = False : flag = True\r\n        End If\r\n    End Sub\r\n    Private Sub Bar(ByVal Array)\r\n        For Each a As String In Array\r\n            For Each b As String In Array\r\n            Next\r\n        Next\r\n    End Sub\r\nEnd Class\r\n```\r\n\r\nThe VB code has 3 uncovered lines whereas the C# one has 4 uncovered lines, yet the two examples are equivalent.\r\n\r\n### Expected behavior\r\n\r\nBoth C# and VB should have the same number of uncovered lines of code."}}
{"actor":{"display_login":"valhristov"}}