Following the coding style

54 views
Skip to first unread message

Vitaliy Slobodin

unread,
Dec 13, 2013, 1:55:10 PM12/13/13
to phan...@googlegroups.com
Hi guys!

What do you think about adding coding style checker? Like this one: https://github.com/Vitallium/phantomjs/blob/add-check-style-script/tools/check-style.bat (I tried to match to the Qt Coding Style)

Only a few members knows that we are following this guidelines - http://qt-project.org/wiki/Qt_Coding_Style
But, some pull requests don't follow it. More on this, some commits didn't follow it.
And, I think we lost this line from our `Contribution Guide`.

Regards,
Vitaliy.

Vasiliy P

unread,
Dec 13, 2013, 2:46:51 PM12/13/13
to phan...@googlegroups.com
100% of developers appreciate coding style, unit & functional tests, continuous integration, etc. but not everyone does really follow )


2013/12/13 Vitaliy Slobodin <vitaliy....@gmail.com>

--
You received this message because you are subscribed to the Google Groups "phantomjs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to phantomjs+...@googlegroups.com.
Visit this group at http://groups.google.com/group/phantomjs.
For more options, visit https://groups.google.com/groups/opt_out.

Ariya Hidayat

unread,
Dec 13, 2013, 5:41:07 PM12/13/13
to phan...@googlegroups.com
I think it's a fantastic idea. Feel free to create an issue to
clean-up the style (if it doesn't exist yet) and use it as the basis
to do the first clean-up before we activate the style check.

Also, something I wanted to do for a while is a hook to Travis CI. We
can't build PhantomJS there because it takes too long. However, it's a
perfect place to inject any kind of sanity checks such as the above
coding style check. That way, if there's a pull request, than the
patch is verified against the checker and there's a feedback in the
pull request about the status.

Thanks!

Regards,




--
Ariya Hidayat, http://ariya.ofilabs.com
http://twitter.com/ariyahidayat
http://google.com/+AriyaHidayat

Vitaliy Slobodin

unread,
Dec 14, 2013, 6:33:12 AM12/14/13
to phan...@googlegroups.com
Hi,

I already started working on this feature.
Should I change some formatting options?

Regards,
Vitaliy.

Vitaliy Slobodin

unread,
Feb 5, 2014, 4:44:05 PM2/5/14
to phan...@googlegroups.com
Hi,

Unfortunately, AStyle (http://astyle.sourceforge.net/) doesn't suit to
our requirements.
This tool can only do a format of source files. I'm searching for a this
kind of tool.
What exactly do we need: we need a check tool to check our source code
style, like the JSLint.

I think we could acquire a script from Webkit
(http://trac.webkit.org/browser/trunk/Tools/Scripts/check-webkit-style).
It's written in Python, so we can adapt it easily.

Thoughts?

Regards,
Vitaliy.
Reply all
Reply to author
Forward
0 new messages