{"action":"created","issue":{"url":"https://api.github.com/repos/paparazzi/paparazzi/issues/1783","repository_url":"https://api.github.com/repos/paparazzi/paparazzi","labels_url":"https://api.github.com/repos/paparazzi/paparazzi/issues/1783/labels{/name}","comments_url":"https://api.github.com/repos/paparazzi/paparazzi/issues/1783/comments","events_url":"https://api.github.com/repos/paparazzi/paparazzi/issues/1783/events","html_url":"https://github.com/paparazzi/paparazzi/issues/1783","id":164231699,"number":1783,"title":"MISRA-C compliance","user":{"login":"podhrmic","id":2790461,"avatar_url":"https://avatars.githubusercontent.com/u/2790461?v=3","gravatar_id":"","url":"https://api.github.com/users/podhrmic","html_url":"https://github.com/podhrmic","followers_url":"https://api.github.com/users/podhrmic/followers","following_url":"https://api.github.com/users/podhrmic/following{/other_user}","gists_url":"https://api.github.com/users/podhrmic/gists{/gist_id}","starred_url":"https://api.github.com/users/podhrmic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/podhrmic/subscriptions","organizations_url":"https://api.github.com/users/podhrmic/orgs","repos_url":"https://api.github.com/users/podhrmic/repos","events_url":"https://api.github.com/users/podhrmic/events{/privacy}","received_events_url":"https://api.github.com/users/podhrmic/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/paparazzi/paparazzi/labels/Airborne","name":"Airborne","color":"37b6d6"},{"url":"https://api.github.com/repos/paparazzi/paparazzi/labels/Enhancement","name":"Enhancement","color":"FF5C33"},{"url":"https://api.github.com/repos/paparazzi/paparazzi/labels/Minor","name":"Minor","color":"FF3333"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-07-07T05:21:58Z","updated_at":"2016-07-07T10:30:07Z","closed_at":null,"body":"In order to make Paparazzi more appealing for semi-professional or professional users (i.e. people or companies using UAVs to collect data and/or provide some services), it would be useful to show that our code is reliable and safe. One to do so is to have the airborne code confirm to [MISRA-C](https://en.wikipedia.org/wiki/MISRA_C). If the airborne code is MISRA-C compliant, then it is (at least in theory) easier to obtain flight authorization from the local authority (for example FAA in US). \r\n\r\nI analysed the airborne code for MISRA-C compliance, and actually the results are not too bad. The issues are ranging from _The goto statement shouldn't be used_  and _Assembly language shall be encapsulated and isolated_ to _Identifiers in the same namespace with overlapping visibility should be typographically unambiguous_ etc. but mostly it is a syntactic issue (below is a snapshot of the analysis result):\r\n![screenshot from 2016-07-06 22 04 02](https://cloud.githubusercontent.com/assets/2790461/16643223/76052efe-43c7-11e6-9c61-17a1906808a8.png)\r\n\r\nHere is shown what files/folder contains the most violations of the standard:\r\n![screenshot from 2016-07-06 22 18 33](https://cloud.githubusercontent.com/assets/2790461/16643240/971330aa-43c7-11e6-8d96-cb3e99c0313d.png)\r\n\r\nAs with any standard, updating the code to conform to the standard would be mostly tedious and repetitive work (fixing similar issues in multiple files), but certainly not too difficult. Also, it might make sense to not comply with all MISRA directives, but only with the subset that makes most sense.\r\n\r\nAnyway, is there interest from other developers? @flixr @gautierhattenberger @deonblaauw "},"comment":{"url":"https://api.github.com/repos/paparazzi/paparazzi/issues/comments/231041906","html_url":"https://github.com/paparazzi/paparazzi/issues/1783#issuecomment-231041906","issue_url":"https://api.github.com/repos/paparazzi/paparazzi/issues/1783","id":231041906,"user":{"login":"flixr","id":104257,"avatar_url":"https://avatars.githubusercontent.com/u/104257?v=3","gravatar_id":"","url":"https://api.github.com/users/flixr","html_url":"https://github.com/flixr","followers_url":"https://api.github.com/users/flixr/followers","following_url":"https://api.github.com/users/flixr/following{/other_user}","gists_url":"https://api.github.com/users/flixr/gists{/gist_id}","starred_url":"https://api.github.com/users/flixr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flixr/subscriptions","organizations_url":"https://api.github.com/users/flixr/orgs","repos_url":"https://api.github.com/users/flixr/repos","events_url":"https://api.github.com/users/flixr/events{/privacy}","received_events_url":"https://api.github.com/users/flixr/received_events","type":"User","site_admin":false},"created_at":"2016-07-07T10:30:07Z","updated_at":"2016-07-07T10:30:07Z","body":"That would be nice. Also if you can distill some of the most important rules out, updates to our coding style guide would be appreciated."}}
{"actor":{"display_login":"flixr"}}