|
View:
New views
20 Messages
—
Rating Filter:
Alert me
|
| < Prev | 1 - 2 | Next > |
|
|
Coding style checksHi
I've created tuned coding style checks for phpcs, which is now being used on http://ci.phpmyadmin.net/. As you can see we got rid of 2000 useless warnings (mostly about missing @author/@copyright/@link, which we don't use). However we still have more than 10000 violations. Some are simply not fixable or hard to fix, but some are easy (like adding documentation). Anyway please try not to introduce new violations if possible :-). We want nice code base that is easy to understand and following coding standard helps here a lot. -- Michal Čihař | http://cihar.com | http://blog.cihar.com ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@... https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel |
|
|
Re: Coding style checksLe 2012-04-26 10:12, Michal Čihař a écrit :
> Hi > > I've created tuned coding style checks for phpcs, which is now being > used on http://ci.phpmyadmin.net/. As you can see we got rid of 2000 > useless warnings (mostly about missing @author/@copyright/@link, which > we don't use). > > However we still have more than 10000 violations. Some are simply not > fixable or hard to fix, but some are easy (like adding documentation). > Anyway please try not to introduce new violations if possible :-). We > want nice code base that is easy to understand and following coding > standard helps here a lot. do you mean the coding standard mentioned on [0] or something else? [0] http://www.phpmyadmin.net/home_page/devel.php -- Marc Delisle http://infomarc.info ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@... https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel |
|
|
Re: Coding style checksOn 26/04/12 15:48, Marc Delisle wrote:
> Le 2012-04-26 10:12, Michal Čihař a écrit : >> Hi >> >> I've created tuned coding style checks for phpcs, which is now being >> used on http://ci.phpmyadmin.net/. As you can see we got rid of 2000 >> useless warnings (mostly about missing @author/@copyright/@link, which >> we don't use). >> >> However we still have more than 10000 violations. Some are simply not >> fixable or hard to fix, but some are easy (like adding documentation). >> Anyway please try not to introduce new violations if possible :-). We >> want nice code base that is easy to understand and following coding >> standard helps here a lot. > > Michal, > do you mean the coding standard mentioned on [0] or something else? > > [0] http://www.phpmyadmin.net/home_page/devel.php Yes, I think that he meant the PEAR coding standard. Phpcs does some sniffing for us on the continuous integration server and reports the violations (e.g.: [0]), however some of those checks were pretty pointless. Bye, Rouslan [0]: http://ci.phpmyadmin.net/job/phpMyAdmin-continuous/1308/checkstyleResult/? ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@... https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel |
|
|
Re: Coding style checksHi
Dne Thu, 26 Apr 2012 17:37:00 +0100 Rouslan Placella <rouslan@...> napsal(a): > Yes, I think that he meant the PEAR coding standard. Phpcs does some > sniffing for us on the continuous integration server and reports the > violations (e.g.: [0]), however some of those checks were pretty pointless. Yes, I mean PEAR coding standards. However few bits really don't apply to us, that's what I tried to adjust. If you still find some pointless checks, please let me know so that I can fix that. -- Michal Čihař | http://cihar.com | http://phpmyadmin.cz ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@... https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel |
|
|
|
|
|
Re: Coding style checksHi Willian,
You don't need to run phpcs yourself, we have a continuous integration server that runs it every 10 minutes provided that there are new commits on master. Just select "checkstyle warnings" in the left menu on this page: http://ci.phpmyadmin.net/job/phpMyAdmin-continuous/ Bye, Rouslan Quoting Willian Gustavo Veiga <wiltave@...>: > I would like to help in this task. How should I run phpcs to get these > warnings? > Thank you very much. ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@... https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel |
|
|
Re: Coding style checksOn Tue, May 1, 2012 at 3:02 PM, Rouslan Placella <rouslan@...> wrote: If you are using Eclipse or NetBeans as the IDE, you can install CodeSniffer plugin and identify violations. Here are two tutorials on how to install and configure the plugins [1], [2]. But be aware that we use slightly modified version of the standards as mentioned in this mail thread.Hi Willian, I think this is a good way to ensure coding style compliance for GSoC projects. This would make it possible to identify violations while coding rather than waiting to see the code get merged and violations being reflected on the Jenkins server page. Thanks and Regards, Madhura Jayaratne ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@... https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel |
|
|
|
|
|
Re: Coding style checksLe 2012-05-01 13:11, Willian Gustavo Veiga a écrit :
>> Hi Willian, > >> You don't need to run phpcs yourself, we have a continuous integration >> server that runs it every 10 minutes provided that there are new >> commits on master. Just select "checkstyle warnings" in the left menu >> on this page:http://ci.phpmyadmin.net/job/phpMyAdmin-continuous/ > >> Bye, >> Rouslan > > Hi Rouslan, > But how should i test my changes in localhost before a pull request ? > Are there any way? > Thank you very much. Willian, I am not familiar with PHP_CodeSniffer but maybe this link [0] can help. See also, in phpMyAdmin source, the PMAStandard directory. [0] http://pear.php.net/manual/en/package.php.php-codesniffer.php -- Marc Delisle http://infomarc.info ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@... https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel |
|
|
Re: Coding style checksHi
Dne Tue, 01 May 2012 14:11:55 -0300 Willian Gustavo Veiga <wiltave@...> napsal(a): > > Hi Willian, > > > You don't need to run phpcs yourself, we have a continuous integration > > server that runs it every 10 minutes provided that there are new > > commits on master. Just select "checkstyle warnings" in the left menu > > on this page:http://ci.phpmyadmin.net/job/phpMyAdmin-continuous/ > > > Bye, > > Rouslan > > Hi Rouslan, > But how should i test my changes in localhost before a pull request ? > Are there any way? our customized standard in phpMyAdmin's directory: phpcs --standard=PMAStandard file.php -- Michal Čihař | http://cihar.com | http://blog.cihar.com ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@... https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel |
|
|
Re: Coding style checksOn Wed, May 2, 2012 at 12:17 PM, Michal Čihař <michal@...> wrote:
> Sure there is :-). Once you install PHP CodeSniffer you can run it with > our customized standard in phpMyAdmin's directory: > > phpcs --standard=PMAStandard file.php If you also want to use the NetBeans plugin as Madhura suggested, once you have copied the PMAStandard folder inside your installation dir (.../CodeSniffer/Standards/), you simply go to Tools->Options-> ->PHP->Code Sniffer->Standard and select PMAStandard from the list. If you had NetBeans open while copying PMAStandard, then you have to restart the IDE in order for it to display the new option in the list. All the best, Alex ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@... https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel |
|
|
Re: Coding style checksLe 2012-05-02 09:10, Alex Marin a écrit :
> On Wed, May 2, 2012 at 12:17 PM, Michal Čihař <michal@...> wrote: >> Sure there is :-). Once you install PHP CodeSniffer you can run it with >> our customized standard in phpMyAdmin's directory: >> >> phpcs --standard=PMAStandard file.php > > If you also want to use the NetBeans plugin as Madhura suggested, > once you have copied the PMAStandard folder inside your installation > dir (.../CodeSniffer/Standards/), you simply go to Tools->Options-> > ->PHP->Code Sniffer->Standard and select PMAStandard from the > list. > If you had NetBeans open while copying PMAStandard, then you have > to restart the IDE in order for it to display the new option in the list. > > All the best, > Alex Can someone create a CodeSniffer page on http://wiki.phpmyadmin.net ? Don't forget to put this at the bottom: [[Category:Devel]] -- Marc Delisle http://infomarc.info ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@... https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel |
|
|
Re: Coding style checksOn Wed, May 2, 2012 at 4:22 PM, Marc Delisle <marc@...> wrote:
> Can someone create a CodeSniffer page on http://wiki.phpmyadmin.net ? > Don't forget to put this at the bottom: > > [[Category:Devel]] I can do this tonight. -- Alex ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@... https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel |
|
|
Re: Coding style checksI've created a wiki entry for CodeSniffer and it probably needs
needs some review, so you can take a look and edit at [0]. [0] http://wiki.phpmyadmin.net/pma/CodeSniffer All the best, Alex ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@... https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel |
|
|
Re: Coding style checksDne Thu, 3 May 2012 04:12:51 +0300
Alex Marin <alex.ukf@...> napsal(a): > I've created a wiki entry for CodeSniffer and it probably needs > needs some review, so you can take a look and edit at [0]. > > [0] http://wiki.phpmyadmin.net/pma/CodeSniffer Just a small comment: you don't have to copy PMAStandard anywhere with phpcs if it is available in current directory - so running phpcs --standard=PMAStandard in phpMyAdmins checkout will work -- Michal Čihař | http://cihar.com | http://blog.cihar.com ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@... https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel |
|
|
Re: Coding style checksOn Thu, May 3, 2012 at 9:23 AM, Michal Čihař <michal@...> wrote:
> Just a small comment: > > you don't have to copy PMAStandard anywhere with phpcs if it is > available in current directory - so running phpcs > --standard=PMAStandard in phpMyAdmins checkout will work Well I've initially tried it this way, but I get a stack trace: $ git co master $ git pull upstream master $ ls -al | grep PMA drwxrwxr-x 3 alex alex 4096 May 3 09:32 PMAStandard $ phpcs --standard=PMAStandard libraries/import/* PHP Fatal error: Uncaught exception 'PHP_CodeSniffer_Exception' with message 'Class PMAStandard_Sniffs_Commenting_FileCommentSniff not found' in /home/alex/Documents/work/pma_github/PMAStandard/Sniffs/Commenting/ClassCommentSniff.php:23 Stack trace: #0 /usr/share/php/PHP/CodeSniffer.php(652): include_once() #1 /usr/share/php/PHP/CodeSniffer.php(438): PHP_CodeSniffer->setTokenListeners('PMAStandard', Array) #2 /usr/share/php/PHP/CodeSniffer/CLI.php(551): PHP_CodeSniffer->process(Array, 'PMAStandard', Array, false) #3 /usr/bin/phpcs(37): PHP_CodeSniffer_CLI->process() #4 {main} thrown in /home/alex/Documents/work/pma_github/PMAStandard/Sniffs/Commenting/ClassCommentSniff.php on line 23 alex@ukf-laptop:~/Documents/work/pma_github$ So my solution was to move that folder under Standards :) Am I the only one getting this error? -- Alex ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@... https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel |
|
|
Re: Coding style checksHi
Dne Thu, 3 May 2012 09:41:04 +0300 Alex Marin <alex.ukf@...> napsal(a): > Well I've initially tried it this way, but I get a stack trace: > > $ git co master > $ git pull upstream master > $ ls -al | grep PMA > drwxrwxr-x 3 alex alex 4096 May 3 09:32 PMAStandard > $ phpcs --standard=PMAStandard libraries/import/* > PHP Fatal error: Uncaught exception 'PHP_CodeSniffer_Exception' with > message 'Class PMAStandard_Sniffs_Commenting_FileCommentSniff not > found' in /home/alex/Documents/work/pma_github/PMAStandard/Sniffs/Commenting/ClassCommentSniff.php:23 > Stack trace: > #0 /usr/share/php/PHP/CodeSniffer.php(652): include_once() > #1 /usr/share/php/PHP/CodeSniffer.php(438): > PHP_CodeSniffer->setTokenListeners('PMAStandard', Array) > #2 /usr/share/php/PHP/CodeSniffer/CLI.php(551): > PHP_CodeSniffer->process(Array, 'PMAStandard', Array, false) > #3 /usr/bin/phpcs(37): PHP_CodeSniffer_CLI->process() > #4 {main} > thrown in /home/alex/Documents/work/pma_github/PMAStandard/Sniffs/Commenting/ClassCommentSniff.php > on line 23 > alex@ukf-laptop:~/Documents/work/pma_github$ > > So my solution was to move that folder under Standards :) > Am I the only one getting this error? $ phpcs --standard=PMAStandard libraries/import/xml.php FILE: /home/mcihar/private/phpmyadmin/phpmyadmin/libraries/import/xml.php -------------------------------------------------------------------------------- FOUND 0 ERROR(S) AND 1 WARNING(S) AFFECTING 1 LINE(S) -------------------------------------------------------------------------------- 158 | WARNING | Line exceeds 85 characters; contains 103 characters -------------------------------------------------------------------------------- Time: 0 seconds, Memory: 5.25Mb What phpcs version are you using? Mine is: $ phpcs --version PHP_CodeSniffer version 1.3.3 (stable) by Squiz Pty Ltd. (http://www.squiz.net) -- Michal Čihař | http://cihar.com | http://blog.cihar.com ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@... https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel |
|
|
Re: Coding style checksOn Thu, May 3, 2012 at 9:46 AM, Michal Čihař <michal@...> wrote:
> What phpcs version are you using? Mine is: > > $ phpcs --version > PHP_CodeSniffer version 1.3.3 (stable) by Squiz Pty Ltd. > (http://www.squiz.net) The same one: $ phpcs --version PHP_CodeSniffer version 1.3.3 (stable) by Squiz Pty Ltd. (http://www.squiz.net) ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@... https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel |
|
|
Re: Coding style checksHi
Dne Thu, 3 May 2012 10:03:41 +0300 Alex Marin <alex.ukf@...> napsal(a): > On Thu, May 3, 2012 at 9:46 AM, Michal Čihař <michal@...> wrote: > > What phpcs version are you using? Mine is: > > > > $ phpcs --version > > PHP_CodeSniffer version 1.3.3 (stable) by Squiz Pty Ltd. > > (http://www.squiz.net) > > The same one: > $ phpcs --version > PHP_CodeSniffer version 1.3.3 (stable) by Squiz Pty Ltd. > (http://www.squiz.net) to influence this... -- Michal Čihař | http://cihar.com | http://blog.cihar.com ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@... https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel |
|
|
Re: Coding style checksLe 2012-05-03 02:41, Alex Marin a écrit :
> On Thu, May 3, 2012 at 9:23 AM, Michal Čihař <michal@...> wrote: >> Just a small comment: >> >> you don't have to copy PMAStandard anywhere with phpcs if it is >> available in current directory - so running phpcs >> --standard=PMAStandard in phpMyAdmins checkout will work > > Well I've initially tried it this way, but I get a stack trace: > > $ git co master > $ git pull upstream master > $ ls -al | grep PMA > drwxrwxr-x 3 alex alex 4096 May 3 09:32 PMAStandard > $ phpcs --standard=PMAStandard libraries/import/* > PHP Fatal error: Uncaught exception 'PHP_CodeSniffer_Exception' with > message 'Class PMAStandard_Sniffs_Commenting_FileCommentSniff not > found' in /home/alex/Documents/work/pma_github/PMAStandard/Sniffs/Commenting/ClassCommentSniff.php:23 > Stack trace: > #0 /usr/share/php/PHP/CodeSniffer.php(652): include_once() > #1 /usr/share/php/PHP/CodeSniffer.php(438): > PHP_CodeSniffer->setTokenListeners('PMAStandard', Array) > #2 /usr/share/php/PHP/CodeSniffer/CLI.php(551): > PHP_CodeSniffer->process(Array, 'PMAStandard', Array, false) > #3 /usr/bin/phpcs(37): PHP_CodeSniffer_CLI->process() > #4 {main} > thrown in /home/alex/Documents/work/pma_github/PMAStandard/Sniffs/Commenting/ClassCommentSniff.php > on line 23 > alex@ukf-laptop:~/Documents/work/pma_github$ > > So my solution was to move that folder under Standards :) > Am I the only one getting this error? -- Marc Delisle http://infomarc.info ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@... https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel |
| < Prev | 1 - 2 | Next > |
| Free embeddable forum powered by Nabble | Forum Help |