After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 744906 - [FEATURE] Addition of a coafile
[FEATURE] Addition of a coafile
Status: RESOLVED FIXED
Product: gnome-clocks
Classification: Applications
Component: general
3.14.x
Other Linux
: Normal enhancement
: ---
Assigned To: Clocks maintainer(s)
Clocks maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2015-02-21 18:54 UTC by Ankit
Modified: 2015-04-25 11:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add .coalafile (1.12 KB, patch)
2015-02-24 18:55 UTC, Ankit
needs-work Details | Review
Add .coalafile (1.11 KB, patch)
2015-02-24 19:04 UTC, Ankit
needs-work Details | Review
Add .coalafile (1.07 KB, patch)
2015-02-24 19:07 UTC, Ankit
none Details | Review
Add .coafile (1011 bytes, patch)
2015-02-24 19:19 UTC, Ankit
needs-work Details | Review
Add .coafile (986 bytes, patch)
2015-02-24 19:36 UTC, Ankit
needs-work Details | Review
Add .coafile (986 bytes, text/plain)
2015-02-24 19:59 UTC, Ankit
  Details
Add .coafile (986 bytes, patch)
2015-02-24 22:21 UTC, Ankit
needs-work Details | Review
Add HACKME for coala (931 bytes, patch)
2015-02-24 22:21 UTC, Ankit
needs-work Details | Review
Wrap extra long lines (7.10 KB, patch)
2015-02-24 22:21 UTC, Ankit
needs-work Details | Review
Modify HACKME file (1.07 KB, patch)
2015-02-24 22:22 UTC, Ankit
needs-work Details | Review
Add .coafile (918 bytes, patch)
2015-02-25 16:58 UTC, Ankit
accepted-commit_now Details | Review
Add HACKME (1.03 KB, patch)
2015-02-25 16:59 UTC, Ankit
needs-work Details | Review
Wrap extra long lines (7.10 KB, patch)
2015-02-25 16:59 UTC, Ankit
accepted-commit_now Details | Review
Add .coafile (918 bytes, patch)
2015-02-25 18:12 UTC, Ankit
committed Details | Review
Add HACKME (2.64 KB, patch)
2015-02-25 18:12 UTC, Ankit
needs-work Details | Review
Wrap extra long lines (7.10 KB, patch)
2015-02-25 18:13 UTC, Ankit
none Details | Review
Add HACKME (2.64 KB, patch)
2015-02-26 09:40 UTC, Ankit
needs-work Details | Review
Wrap extra long lines (7.10 KB, patch)
2015-02-26 09:41 UTC, Ankit
none Details | Review
Add HACKME (2.66 KB, patch)
2015-04-25 10:10 UTC, Ankit
committed Details | Review
Wrap extra long lines (7.10 KB, patch)
2015-04-25 10:10 UTC, Ankit
committed Details | Review

Description Ankit 2015-02-21 18:54:10 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.
Comment 1 Lasse Schuirmann 2015-02-21 19:06:02 UTC
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.
Comment 2 Paolo Borelli 2015-02-22 17:27:40 UTC
I do not have any objections to adding it
Comment 3 Ankit 2015-02-24 18:55:34 UTC
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
Comment 4 Lasse Schuirmann 2015-02-24 19:01:46 UTC
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?
Comment 5 Ankit 2015-02-24 19:04:21 UTC
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
Comment 6 Lasse Schuirmann 2015-02-24 19:05:19 UTC
Review of attachment 297805 [details] [review]:

Did you read my full review?
Comment 7 Ankit 2015-02-24 19:07:05 UTC
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
Comment 8 Ankit 2015-02-24 19:19:56 UTC
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
Comment 9 Lasse Schuirmann 2015-02-24 19:29:26 UTC
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?
Comment 10 Ankit 2015-02-24 19:36:11 UTC
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
Comment 11 Lasse Schuirmann 2015-02-24 19:39:03 UTC
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.
Comment 12 Ankit 2015-02-24 19:59:56 UTC
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
Comment 13 Lasse Schuirmann 2015-02-24 21:14:29 UTC
Review of attachment 297816 [details]:

