Giter VIP home page Giter VIP logo

scrutinizer's People

Contributors

schmittjoh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

scrutinizer's Issues

Allow multiple of the same tool

We've got a project that runs two different code sniffer standards over the entire codebase, currently in a rather hacky way through Travis.

From what I can tell, scrutinizer only allows for one configuration of each individual tool. It would be nice if we could move both our code sniffs to scrutinizer (they can't be merged), which would require allowing more than one configuration for each tool.

Receive build's results by email

Hi,

Is it already possible to receive build's results by email?
In UI, I see the "Unsubscribe" button: what does it mean?

Thanks for responses and for this great tool !

PHPLOC is enabled but nothing shows up in the Metrics tabs

I've enabled PHPLOC in my global configuration with php_loc: true and in my repository config I have inherit: true so that it uses the global config. Everything else works fine but the Metrics tab remains empty although I see PHPLOC running in the log, is that where I'm supposed to see the metrics ?

Cleaner badges

The scrutinizer badge currently looks quite bad (in my opinion) as it has too many details for its current size. Aligning it to the one of travis-ci or coveralls may be nice:

scrutinizer
coveralls
travis
poser
versioneye

shields.io could eventually provide support for this

Global exclude_path is not taken into account

When defining a global exclude_path array via the filter option :

filter:
    excluded_paths: ["vendor/*", "tests/*", "examples/*"]

Those folders don't seem to be taken into account and get analyzed by the different tools.

excluded_paths vs. excluded_dirs

With that two options the configuration as a whole lacks a bit consistency. Would be cool, to only have one pattern that applies to all tools. And also that makes it difficult to provide a global filter option for the whole config, which can be very handsome.

PHP CPD does not respect the path filters

This is the config reported in the build (partial as I have other tools):

{

        "php_cpd": {
            "enabled": true,
            "filter": {
                "paths": {
                    "0": "src\/Incenteev"
                },
                "excluded_paths": {
                    "0": "src\/Incenteev\/*\/Tests\/*"
                }
            },
            "command": "phpcpd",
            "min_lines": 5,
            "min_tokens": 70,
            "excluded_dirs": {

            },
            "names": {
                "0": "*.php"
            }
        }
}

but PHP CPD reports issues in web/app_test.php (not matching the src/Incenteev path) and it src/Incenteev/WebBundle/Tests/... (which should be excluded)

Call to undefined method `Scrutinizer\PhpAnalyzer\Model\TraitC::getTraversableElementType()`

I've just tested the service the first time and I get the following error when using scrutinizer ci with my repository FlorianWolters/PHP-Component-Core-Cloneable.

PHP Fatal error:  Call to undefined method Scrutinizer\PhpAnalyzer\Model\TraitC::getTraversableElementType() in /home/scrutinizer-worker/app/releases/20130323134330/vendor/scrutinizer/php-analyzer/src/Scrutinizer/PhpAnalyzer/DataFlow/TypeInference/TypeInference.php on line 240

There is also the following output in the log:

Caution: {percentage}% of used types were not defined, e.g. {example}. This suggests that you are trying to analyze only a partial project, or excluded dependencies; doing so can cause the various data flow analyses (like type inference) to either be inaccurate or not converge to a fixed-point solution (i.e. be very slow).

Im using a .scrutinizer.yml configuration file in the repository with no inheritance.

Here is the complete log: https://scrutinizer-ci.com/g/FlorianWolters/PHP-Component-Core-Cloneable/inspections/60623db6-aaf2-4601-9a60-b7d64f632d9e#log

JSHint seems to add an error which is not displayed

On this inspection for instance, I only see 16 messages while the tab tells me there is 28. And I see a few files without message in it.

I can reach the total of 28 if I count 1 extra message per JS file appearing in the output, as if JSHint was adding an error on each of them which would get lost.

Docs for PHP Copy/Paste Detector

missing included files in repository:

.. include :: php_cpd_configuration.rst

.. include :: php_cpd_configuration_reference.rst

Only index.rst exists?!

Allowing to collect the code coverage from Travis builds (or other CI)

The current code coverage implementation requires running the testsuite on Scrutinizer. this has several drawbacks:

  • it duplicates work already done on Travis
  • it requires installing vendors on scrutinizer, making things slower (other tools don't need it)
  • it is difficult when your app needs additional PHP extensions (sundown in my case) or some other services (MySQL, MongoDB, RabbitMQ, Redis...) and your testsuite contains functional tests

It would be great to be able to collect the code coverage while running tests on CI services (as done by coveralls.io btw)

Upgrading JSHint

JSHint 1.1 was buggy for the unused:true option, reporting arguments as unused even when they are followed by a used argument (thus being the same than unused: strict).
this is rather annoying as it reports lots of false positives for our callbacks passed to thrid-party libraries in which we may not care about the first argument but only the second (for instance jQuery.each(function(index, value) {})).

this issue should be fixed in JSHint 2.0. Could you update the version used by scrutinizer ?

Implement PHPCD

(Sorry, didn't really know which repo was meant to be the website)


It would be nice if Scrutinizer also ran PHP Copy/Paste Detector on available files โ€“ it detects recurring patterns in the code that could be abstracted, ala Code Climate.

Add a dashboard page

It's currently a little cumbersome when logged in to have to go to Profile > Repositories and then check each one individually to see where I left off. It would be nice if when logged in the default homepage was replaced by a dashboard showing the currently tracked repositories and their last inspection (number of comments, fixes, and travis build).

New Metric: How well is source code commented?

Similarily to what ohloh does. It relates the number of comments to the number of code. The higher the percentage of comments, the better well commented a project is. Must be easy to calculate this statistic as phploc provides all the data.

Add CRAP metrics from PHPCodeCoverage

PHPCodeCoverage when running over a repository generates some metrics about code complexity.

dashboard
methods

Those are interesting statistics and one I often consult, would there be a way to integrate them in the Metrics tab if PHPCodeCoverage is enabled ?

MongoDB support

Is there a change for MongoDB support ?

At this point composer fails to install f.e. "doctrine/mongodb-odm" because mongo PHP extension is missing.

Is there a way to configure it that I haven't noticed ?

add hhvm static analyzer

please add support for the hhvm static analyzer.
hhvm is already faster than native PHP, so compatibility checks for this application server are quite important.

  • "apt-get install hhvm"
  • "hhvm --hphp -t analyze --input-list %s --output-dir %s --log 2" > report.log

Specifying rulesets for PHP Mess Detector (PHPMD) cause an exception

Defining the following section in the .scrutinizer.yml configuration file does not work:

  php_mess_detector:
    extensions:
      - php
    command: phpmd
    enabled: true
    config:
      rulesets:
        - codesize
        - controversial
        - design
        - naming

Running an inspection with that section causes the following error:

>   [Symfony\Component\Process\Exception\ProcessFailedException]

>   The command "phpmd '/tmp/phpmd_inputo7V5DW' xml 'codesize,controversial,design,naming'" failed.

I tested the phpmd command on my local machine and I think it is related to the ' character. Simply ommit it and it should work, e.g.:

phpmd /tmp/phpmd_inputo7V5DW xml codesize,controversial,design,naming

My current workaround is to comment the config section for PHPMD in the configuration file:

  php_mess_detector:
    extensions:
      - php
    command: phpmd
    enabled: true
#    config:
#      rulesets:
#        - codesize
#        - controversial
#        - design
#        - naming

"Inspection timed out" on scrutinizer-ci.com

Running bin/scrutinizer run locally worked flawlessly.

Config

{
    "tools": {
        "php_mess_detector": {
            "enabled": true,
            "extensions": {
                "0": "php"
            },
            "command": "phpmd",
            "filter": {
                "paths": {

                },
                "excluded_paths": {

                }
            },
            "config": {
                "rulesets": {
                    "0": "codesize"
                }
            },
            "path_configs": {

            }
        },
        "php_cs_fixer": {
            "enabled": true,
            "extensions": {
                "0": "php"
            },
            "command": "php-cs-fixer",
            "filter": {
                "paths": {

                },
                "excluded_paths": {

                }
            },
            "config": {
                "level": "psr1",
                "fixers": {

                }
            },
            "path_configs": {

            }
        },
        "php_analyzer": {
            "enabled": true,
            "filter": {
                "excluded_paths": {

                },
                "paths": {

                }
            },
            "extensions": {
                "0": "php"
            },
            "path_configs": {

            }
        },
        "php_code_sniffer": {
            "enabled": true,
            "config": {
                "standard": "PSR1",
                "sniffs": {

                },
                "config": {

                }
            },
            "extensions": {
                "0": "php"
            },
            "command": "phpcs",
            "filter": {
                "paths": {

                },
                "excluded_paths": {

                }
            },
            "path_configs": {

            }
        },
        "sensiolabs_security_checker": {
            "enabled": true,
            "filter": {
                "paths": {

                },
                "excluded_paths": {

                }
            }
        }
    },
    "filter": {
        "paths": {

        },
        "excluded_paths": {

        }
    },
    "before_commands": {

    },
    "after_commands": {

    },
    "artifacts": {

    }
}

Output

Scheduling package installation
Installing Package
> $ git clone 'https://github.com/frosas/php-misc.git' '/home/scrutinizer/package'
> Cloning into '/home/scrutinizer/package'...
> $ cd /home/scrutinizer/package
> $ git checkout -qf a32e360ef40da593dd4598046f1a6357827117dc
Package was installed; it contained no config files.
Installation succeeded; scheduling parsing of configuration data
Parsing repository configuration
Configuration does not inherit, finalizing
Scheduling PHP Analyzer Run
Scheduling Scrutinizer Run
Dependencies are not yet available, scheduling analysis
Installing PHP dependencies through composer
> $ scrutinizer run --format="json" --output-file="/home/scrutinizer/build/result" --verbose /home/scrutinizer/build/package
> Analyzing file "src/Frosas/Json.php".
> Analyzing file "src/Frosas/Reflection.php".
> Analyzing file "src/Frosas/String.php".
> Analyzing file "src/Frosas/Set.php".
> Analyzing file "src/Frosas/NotFoundException.php".
> Analyzing file "src/Frosas/Collection.php".
> Analyzing file "src/Frosas/Collection/Wrapper.php".
> Analyzing file "src/Frosas/Html.php".
> Analyzing file "src/Frosas/Map.php".
> Analyzing file "src/Frosas/Error.php".
> Analyzing file "src/Frosas/Backtrace.php".
> Analyzing file "src/Frosas/Util.php".
> Analyzing file "bin/collection-performance.php".
> Analyzing file "tests/Frosas/CollectionTest.php".
> Analyzing file "tests/Frosas/UtilTest.php".
> Analyzing file "tests/Frosas/MapTest.php".
> Analyzing file "tests/Frosas/HtmlTest.php".
> Analyzing file "tests/Frosas/Collection/WrapperTest.php".
> Analyzing file "tests/Frosas/JsonTest.php".
> Analyzing file "tests/Frosas/ReflectionTest.php".
> Analyzing file "tests/Frosas/StringTest.php".
> Analyzing file "tests/Frosas/SetTest.php".
> Analyzing file "tests/Frosas/ErrorTest.php".
> Analyzing file "src/Frosas/Json.php".
> Analyzing file "src/Frosas/Reflection.php".
> Analyzing file "src/Frosas/String.php".
> Analyzing file "src/Frosas/String.php".
> Analyzing file "src/Frosas/Set.php".
> Analyzing file "src/Frosas/NotFoundException.php".
> Analyzing file "src/Frosas/Collection.php".
> Analyzing file "src/Frosas/Collection/Wrapper.php".
> Analyzing file "src/Frosas/Html.php".
> Analyzing file "src/Frosas/Map.php".
> Analyzing file "src/Frosas/Error.php".
> Analyzing file "src/Frosas/Backtrace.php".
> Analyzing file "src/Frosas/Util.php".
> Analyzing file "bin/collection-performance.php".
> Analyzing file "tests/Frosas/CollectionTest.php".
> Analyzing file "tests/Frosas/UtilTest.php".
> Analyzing file "tests/Frosas/MapTest.php".
> Analyzing file "tests/Frosas/HtmlTest.php".
> Analyzing file "tests/Frosas/Collection/WrapperTest.php".
> Analyzing file "tests/Frosas/JsonTest.php".
> Analyzing file "tests/Frosas/ReflectionTest.php".
> Analyzing file "tests/Frosas/StringTest.php".
> Analyzing file "tests/Frosas/SetTest.php".
> Analyzing file "tests/Frosas/ErrorTest.php".
> Analyzing file "src/Frosas/Json.php".
> Analyzing file "src/Frosas/Reflection.php".
> Analyzing file "src/Frosas/String.php".
> Analyzing file "src/Frosas/Set.php".
> Analyzing file "src/Frosas/NotFoundException.php".
> Analyzing file "src/Frosas/Collection.php".
> Analyzing file "src/Frosas/Collection/Wrapper.php".
> Analyzing file "src/Frosas/Html.php".
> Analyzing file "src/Frosas/Map.php".
> Analyzing file "src/Frosas/Error.php".
> Analyzing file "src/Frosas/Backtrace.php".
> Analyzing file "src/Frosas/Util.php".
> Analyzing file "bin/collection-performance.php".
> Analyzing file "tests/Frosas/CollectionTest.php".
> Analyzing file "tests/Frosas/UtilTest.php".
> Analyzing file "tests/Frosas/MapTest.php".
> Analyzing file "tests/Frosas/HtmlTest.php".
> Analyzing file "tests/Frosas/Collection/WrapperTest.php".
> Analyzing file "tests/Frosas/JsonTest.php".
> Analyzing file "tests/Frosas/ReflectionTest.php".
> Analyzing file "tests/Frosas/StringTest.php".
> Analyzing file "tests/Frosas/SetTest.php".
> Analyzing file "tests/Frosas/ErrorTest.php".
> $ composer config -g notify-on-install false
> $ composer install --dev --no-progress --no-scripts --no-custom-installers
Scrutinizer has finished; scheduling results for post-processing.
> Loading composer repositories with package information
> Installing dependencies
>   - Installing phpoption/phpoption (1.1.0)
>
> Loading composer repositories with package information
> Installing dev dependencies
>   - Installing symfony/yaml (v2.1.7)
>     Downloading
>
>   - Installing phpunit/php-text-template (1.1.4)
>     Downloading
>
>   - Installing phpunit/phpunit-mock-objects (1.2.3)
>     Downloading
>
>   - Installing phpunit/php-timer (1.0.4)
>     Downloading
>
>   - Installing phpunit/php-token-stream (1.1.5)
>     Downloading
>
>   - Installing phpunit/php-file-iterator (1.3.3)
>     Downloading
>
>   - Installing phpunit/php-code-coverage (1.2.8)
>     Downloading
>
>   - Installing phpunit/phpunit (3.7.14)
>     Downloading
>
> phpunit/phpunit suggests installing phpunit/php-invoker (>=1.1.0,<1.2.0)
> Writing lock file
> Generating autoload files
Dependencies were installed, calculating dependency builder order
Scheduling analysis for phpunit/phpunit
Moving phpunit/phpunit to persistent storage
Scheduling analysis for frosas/php-misc
Moving frosas/misc to persistent storage
Dependency analysis completed, waiting for their builds to finish.

Weird message from PHP Analyzer

I'm getting a weird warning from PHP Analyzer with what looks like a placeholder that wasn't replaced :

Caution: {percentage}% of used types were not defined, e.g. {example}. This suggests that you are trying to analyze only a partial project, or excluded dependencies; doing so can cause the various data flow analyses (like type inference) to either be inaccurate or not converge to a fixed-point solution (i.e. be very slow).

Is this normal or does it come from something I misconfigured ?
Seeing the message I tried redoing an inspection without excluding the vendor folder but got the same message.

Build : https://scrutinizer-ci.com/g/Anahkiasen/rocketeer/inspections/013d547a-180a-48f8-a4d8-823308e906d4

PDepend metrics seems to be misreported

Running PHP LOC and PDepend in the same build gives some crazy metrics.

See this build and compare the number of classes or of interfaces reported by both tools. It looks like PDepend does not parse the whole project. Does PDepend has a different definition for "Number of classes" or is there a mistake in the implementation when reading the PDepend output ?

php_mess_detector: phpfilter: exclude_paths causes build config parse error

I have the following build configuration and on save I get the following error (Unable to parse at line 9 (near " filter:").):

tools:
    php_cs_fixer: true
    php_code_sniffer:
        config:
            standard: PSR1
        filter:
            excluded_paths: ["tests/*"]
    php_mess_detector: true
        filter:
            excluded_paths: ["tests/*"]
    php_analyzer:
        filter:
            excluded_paths: ["tests/*"]
    sensiolabs_security_checker: true

This functionality is documented at https://scrutinizer-ci.com/docs/tools/php/mess-detector/

add badges

please add

  • a "coverage status" badge, linking to the coverage report
  • a "source code quality" badge, linking to the analyzer report

projects like doctrine2 are starting to choose coverall.io,
just because of the badge and the coverage report.
now that metrics are there, this shouldn't be to hard to implement.
it's also good for marketing of scrutinizer

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.