Web Analytics Made Easy -
StatCounter Is anyone interested in cloud-based PHP code quality checker? - CodingForum

Announcement

Collapse
No announcement yet.

Is anyone interested in cloud-based PHP code quality checker?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Is anyone interested in cloud-based PHP code quality checker?

    I have an idea, but I am not sure if it is any use. I need community help to determine this.

    The idea is to build cloud-based service that can perform static checks on PHP code. Static checks types that I think about are:
    1. Syntax and type checks.
    2. Code conventions compatibility checks (code compatibility with PEAR/PSR/Symfony code style conventions). In perspective, automatic fixing of mistakes, like using tabs instead spaces, replacing shortened php tags with long, etc.
    3. Code complexity checks.

    When check is finished, user will have report with results and recommendations what to improve.

    User will be able to test single PHP file, archive of files or whole repository. It is very important to enable GitHub/Bitbucket hooks support, so these static checks can be performed as part of CI testing process.

    In perspective, this can be implemented for other languages as well.

    Please, feel free to criticize me and tell your thoughts about this idea. Thanks!

  • #2
    Benefits of using this system that I see are next:
    1. You will know better what parts of your code smell.
    2. You will have better control over code style consistency, so overall readability of code will improve.

    Comment


    • #3
      No company will use online code quality software. Risk of code getting to wrong hands is too great.
      Offline is the key. I could be interested in an offline tool that works with CI tests or could be implemented into most common editors.
      Don't use old mysql library
      The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets
      When a white horse is not a horse

      Comment


      • #4
        Hi Vege,

        First, thanks for reply!

        I would argue a bit, because not all small-/mid-sized companies wouldn't like to have their own CI server: this is why Travis-CI and similar services exist.

        However, I agree, offline version of application or version that can be installed on your own CI server could be great to have, if a company wants to secure its privacy. Thanks for a point!

        Comment


        • #5
          Originally posted by metamaker View Post
          automatic fixing of mistakes, like using tabs instead spaces
          That is something I hate - people using tabs instead of spaces - you open up a file in the cpanel editor and it's all over the place. But with that said, it's easy for anyone to replace tabs with spaces in a decent editor - a couple of clicks and your done.

          I'm not saying your idea is a bad one, but it would be pretty complicated to code, your users would be relying on you being a super php expert and as Vege says, nobody who is using super secret code will ever use it (or an offline version that could still secretly transmit the code).

          I suspect your target market would be newbies, hobbyists and those with lower end websites. There's nothing wrong with that but don't go thinking you're going to hit the millions overnight...
          "Tango says double quotes with a single ( ' ) quote in the middle"
          '$Name says single quotes with a double ( " ) quote in the middle'
          "Tango says double quotes ( \" ) must escape a double quote"
          '$Name single quotes ( \' ) must escape a single quote'

          Comment


          • #6
            Hi tangoforce,

            But with that said, it's easy for anyone to replace tabs with spaces in a decent editor - a couple of clicks and your done.
            Correct. But what about calculation of cyclomatic complexity? What about searching for dead/copy-pasted code? There are a lot of metrics that are helpful to check code quality, some of them are already implemented for PHP/Python/Ruby, but some are not. What I am trying to do at the moment, is to find what useful stuff I can implement, so it won't duplicate existing things and could be really helpful.

            an offline version that could still secretly transmit the code.
            Anyone can achieve that it doesn't transmit anything by:
            a) Enabling firewall.
            b) Checking incoming/outgoing app's network traffic with Wireshark or other network sniffer.

            I suspect your target market would be newbies, hobbyists and those with lower end websites. There's nothing wrong with that but don't go thinking you're going to hit the millions overnight...
            Or may be not. Are you sure that everyone in all big companies are using best methodologies? Ofc, experience and knowledge are shared between mentors and junior developers, but sometimes you might not know some things. Did you know that expressions like "0 < x and x <= 2" can be rewritten in Python like "0 < x <= 2" without harm (stupid example, but you understood an idea )? Also, code style consistency is very important and if someone hurts code base consistency, you would like to know this hero and teach him a lesson of coding without tabs (in your case ). Better code style consistency means better readability of code.

            Comment


            • #7
              2. Code conventions compatibility checks (code compatibility with PEAR/PSR/Symfony code style conventions). In perspective, automatic fixing of mistakes, like using tabs instead spaces, replacing shortened php tags with long, etc.

              I planned to do similar idea.
              Online PHP Debugger
              (built-in Vim mode)
              http://phpio.net

              Comment

              Working...
              X