same as before.
Comment 14 Ankit 2015-02-24 22:21:43 UTC
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
Comment 15 Ankit 2015-02-24 22:21:51 UTC
Created attachment 297834 [details] [review]
Add HACKME for coala

HACKME file with instructions to use coala added.
Comment 16 Ankit 2015-02-24 22:21:59 UTC
Created attachment 297835 [details] [review]
Wrap extra long lines

Lines with length greater than 120 were wrapped in order to
make code more readable.
Comment 17 Ankit 2015-02-24 22:22:08 UTC
Created attachment 297836 [details] [review]
Modify HACKME file

Modified HACKME file to add a proper introduction.
Comment 18 Lasse Schuirmann 2015-02-25 06:05:02 UTC
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.
Comment 19 Lasse Schuirmann 2015-02-25 06:07:29 UTC
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")
Comment 20 Lasse Schuirmann 2015-02-25 06:08:47 UTC
Review of attachment 297835 [details] [review]:

Looks good otherwise.

::: src/widgets.vala
@@ +86,3 @@
+                                 Gdk.Rectangle cell_area,
+                                 Gtk.CellRendererState flags) {
+

unneeded newline addition
Comment 21 Lasse Schuirmann 2015-02-25 06:10:53 UTC
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.
Comment 22 Ankit 2015-02-25 15:49:53 UTC
(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?
Comment 23 Lasse Schuirmann 2015-02-25 15:53:59 UTC
(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.
Comment 24 Ankit 2015-02-25 16:58:29 UTC
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.
Comment 25 Ankit 2015-02-25 16:59:06 UTC
Created attachment 297901 [details] [review]
Add HACKME

HACKME file with instructions to use coala added.
Comment 26 Ankit 2015-02-25 16:59:25 UTC
Created attachment 297902 [details] [review]
Wrap extra long lines

Lines with length greater than 120 were wrapped in order to
make code more readable.
Comment 27 Lasse Schuirmann 2015-02-25 17:26:13 UTC
Review of attachment 297900 [details] [review]:

looks good
Comment 28 Lasse Schuirmann 2015-02-25 17:28:46 UTC
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.
Comment 29 Lasse Schuirmann 2015-02-25 17:29:30 UTC
Review of attachment 297902 [details] [review]:

looks good to me
Comment 30 Ankit 2015-02-25 18:12:34 UTC
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.
Comment 31 Ankit 2015-02-25 18:12:49 UTC
Created attachment 297914 [details] [review]
Add HACKME

HACKME file with instructions to use coala added.
Comment 32 Ankit 2015-02-25 18:13:09 UTC
Created attachment 297915 [details] [review]
Wrap extra long lines

Lines with length greater than 120 were wrapped in order to
make code more readable.
Comment 33 Lasse Schuirmann 2015-02-25 18:16:44 UTC
Review of attachment 297913 [details] [review]:

ack
Comment 34 Lasse Schuirmann 2015-02-25 18:19:26 UTC
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.
Comment 35 Ankit 2015-02-26 09:40:25 UTC
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
Comment 36 Ankit 2015-02-26 09:41:25 UTC
Created attachment 297955 [details] [review]
Wrap extra long lines

Lines with length greater than 120 were wrapped in order to
make code more readable.
Comment 37 Lasse Schuirmann 2015-02-27 09:27:36 UTC
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
Comment 38 Ankit 2015-04-25 10:10:15 UTC
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
Comment 39 Ankit 2015-04-25 10:10:59 UTC
Created attachment 302330 [details] [review]
Wrap extra long lines

Lines with length greater than 120 were wrapped in order to
make code more readable.
Comment 40 Lasse Schuirmann 2015-04-25 10:13:40 UTC
Review of attachment 302329 [details] [review]:

ack
Comment 41 Lasse Schuirmann 2015-04-25 10:17:09 UTC
Review of attachment 302330 [details] [review]:

lgtm
Comment 42 Lasse Schuirmann 2015-04-25 11:20:24 UTC
thanks for the patches!