{"action":"created","issue":{"url":"https://api.github.com/repos/spheras/desktopfolder/issues/49","repository_url":"https://api.github.com/repos/spheras/desktopfolder","labels_url":"https://api.github.com/repos/spheras/desktopfolder/issues/49/labels{/name}","comments_url":"https://api.github.com/repos/spheras/desktopfolder/issues/49/comments","events_url":"https://api.github.com/repos/spheras/desktopfolder/issues/49/events","html_url":"https://github.com/spheras/desktopfolder/issues/49","id":269245578,"number":49,"title":"Fix uncrustify and/or uncrustify config","user":{"login":"aljelly","id":10395308,"avatar_url":"https://avatars3.githubusercontent.com/u/10395308?v=4","gravatar_id":"","url":"https://api.github.com/users/aljelly","html_url":"https://github.com/aljelly","followers_url":"https://api.github.com/users/aljelly/followers","following_url":"https://api.github.com/users/aljelly/following{/other_user}","gists_url":"https://api.github.com/users/aljelly/gists{/gist_id}","starred_url":"https://api.github.com/users/aljelly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aljelly/subscriptions","organizations_url":"https://api.github.com/users/aljelly/orgs","repos_url":"https://api.github.com/users/aljelly/repos","events_url":"https://api.github.com/users/aljelly/events{/privacy}","received_events_url":"https://api.github.com/users/aljelly/received_events","type":"User","site_admin":false},"labels":[{"id":657680708,"url":"https://api.github.com/repos/spheras/desktopfolder/labels/question","name":"question","color":"cc317c","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-10-27T21:47:45Z","updated_at":"2017-11-01T02:24:53Z","closed_at":null,"author_association":"COLLABORATOR","body":"It's doing this currently:\r\n\r\n```vala\r\nthis.timeout_id = GLib.Timeout.add (100, () => {\r\n                                                // this.prueba.set_text(\"prueba %d\".printf(this.index));\r\n                                                (this.progress_bar as Gtk.ProgressBar).pulse ();\r\n                                                (this.status as Gtk.Label).set_text (this.text);\r\n                                                return true;\r\n                                            });\r\n```\r\n\r\nBut maybe it should be like this:\r\n\r\n```vala\r\nthis.timeout_id = GLib.Timeout.add (100, () => {\r\n    // this.prueba.set_text(\"prueba %d\".printf(this.index));\r\n    (this.progress_bar as Gtk.ProgressBar).pulse ();\r\n    (this.status as Gtk.Label).set_text (this.text);\r\n    return true;\r\n});\r\n```\r\n\r\nShould it be configured to do that instead?\r\n\r\n(Add any other comments about the code style and the config here)"},"comment":{"url":"https://api.github.com/repos/spheras/desktopfolder/issues/comments/340960052","html_url":"https://github.com/spheras/desktopfolder/issues/49#issuecomment-340960052","issue_url":"https://api.github.com/repos/spheras/desktopfolder/issues/49","id":340960052,"user":{"login":"aljelly","id":10395308,"avatar_url":"https://avatars3.githubusercontent.com/u/10395308?v=4","gravatar_id":"","url":"https://api.github.com/users/aljelly","html_url":"https://github.com/aljelly","followers_url":"https://api.github.com/users/aljelly/followers","following_url":"https://api.github.com/users/aljelly/following{/other_user}","gists_url":"https://api.github.com/users/aljelly/gists{/gist_id}","starred_url":"https://api.github.com/users/aljelly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aljelly/subscriptions","organizations_url":"https://api.github.com/users/aljelly/orgs","repos_url":"https://api.github.com/users/aljelly/repos","events_url":"https://api.github.com/users/aljelly/events{/privacy}","received_events_url":"https://api.github.com/users/aljelly/received_events","type":"User","site_admin":false},"created_at":"2017-11-01T02:24:53Z","updated_at":"2017-11-01T02:24:53Z","author_association":"COLLABORATOR","body":"There seems to be a strange mismatch between when I run uncrustify and when you run uncrustify. Yours seems to be doing this:\r\n\r\n```diff\r\npublic PanelProperties (FolderWindow window) {\r\n              Object (\r\n                  border_width: 5,\r\n-                 deletable:    false,\r\n-                 resizable:    false,\r\n-                 title:        _(\"Properties\")\r\n+deletable:    false,\r\n+resizable:    false,\r\n+title:        _(\"Properties\")\r\n              );\r\n          }\r\n```\r\n\r\nIt seems if a property is set to a number, it doesn't do this, but if it's a string or bool, it moves it to the beginning of the line.\r\n\r\nIt seems mine isn't affected by this and corrects it when I run it again:\r\n\r\n```diff\r\n         public PanelProperties (FolderWindow window) {\r\n             Object (\r\n                 border_width: 5,\r\n-deletable:    false,\r\n-resizable:    false,\r\n-title:        _(\"Properties\")\r\n+                deletable:    false,\r\n+                resizable:    false,\r\n+                title:        _(\"Properties\")\r\n             );\r\n         }\r\n```\r\n\r\n---\r\n\r\nBut when I run it, it does this:\r\n\r\n```diff\r\n public class DesktopFolder.ProgressDialog : Gtk.Dialog {\r\n-    private Gtk.Widget       status;\r\n-    private Gtk.Widget       progress_bar;\r\n-    private Gtk.Box          window_vbox;\r\n-    private uint             timeout_id = 0;\r\n+    private Gtk.Widget status;\r\n+    private Gtk.Widget progress_bar;\r\n+    private Gtk.Box window_vbox;\r\n+    private uint timeout_id = 0;\r\n     private GLib.Cancellable cancellable;\r\n \r\n     /**\r\n```\r\n\r\nAnd this:\r\n\r\n```diff\r\n public class DesktopFolder.PhotoSettings : Object {\r\n-    public int    x  { get; set; default = 0; }\r\n-    public int    y  { get; set; default = 0; }\r\n-    public int    w  { get; set; default = 0; }\r\n-    public int    h  { get; set; default = 0; }\r\n-    public int    original_width { get; set; default = 0; }\r\n-    public int    original_height { get; set; default = 0; }\r\n-    public int    fixocolor { get; set; default = 0; }\r\n+    public int x  { get; set; default = 0; }\r\n+    public int y  { get; set; default = 0; }\r\n+    public int w  { get; set; default = 0; }\r\n+    public int h  { get; set; default = 0; }\r\n+    public int original_width { get; set; default = 0; }\r\n+    public int original_height { get; set; default = 0; }\r\n+    public int fixocolor { get; set; default = 0; }\r\n     public string name { get; set; }\r\n     public string photo_path { get; set; }\r\n\r\n```\r\n\r\n---\r\n\r\nThe problem is it creates a lot of noise if our uncrustifying keeps changing these back and forth.\r\n\r\nMaybe we're running different versions? I built uncrustify from the [latest release](https://github.com/uncrustify/uncrustify/releases/tag/uncrustify-0.65). I get `Uncrustify-0.65_f` when running `uncrustify --version`.\r\n\r\nDid you use `sudo apt install uncrustify`? It looks like the latest published version for Ubuntu Xenial (elementary's base) is outdated (version 0.59). I tried the version from `sudo apt install uncrustify` and it looks like it's doing what your version is doing.\r\n\r\nI could add instructions for building the [latest release](https://github.com/uncrustify/uncrustify/releases/tag/uncrustify-0.65) of uncrustify to the `knowhow` file, so everyone is using the same version."}}
{"actor":{"display_login":"aljelly"}}