{"action":"created","issue":{"url":"https://api.github.com/repos/acemod/ACE3/issues/6485","repository_url":"https://api.github.com/repos/acemod/ACE3","labels_url":"https://api.github.com/repos/acemod/ACE3/issues/6485/labels{/name}","comments_url":"https://api.github.com/repos/acemod/ACE3/issues/6485/comments","events_url":"https://api.github.com/repos/acemod/ACE3/issues/6485/events","html_url":"https://github.com/acemod/ACE3/pull/6485","id":345674776,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA0NzQwOTAz","number":6485,"title":"[WIP] [medical] Code cleanup using SQFLint","user":{"login":"dedmen","id":3768165,"node_id":"MDQ6VXNlcjM3NjgxNjU=","avatar_url":"https://avatars1.githubusercontent.com/u/3768165?v=4","gravatar_id":"","url":"https://api.github.com/users/dedmen","html_url":"https://github.com/dedmen","followers_url":"https://api.github.com/users/dedmen/followers","following_url":"https://api.github.com/users/dedmen/following{/other_user}","gists_url":"https://api.github.com/users/dedmen/gists{/gist_id}","starred_url":"https://api.github.com/users/dedmen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dedmen/subscriptions","organizations_url":"https://api.github.com/users/dedmen/orgs","repos_url":"https://api.github.com/users/dedmen/repos","events_url":"https://api.github.com/users/dedmen/events{/privacy}","received_events_url":"https://api.github.com/users/dedmen/received_events","type":"User","site_admin":false},"labels":[{"id":198190597,"node_id":"MDU6TGFiZWwxOTgxOTA1OTc=","url":"https://api.github.com/repos/acemod/ACE3/labels/kind/cleanup","name":"kind/cleanup","color":"006b75","default":false},{"id":164934045,"node_id":"MDU6TGFiZWwxNjQ5MzQwNDU=","url":"https://api.github.com/repos/acemod/ACE3/labels/status/WIP","name":"status/WIP","color":"fad8c7","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/acemod/ACE3/milestones/28","html_url":"https://github.com/acemod/ACE3/milestone/28","labels_url":"https://api.github.com/repos/acemod/ACE3/milestones/28/labels","id":2295836,"node_id":"MDk6TWlsZXN0b25lMjI5NTgzNg==","number":28,"title":"Medical Rewrite","description":"","creator":{"login":"PabstMirror","id":9376747,"node_id":"MDQ6VXNlcjkzNzY3NDc=","avatar_url":"https://avatars3.githubusercontent.com/u/9376747?v=4","gravatar_id":"","url":"https://api.github.com/users/PabstMirror","html_url":"https://github.com/PabstMirror","followers_url":"https://api.github.com/users/PabstMirror/followers","following_url":"https://api.github.com/users/PabstMirror/following{/other_user}","gists_url":"https://api.github.com/users/PabstMirror/gists{/gist_id}","starred_url":"https://api.github.com/users/PabstMirror/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PabstMirror/subscriptions","organizations_url":"https://api.github.com/users/PabstMirror/orgs","repos_url":"https://api.github.com/users/PabstMirror/repos","events_url":"https://api.github.com/users/PabstMirror/events{/privacy}","received_events_url":"https://api.github.com/users/PabstMirror/received_events","type":"User","site_admin":false},"open_issues":44,"closed_issues":68,"state":"open","created_at":"2017-02-02T18:59:24Z","updated_at":"2018-07-30T09:31:06Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2018-07-30T09:14:56Z","updated_at":"2018-07-30T09:58:15Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/acemod/ACE3/pulls/6485","html_url":"https://github.com/acemod/ACE3/pull/6485","diff_url":"https://github.com/acemod/ACE3/pull/6485.diff","patch_url":"https://github.com/acemod/ACE3/pull/6485.patch"},"body":"This is some minor cleanup of SQFLint warnings. And one actual bug of a wrong variable being used.\r\nI also want to cleanup the spacing after the header.\r\n\r\nTasks left that I want in here.\r\n\r\n**1.** \r\n\r\nWe have mixed\r\n```\r\n<header>\r\nparams []\r\n```\r\n```\r\n<header>\r\n\r\nparams []\r\n```\r\n\r\n```\r\n<header>\r\n\r\n\r\nparams []\r\n```\r\nThrough the files. I'd clean it up to a single newline after the header. Then maybe file local #defines, another newline and then params. But for that I need #6484 merged first.\r\n\r\n**2.** \r\nAlso there are tons of unused variables. Especially `params` with all entries defined although not all are needed.\r\nI'd clean them up like this\r\n`params [\"_var1\", \"_var2\" /*, \"_var3\", \"_var4\" */]` in case where the last ones aren't needed.\r\nOr\r\n`params [\"\" /*_var1*/, \"\" /*_var2*/, \"_var3\", \"_var4\"]`\r\nin case where ones in the middle aren't needed. What do you think about that?\r\n\r\n**3.** \r\nhttps://github.com/acemod/ACE3/blob/c9ad92e92d26f929e3cb78a53743585e5ffa20d8/addons/medical_treatment/functions/fnc_checkItems.sqf#L17\r\nThis is horrible. As I already wrote in Slack.\r\n>Maybe add a ACE common function like. \"getNumberOfItem\" the returns the count of how many of a specific item type the unit has in inventory?\r\nWould we want weaponItems or assignedItems for that too? Maybe only on condition like in the CBA func?\r\n\r\n**4.** \r\nhttps://github.com/acemod/ACE3/blob/c9ad92e92d26f929e3cb78a53743585e5ffa20d8/addons/medical_treatment/functions/fnc_actionUnloadUnit.sqf#L20\r\nthe `_drag` thing is not implemented. Shouldn't such things be marked as `//#TODO` in the code to make them easier to find and harder to forget?\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/acemod/ACE3/issues/comments/408811545","html_url":"https://github.com/acemod/ACE3/pull/6485#issuecomment-408811545","issue_url":"https://api.github.com/repos/acemod/ACE3/issues/6485","id":408811545,"node_id":"MDEyOklzc3VlQ29tbWVudDQwODgxMTU0NQ==","user":{"login":"SilentSpike","id":5459452,"node_id":"MDQ6VXNlcjU0NTk0NTI=","avatar_url":"https://avatars3.githubusercontent.com/u/5459452?v=4","gravatar_id":"","url":"https://api.github.com/users/SilentSpike","html_url":"https://github.com/SilentSpike","followers_url":"https://api.github.com/users/SilentSpike/followers","following_url":"https://api.github.com/users/SilentSpike/following{/other_user}","gists_url":"https://api.github.com/users/SilentSpike/gists{/gist_id}","starred_url":"https://api.github.com/users/SilentSpike/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SilentSpike/subscriptions","organizations_url":"https://api.github.com/users/SilentSpike/orgs","repos_url":"https://api.github.com/users/SilentSpike/repos","events_url":"https://api.github.com/users/SilentSpike/events{/privacy}","received_events_url":"https://api.github.com/users/SilentSpike/received_events","type":"User","site_admin":false},"created_at":"2018-07-30T09:58:15Z","updated_at":"2018-07-30T09:58:15Z","author_association":"MEMBER","body":"I like the common function solution 👍"}}
{"actor":{"display_login":"SilentSpike"}}