{"action":"created","comment":{"url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/pulls/comments/221884674","pull_request_review_id":160638597,"id":221884674,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMTg4NDY3NA==","diff_hunk":"@@ -61,6 +63,26 @@ public void describe(final SensorDescriptor sensorDescriptor) {\n         sensorDescriptor.createIssuesForRuleRepositories(FramaCRulesDefinition.getRepositoryKeyForLanguage());\n     }\n \n+    /**\n+     * Check if a file is a CSV file by analysing the header (first line)\n+     * @param filePath : the file path\n+     * @return true if the file is a csv file, false otherwise\n+     */\n+    private boolean isCsvFile(String filePath) {\n+        boolean isCsvFile = false;\n+        try (BufferedReader br =\n+            new BufferedReader(new FileReader(filePath))) {\n+            String line = br.readLine();\n+            if (line.startsWith(\"directory\\tfile\")) {\n+                isCsvFile = true;\n+            }\n+        } catch (IOException e) {\n+            // Ignore (error will be processed later\n+            isCsvFile = false;","path":"src/main/java/fr/cnes/sonarqube/plugins/framac/sensor/FramaCSensor.java","position":28,"original_position":28,"commit_id":"29a5f6fde0e6c9c0fcf2786def3183b52d8cf548","original_commit_id":"29a5f6fde0e6c9c0fcf2786def3183b52d8cf548","user":{"login":"begarco","id":3931938,"node_id":"MDQ6VXNlcjM5MzE5Mzg=","avatar_url":"https://avatars3.githubusercontent.com/u/3931938?v=4","gravatar_id":"","url":"https://api.github.com/users/begarco","html_url":"https://github.com/begarco","followers_url":"https://api.github.com/users/begarco/followers","following_url":"https://api.github.com/users/begarco/following{/other_user}","gists_url":"https://api.github.com/users/begarco/gists{/gist_id}","starred_url":"https://api.github.com/users/begarco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/begarco/subscriptions","organizations_url":"https://api.github.com/users/begarco/orgs","repos_url":"https://api.github.com/users/begarco/repos","events_url":"https://api.github.com/users/begarco/events{/privacy}","received_events_url":"https://api.github.com/users/begarco/received_events","type":"User","site_admin":false},"body":"![Code Smell](https://sonarsource.github.io/sonar-github/code_smell.png 'Code Smell') Code Smell: Remove this useless assignment; \"isCsvFile\" already holds the assigned value along all execution paths. ([squid:S4165](https://sonarcloud.io/organizations/lequal/rules#rule_key=squid%3AS4165))\n\n[See it in SonarCloud](https://sonarcloud.io/project/issues?id=fr.cnes.sonarqube.plugins%3Asonar-frama-c-plugin&pullRequest=23&issues=AWY0I9xNvOWp7Yd6e3Vh&open=AWY0I9xNvOWp7Yd6e3Vh)\n\n[ISSUE_KEY]: AWY0I9xNvOWp7Yd6e3Vh","created_at":"2018-10-02T09:37:41Z","updated_at":"2018-10-02T09:37:41Z","html_url":"https://github.com/lequal/sonar-frama-c-plugin/pull/23#discussion_r221884674","pull_request_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/pulls/23","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/pulls/comments/221884674"},"html":{"href":"https://github.com/lequal/sonar-frama-c-plugin/pull/23#discussion_r221884674"},"pull_request":{"href":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/pulls/23"}}},"pull_request":{"url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/pulls/23","id":219633209,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE5NjMzMjA5","html_url":"https://github.com/lequal/sonar-frama-c-plugin/pull/23","diff_url":"https://github.com/lequal/sonar-frama-c-plugin/pull/23.diff","patch_url":"https://github.com/lequal/sonar-frama-c-plugin/pull/23.patch","issue_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/issues/23","number":23,"state":"open","locked":false,"title":"regenerate frama-c output file (from test c files) and manage kernel …","user":{"login":"PujolFranck","id":43032575,"node_id":"MDQ6VXNlcjQzMDMyNTc1","avatar_url":"https://avatars1.githubusercontent.com/u/43032575?v=4","gravatar_id":"","url":"https://api.github.com/users/PujolFranck","html_url":"https://github.com/PujolFranck","followers_url":"https://api.github.com/users/PujolFranck/followers","following_url":"https://api.github.com/users/PujolFranck/following{/other_user}","gists_url":"https://api.github.com/users/PujolFranck/gists{/gist_id}","starred_url":"https://api.github.com/users/PujolFranck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PujolFranck/subscriptions","organizations_url":"https://api.github.com/users/PujolFranck/orgs","repos_url":"https://api.github.com/users/PujolFranck/repos","events_url":"https://api.github.com/users/PujolFranck/events{/privacy}","received_events_url":"https://api.github.com/users/PujolFranck/received_events","type":"User","site_admin":false},"body":"\r\n### Changes proposed :\r\n- Manage kernel error\r\n- All frama-c output files re-generated\r\n\r\n","created_at":"2018-10-02T09:08:09Z","updated_at":"2018-10-02T09:37:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0539d36649d7cb57786a38b3348a71b8f756c91d","assignee":{"login":"begarco","id":3931938,"node_id":"MDQ6VXNlcjM5MzE5Mzg=","avatar_url":"https://avatars3.githubusercontent.com/u/3931938?v=4","gravatar_id":"","url":"https://api.github.com/users/begarco","html_url":"https://github.com/begarco","followers_url":"https://api.github.com/users/begarco/followers","following_url":"https://api.github.com/users/begarco/following{/other_user}","gists_url":"https://api.github.com/users/begarco/gists{/gist_id}","starred_url":"https://api.github.com/users/begarco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/begarco/subscriptions","organizations_url":"https://api.github.com/users/begarco/orgs","repos_url":"https://api.github.com/users/begarco/repos","events_url":"https://api.github.com/users/begarco/events{/privacy}","received_events_url":"https://api.github.com/users/begarco/received_events","type":"User","site_admin":false},"assignees":[{"login":"begarco","id":3931938,"node_id":"MDQ6VXNlcjM5MzE5Mzg=","avatar_url":"https://avatars3.githubusercontent.com/u/3931938?v=4","gravatar_id":"","url":"https://api.github.com/users/begarco","html_url":"https://github.com/begarco","followers_url":"https://api.github.com/users/begarco/followers","following_url":"https://api.github.com/users/begarco/following{/other_user}","gists_url":"https://api.github.com/users/begarco/gists{/gist_id}","starred_url":"https://api.github.com/users/begarco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/begarco/subscriptions","organizations_url":"https://api.github.com/users/begarco/orgs","repos_url":"https://api.github.com/users/begarco/repos","events_url":"https://api.github.com/users/begarco/events{/privacy}","received_events_url":"https://api.github.com/users/begarco/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/pulls/23/commits","review_comments_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/pulls/23/comments","review_comment_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/issues/23/comments","statuses_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/statuses/29a5f6fde0e6c9c0fcf2786def3183b52d8cf548","head":{"label":"lequal:manage-kernel-error","ref":"manage-kernel-error","sha":"29a5f6fde0e6c9c0fcf2786def3183b52d8cf548","user":{"login":"lequal","id":33050909,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMzMDUwOTA5","avatar_url":"https://avatars0.githubusercontent.com/u/33050909?v=4","gravatar_id":"","url":"https://api.github.com/users/lequal","html_url":"https://github.com/lequal","followers_url":"https://api.github.com/users/lequal/followers","following_url":"https://api.github.com/users/lequal/following{/other_user}","gists_url":"https://api.github.com/users/lequal/gists{/gist_id}","starred_url":"https://api.github.com/users/lequal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lequal/subscriptions","organizations_url":"https://api.github.com/users/lequal/orgs","repos_url":"https://api.github.com/users/lequal/repos","events_url":"https://api.github.com/users/lequal/events{/privacy}","received_events_url":"https://api.github.com/users/lequal/received_events","type":"Organization","site_admin":false},"repo":{"id":102097449,"node_id":"MDEwOlJlcG9zaXRvcnkxMDIwOTc0NDk=","name":"sonar-frama-c-plugin","full_name":"lequal/sonar-frama-c-plugin","private":false,"owner":{"login":"lequal","id":33050909,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMzMDUwOTA5","avatar_url":"https://avatars0.githubusercontent.com/u/33050909?v=4","gravatar_id":"","url":"https://api.github.com/users/lequal","html_url":"https://github.com/lequal","followers_url":"https://api.github.com/users/lequal/followers","following_url":"https://api.github.com/users/lequal/following{/other_user}","gists_url":"https://api.github.com/users/lequal/gists{/gist_id}","starred_url":"https://api.github.com/users/lequal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lequal/subscriptions","organizations_url":"https://api.github.com/users/lequal/orgs","repos_url":"https://api.github.com/users/lequal/repos","events_url":"https://api.github.com/users/lequal/events{/privacy}","received_events_url":"https://api.github.com/users/lequal/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/lequal/sonar-frama-c-plugin","description":"sonar-frama-c-plugin is a plugin sonarqube to integrate frama-c results ","fork":false,"url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin","forks_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/forks","keys_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/teams","hooks_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/hooks","issue_events_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/events","assignees_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/tags","blobs_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/languages","stargazers_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/stargazers","contributors_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/contributors","subscribers_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/subscribers","subscription_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/subscription","commits_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/merges","archive_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/downloads","issues_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/labels{/name}","releases_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/releases{/id}","deployments_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/deployments","created_at":"2017-09-01T09:31:59Z","updated_at":"2018-08-05T16:03:11Z","pushed_at":"2018-10-02T09:35:35Z","git_url":"git://github.com/lequal/sonar-frama-c-plugin.git","ssh_url":"git@github.com:lequal/sonar-frama-c-plugin.git","clone_url":"https://github.com/lequal/sonar-frama-c-plugin.git","svn_url":"https://github.com/lequal/sonar-frama-c-plugin","homepage":"","size":2692,"stargazers_count":3,"watchers_count":3,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":14,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":4,"open_issues":14,"watchers":3,"default_branch":"master"}},"base":{"label":"lequal:dev-ATOS","ref":"dev-ATOS","sha":"9070cad656ab6e98acd966ae7d6574435a4bfa3c","user":{"login":"lequal","id":33050909,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMzMDUwOTA5","avatar_url":"https://avatars0.githubusercontent.com/u/33050909?v=4","gravatar_id":"","url":"https://api.github.com/users/lequal","html_url":"https://github.com/lequal","followers_url":"https://api.github.com/users/lequal/followers","following_url":"https://api.github.com/users/lequal/following{/other_user}","gists_url":"https://api.github.com/users/lequal/gists{/gist_id}","starred_url":"https://api.github.com/users/lequal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lequal/subscriptions","organizations_url":"https://api.github.com/users/lequal/orgs","repos_url":"https://api.github.com/users/lequal/repos","events_url":"https://api.github.com/users/lequal/events{/privacy}","received_events_url":"https://api.github.com/users/lequal/received_events","type":"Organization","site_admin":false},"repo":{"id":102097449,"node_id":"MDEwOlJlcG9zaXRvcnkxMDIwOTc0NDk=","name":"sonar-frama-c-plugin","full_name":"lequal/sonar-frama-c-plugin","private":false,"owner":{"login":"lequal","id":33050909,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMzMDUwOTA5","avatar_url":"https://avatars0.githubusercontent.com/u/33050909?v=4","gravatar_id":"","url":"https://api.github.com/users/lequal","html_url":"https://github.com/lequal","followers_url":"https://api.github.com/users/lequal/followers","following_url":"https://api.github.com/users/lequal/following{/other_user}","gists_url":"https://api.github.com/users/lequal/gists{/gist_id}","starred_url":"https://api.github.com/users/lequal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lequal/subscriptions","organizations_url":"https://api.github.com/users/lequal/orgs","repos_url":"https://api.github.com/users/lequal/repos","events_url":"https://api.github.com/users/lequal/events{/privacy}","received_events_url":"https://api.github.com/users/lequal/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/lequal/sonar-frama-c-plugin","description":"sonar-frama-c-plugin is a plugin sonarqube to integrate frama-c results ","fork":false,"url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin","forks_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/forks","keys_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/teams","hooks_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/hooks","issue_events_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/events","assignees_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/tags","blobs_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/languages","stargazers_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/stargazers","contributors_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/contributors","subscribers_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/subscribers","subscription_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/subscription","commits_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/merges","archive_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/downloads","issues_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/labels{/name}","releases_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/releases{/id}","deployments_url":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/deployments","created_at":"2017-09-01T09:31:59Z","updated_at":"2018-08-05T16:03:11Z","pushed_at":"2018-10-02T09:35:35Z","git_url":"git://github.com/lequal/sonar-frama-c-plugin.git","ssh_url":"git@github.com:lequal/sonar-frama-c-plugin.git","clone_url":"https://github.com/lequal/sonar-frama-c-plugin.git","svn_url":"https://github.com/lequal/sonar-frama-c-plugin","homepage":"","size":2692,"stargazers_count":3,"watchers_count":3,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":14,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":4,"open_issues":14,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/pulls/23"},"html":{"href":"https://github.com/lequal/sonar-frama-c-plugin/pull/23"},"issue":{"href":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/issues/23"},"comments":{"href":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/issues/23/comments"},"review_comments":{"href":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/pulls/23/comments"},"review_comment":{"href":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/pulls/23/commits"},"statuses":{"href":"https://api.github.com/repos/lequal/sonar-frama-c-plugin/statuses/29a5f6fde0e6c9c0fcf2786def3183b52d8cf548"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"begarco"}}