{"id":13622957,"url":"https://github.com/Qafoo/QualityAnalyzer","last_synced_at":"2025-04-15T10:32:07.097Z","repository":{"id":62531448,"uuid":"44381069","full_name":"Qafoo/QualityAnalyzer","owner":"Qafoo","description":"Tool helping us to analyze software projects","archived":false,"fork":false,"pushed_at":"2019-12-06T12:45:14.000Z","size":4149,"stargazers_count":494,"open_issues_count":13,"forks_count":31,"subscribers_count":24,"default_branch":"master","last_synced_at":"2025-02-11T04:35:35.431Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Qafoo.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-10-16T11:36:09.000Z","updated_at":"2024-11-28T15:57:18.000Z","dependencies_parsed_at":"2022-11-02T14:45:36.063Z","dependency_job_id":null,"html_url":"https://github.com/Qafoo/QualityAnalyzer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Qafoo%2FQualityAnalyzer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Qafoo%2FQualityAnalyzer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Qafoo%2FQualityAnalyzer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Qafoo%2FQualityAnalyzer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Qafoo","download_url":"https://codeload.github.com/Qafoo/QualityAnalyzer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249051728,"owners_count":21204873,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T21:01:26.279Z","updated_at":"2025-04-15T10:32:06.472Z","avatar_url":"https://github.com/Qafoo.png","language":"JavaScript","readme":"======================\nQafoo Quality Analyzer\n======================\n\n.. image::  https://api.travis-ci.org/Qafoo/QualityAnalyzer.svg?branch=master\n   :alt:    Travis Status\n   :target: https://travis-ci.org/Qafoo/QualityAnalyzer\n   :align:  right\n\nThis software is a tool to visualize metrics and source code. We use this\nsoftware for Code Reviews together with our customers.\n\n.. image:: src/images/screen.png\n   :alt:   Screeenshot\n   :target: src/images/screen.png\n\nRunning the analyzers requires the respective PHP tools, which are installed\nusing composer and can all be run using a convenience command. You may also run\nthe tools in your common build process, though.\n\nTo display the metrics a pure JavaScript / CSS stack is used so you could build\nand serve the results inside continuous integration tools like Jenkins. This\nmight seem strange but it works really well even with software spanning 800,000\nlines of PHP code.\n\nIf you want to improve, enhance the software or just fix some annoying bugs,\nyou are very welcome to do so. The technology stack involved sadly is not that\nsimple, though (PHP, Symfony2, Ant, Babel, D3, Grunt, Jasmine, Karma, SASS,\nPhantomJs, React, React-Router, Underscore, Webpack). A `Code of Conduct`__\napplies for any interaction with this project – if you feel like it is violated\nget in contact with Kore.\n\n__ http://hood.ie/code-of-conduct/\n\nSetup\n=====\n\nTo use the software there are very few steps involved. The only requirement is\na current version of PHP.\n\nRun the following commands to install the software::\n\n    git clone https://github.com/Qafoo/QualityAnalyzer.git\n    cd QualityAnalyzer\n    composer install\n\nIn the next step you can already analyze some software using something like\nthis::\n\n    bin/analyze analyze src/php/\n\nSee \"Usage\" for more details on the command. The results of this command can be\nfound in the ``data/`` folder.\n\nFinally you can start the webserver to view the results::\n\n    bin/analyze serve\n\nClick around and enjoy the data!\n\nUsage\n=====\n\nYou start by analyzing a certain project or providing the tool with the paths\nto existing analyze files, like code coverage reports::\n\n    bin/analyze analyze /path/to/source\n\nWith the default command the tool will analyze the source code itself. For\ntools like PHPMD or PDepend this makes a lot of sense since the tool already\nknows which options to use for each tool.\n\nThere are some reports we cannot generate ourselves like code coverage from\nyour tests. You can tell the tool where to find certain files to make sure they\nare available and ready to be used::\n\n    bin/analyze \\\n        --coverage=/path/to/clover.xml \\\n        --tests=/path/to/junit.xml \\\n        analyze /path/to/source\n\nYou can also specify already generated files for all the other tools. But the\nvisualization might behave strangely if some reports are generated in the wrong\nformats or some options are missing. We do not verify this (yet) properly.\n\nTo view the report in HTML format, run `bin/analyze bundle\n/path/for/generated/html` and then open `/path/for/generated/html/index.html`\nwith your browser.\n\nIgnore Sub-Directories\n----------------------\n\nYou might also want to tell the tools which directories there are to ignore by\nthe tools. This is *especially important* if you have (large) libraries in your\nsource directory – you do not want to analyze those. For this you may use the\n``--exclude`` option::\n    \n    bin/analyze \\\n        --coverage=/path/to/clover.xml \\\n        --tests=/path/to/junit.xml \\\n        --exclude=libraries,vendor \\\n        analyze /path/to/source\n\nAfter the analyzer has finished use ``bin/analyze serve`` or similar means to\naccess the ``index.html`` with your browser and enjoy the results\nvisualization.\n\nExclude Analyzers\n-----------------\n\nYou might also to avoid some analyzers to be run on your code intentionally, e.g.\nif you don't want your git usage be analysed. For this you may use the\n``--exclude_analyzers`` option::\n\n    bin/analyze \\\n        --exclude_analyzers=git,gitDetailed \\\n        analyze /path/to/source\n\nTo get a list of all available analyzers, run::\n\n    bin/analyze list:analyzers\n\nCustomize Tools\n---------------\n\nIf you want to customize tool execution you can always run all the tools\nyourself and pass the existing result files to the ``analyze`` command. An\nexample customizable ant build file doing this can be found here:\n`src/examples/customize.xml`__ or `src/examples/parallel.xml`__.\n\nThe parameters to pass you custom results, which wil omit running the tool by\nthe analyzer command itself are::\n\n    --pdepend=PDEPEND            Path to PDepend summary XML file\n    --dependencies=DEPENDENCIES  Path to PDepend dependencies XML file\n    --phpmd=PHPMD                Path to mess detector (PMD / PHPMD) XML file\n    --checkstyle=CHECKSTYLE      Path to checkstyle violations (PHP Code Sniffer) XML file\n    --cpd=CPD                    Path to C\u0026P violations (PHP Copy Paste Detector) XML file\n    --phploc=PHPLOC              Path to PHPLoc result XML file\n\nFeel free to provide examples using different build environments by creating a\npull request.\n\n__ src/examples/customize.xml\n__ src/examples/parallel.xml\n\nBuilding \u0026 Developing The Software\n==================================\n\nThe build system of the Quality Analyzer is based on ant. You must have **ant\n\u003e= 1.8** installed. To be able to use it you should first initilaize the\nsubmodule containing the build commons::\n\n    git submodule update --init\n\nTo develop the Quality Analyzer we heavily depend on a JavaScript build stack.\nFor this you must have `node` and `npm` installed. All other required tools\nwill be installed by the build tool. To set the project into development mode\nrun::\n\n    echo env=dev \u003e environment.local\n\nAs long as you do not remove this line from the ``environment.local`` file any\nmore or change it to ``prod`` all development tools and libraries will be\ninstalled and used.  This also means JavaScript and CSS will be compiled by\ncommands like ``ant serve``.\n\nRunning The Tests\n-----------------\n\nYou can run the tests by executing ``ant``.\n\nIt will run run tests through Karma \u0026 Jasmine for parts of the JavaScript stack\nand PHPUnit tests for the PHP stack (once we have some).\n\nBuilding CSS \u0026 JavaScript\n-------------------------\n\nThe project uses ECMAScript 6 and transpiles it using Babel. Thus we need to\nupdate the `bundle.js` when working on the client. This is done when the\nproject is prepared but can also be executed continuously using::\n\n    ant watch\n\nThis also compiles the SASS from the project and Bootstrap file into a single\nCSS file.\n\nTrying Out The Project\n----------------------\n\nIf you want to try out the project you can serve the root directory with\nbasically any webserver. The webserver should rewrite all requests to unknown\nresources to the index.html file which does the routing using JavaScript.\n\nFor your convenience we included a working server setup using PHPs internal\nwebserver. You can start it using::\n\n    ant serve\n\nGenerating The Bundle Files\n---------------------------\n\nThe following task ensures the bundle files are generated, compressed and\ncomitted::\n\n    ant deploy\n\n**Use this command to update the distributed files.**\n\nIt will run the ``package`` task first (after running all tests, of course). If\nthere are changes in the ``assets/`` folder those changes will be comitted and\nthe current development state will then be pushed. \n\n..\n   Local Variables:\n   mode: rst\n   fill-column: 79\n   End: \n   vim: et syn=rst tw=79\n","funding_links":[],"categories":["Table of Contents","目录","PHP","JavaScript"],"sub_categories":["Code Analysis","代码分析 Code Analysis"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FQafoo%2FQualityAnalyzer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FQafoo%2FQualityAnalyzer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FQafoo%2FQualityAnalyzer/lists"}