GNOME Bugzilla – Bug 744906
[FEATURE] Addition of a coafile
Last modified: 2015-04-25 11:20:24 UTC
Addition of a coalafile, coala configuration file. Coala is a great tool for checking inconsistencies in the code. And since integrity of code is important to community driven projects. I suggest addition of a prefabricated .coalafile for those who are using Coala alongside.
Hi, coala is available on: https://github.com/coala-analyzer/coala/releases/tag/v0.1.0-alpha A usage tutorial exists here: https://github.com/coala-analyzer/coala/blob/master/TUTORIAL.md I've recommended it to Ankit because I wrote coala in order to make it easier to newcomers to provide good patches. To make a bit more clear about what this is: A patch would add a hidden file (.coafile) to the root directory of clocks with nine simple lines. Any developer having coala installed can then just run > coala in and will get his or her patches checked for spacing inconsistencies and lines that are too long. With > coala todos he/she would get all FIXME's and TODO's from the code. It is meant as a QA tool and to ease review.
I do not have any objections to adding it
Created attachment 297803 [details] [review] Add .coalafile .coalafile is a coala config file used for checking code inconsistencies.It has been configured to check for trailing spaces. And disallows line lengths greater than 120. Coala can be installed from: https://github.com/coala-analyzer/coala To use coala, just open terminal and browse to code directory then type: $ coala
Review of attachment 297803 [details] [review]: Commit message: its a .coafile, not a coalafile. Missing space in line two of commit message after the dot. Furthermore the commit message is not the place for usage instructions. Rather do a follow up commit and add a HACKME file or so with full instructions on what you can do with coala. ::: .coafile @@ +5,3 @@ +files = src/*.vala + +[PythonCheck] we're checking vala, not python, right? @@ +11,3 @@ + +[LineCounting] +bears = LineCountBear this was more of an example of coala, the LineCountBear is rather useless so giving it an own section here doesn't do much good don't you think?
Created attachment 297805 [details] [review] Add .coalafile .coalafile is a coala config file used for checking code inconsistencies.It has been configured to check for trailing spaces. And disallows line lengths greater than 120. Coala can be installed from: https://github.com/coala-analyzer/coala To use coala, just open terminal and browse to code directory then type: $ coala
Review of attachment 297805 [details] [review]: Did you read my full review?
Created attachment 297806 [details] [review] Add .coalafile .coalafile is a coala config file used for checking code inconsistencies.It has been configured to check for trailing spaces. And disallows line lengths greater than 120. Coala can be installed from: https://github.com/coala-analyzer/coala To use coala, just open terminal and browse to code directory then type: $ coala
Created attachment 297810 [details] [review] Add .coafile .coafile is a coala config file used for checking code inconsistencies. It has been configured to check for trailing spaces. And disallows line lengths greater than 120. Coala can be installed from: https://github.com/coala-analyzer/coala
Review of attachment 297810 [details] [review]: Commit message: "spaces. And" -> "spaces and" or "spaces. It" ::: .coafile @@ +12,3 @@ +[TODOS] +bears = KeywordBear +ci_keywords = //TODO, // TODO, //FIXME, // FIXME // is a comment in a coafile. Wouldn't it be easier to just have TODO and FIXME as ci_keywords?
Created attachment 297811 [details] [review] Add .coafile .coafile is a coala config file used for checking code inconsistencies. It has been configured to check for trailing spaces and disallow line lengths greater than 120. Coala can be installed from: https://github.com/coala-analyzer/coala
Review of attachment 297811 [details] [review]: Coala -> coala Usual procedure is to make all patches ready and submit them all at once by the way. This way the reviewer doesn't have to wait so much between review of single patches and the mails are coming in as a bunch (thus easier to mark as read) which is important because many people are receiving those emails.
Created attachment 297816 [details] Add .coafile .coafile is a Coala config file used for checking code inconsistencies. It has been configured to check for trailing spaces and disallow line lengths greater than 120. Coala can be installed from: https://github.com/coala-analyzer/coala
Review of attachment 297816 [details]: same as before.
Created attachment 297833 [details] [review] Add .coafile .coafile is a coala config file used for checking code inconsistencies. It has been configured to check for trailing spaces and disallow line lengths greater than 120. coala can be installed from: https://github.com/coala-analyzer/coala
Created attachment 297834 [details] [review] Add HACKME for coala HACKME file with instructions to use coala added.
Created attachment 297835 [details] [review] Wrap extra long lines Lines with length greater than 120 were wrapped in order to make code more readable.
Created attachment 297836 [details] [review] Modify HACKME file Modified HACKME file to add a proper introduction.
Review of attachment 297833 [details] [review]: We're getting to it :) .coafile is a coala... -> A .coafile is a coala... And I'd strip the installation instructions. Especially since you're adding the HACKME after.
Review of attachment 297836 [details] [review]: You'll want one HACKME addition commit so I'd suggest you squash those commits. (I hope you know git rebase -i. Quote from another student: "Its a gift from heaven")
Review of attachment 297835 [details] [review]: Looks good otherwise. ::: src/widgets.vala @@ +86,3 @@ + Gdk.Rectangle cell_area, + Gtk.CellRendererState flags) { + unneeded newline addition
Review of attachment 297834 [details] [review]: I'm sorry, I think I was a bit unclear on that. But at least IMO an own file just for coala instructions isnt what we want. A HACKME makes only sense if you add _general_ introductory contents for people liking to begin working on clocks. E.g. you can take a look at the one I wrote when I got started for Boxes for inspiration: https://git.gnome.org/browse/gnome-boxes/tree/HACKING If you don't want to write a HACKME you can still add these instructions to README but an own file for that alone is a bit much.
(In reply to Lasse Schuirmann from comment #18) > And I'd strip the installation instructions. Especially since you're adding > the HACKME after. So, should I add a message like: "For usage refer to HACKME" in this commit message?
(In reply to Ankit from comment #22) > (In reply to Lasse Schuirmann from comment #18) > > > And I'd strip the installation instructions. Especially since you're adding > > the HACKME after. > > So, should I add a message like: > "For usage refer to HACKME" > > in this commit message? Thats your's to judge. Being more verbose in the commit message usually doesn't hurt anyone but its a few more seconds to write it. In this case I think we can do without. You're adding a coafile and explaining what it is, maybe mention that usage instructions will be added in the following commit.
Created attachment 297900 [details] [review] Add .coafile A .coafile is a coala config file used for checking code inconsistencies. It has been configured to check for trailing spaces and disallow line lengths greater than 120.
Created attachment 297901 [details] [review] Add HACKME HACKME file with instructions to use coala added.
Created attachment 297902 [details] [review] Wrap extra long lines Lines with length greater than 120 were wrapped in order to make code more readable.
Review of attachment 297900 [details] [review]: looks good
Review of attachment 297901 [details] [review]: Did you read https://bugzilla.gnome.org/show_bug.cgi?id=744906#c21 ? ::: HACKME @@ +14,3 @@ + +coala will test for the following things: +* No trailing spaces. I'd put a space before * for readability @@ +15,3 @@ +coala will test for the following things: +* No trailing spaces. +* Line lengths less than 120. coala also checks that there are no tabs.
Review of attachment 297902 [details] [review]: looks good to me
Created attachment 297913 [details] [review] Add .coafile A .coafile is a coala config file used for checking code inconsistencies. It has been configured to check for trailing spaces and disallow line lengths greater than 120.
Created attachment 297914 [details] [review] Add HACKME HACKME file with instructions to use coala added.
Created attachment 297915 [details] [review] Wrap extra long lines Lines with length greater than 120 were wrapped in order to make code more readable.
Review of attachment 297913 [details] [review]: ack
Review of attachment 297914 [details] [review]: Please read your stuff carefully before committing... ::: HACKME @@ +3,3 @@ + +If you are just interested in knowing how to post a bug you've found, just +read the section "Reporting Bugs" in README and follow the instructions. Reporting Bugs doesn't exist in README. PLease be more cautious when copying. Also you usually want to mention that parts are copied and its origin so the reviewer can check if you checked the license well.
Created attachment 297954 [details] [review] Add HACKME HACKME file with instructions to help new developers to get started with Clocks development added. Some of those contents are copied from [1] [1] https://git.gnome.org/browse/gnome-boxes/tree/HACKING
Created attachment 297955 [details] [review] Wrap extra long lines Lines with length greater than 120 were wrapped in order to make code more readable.
Review of attachment 297954 [details] [review]: Usually you want to break a line at 80 chars in plain text files. Some lines are longer (e.g.23) and some are way shorter which decreases readability. ::: HACKME @@ +20,3 @@ + comments on these patches. +* Dont be afraid about criticism! The review process is probably going to be long. +* We dont dislike you! We really appreciate your work. I'd put a space before * for better plain text readability. @@ +53,3 @@ +inconsistencies in the code. + +You may install coala from: Maybe: You may -> You can Sounds friendlier IMO. @@ +54,3 @@ + +You may install coala from: +https://github.com/coala-analyzer/coala Other links in this document are indented by one space, this one isn't
Created attachment 302329 [details] [review] Add HACKME HACKME file with instructions to help new developers to get started with Clocks development added. Some of those contents are copied from [1] [1] https://git.gnome.org/browse/gnome-boxes/tree/HACKING
Created attachment 302330 [details] [review] Wrap extra long lines Lines with length greater than 120 were wrapped in order to make code more readable.
Review of attachment 302329 [details] [review]: ack
Review of attachment 302330 [details] [review]: lgtm
thanks for the patches!