{"id":19481918,"url":"https://github.com/karlosagudo/fixtro","last_synced_at":"2025-04-25T15:32:38.772Z","repository":{"id":57004586,"uuid":"93189352","full_name":"karlosagudo/fixtro","owner":"karlosagudo","description":"A QA static analysis code, with a different approach","archived":false,"fork":false,"pushed_at":"2019-03-02T11:30:19.000Z","size":6167,"stargazers_count":23,"open_issues_count":0,"forks_count":3,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-09-24T12:37:17.857Z","etag":null,"topics":["php","php7","qatools","static-analysis","static-code-analysis"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/karlosagudo.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-06-02T17:34:45.000Z","updated_at":"2023-07-09T16:52:47.000Z","dependencies_parsed_at":"2022-08-21T14:30:24.296Z","dependency_job_id":null,"html_url":"https://github.com/karlosagudo/fixtro","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karlosagudo%2Ffixtro","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karlosagudo%2Ffixtro/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karlosagudo%2Ffixtro/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karlosagudo%2Ffixtro/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/karlosagudo","download_url":"https://codeload.github.com/karlosagudo/fixtro/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224007967,"owners_count":17240293,"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":["php","php7","qatools","static-analysis","static-code-analysis"],"created_at":"2024-11-10T20:07:16.327Z","updated_at":"2024-11-10T20:07:18.730Z","avatar_url":"https://github.com/karlosagudo.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fixtro\n\n[![Build Status](https://travis-ci.org/karlosagudo/fixtro.svg?branch=master)](https://travis-ci.org/karlosagudo/fixtro)\n\nA tool/framework to fix and check static code analysis in our enviroments. \n\n90% Users just need to run the install command, install the precommit and thats it, you will have a fixer of the code, and a way to analyze your code so detects possible(or future) errors.\nIn order to do so execute:\n    \n    composer require karlosagudo/fixtro --dev\n \n    vendor/bin/fixtro install\n\n## Usage:\n\n    {vendor-bin}/fixtro\n    \nIn order to install:\n\n    {vendor-bin}/fixtro install    \n\nThis will install fixtro dependencies and it as a precommit hook.\n\nThis is the command will be executed in each precommit:\n    \n    {vendor-bin}/fixtro precommit\n         \nIf want more info about the processes use verbose option -vvv\n\n**Fixtro** uses local binaries in case it found it, (for example phpunit, phpmd, php-cs-fixer),\n but in case it doesnt find it, it uses the own from fistro. (Thats why the install run a composer inside the vendor folder)\n \nWith this special feature, **there is no need to install anymore php-cs-fixer, phpunit etc in new projects**, only need to install fixtro on it.\nAlso , fixtro will try to look for local config files ie: .php_cs, phpunit.xml , inside the root folder of your project or the build one.\nSo, if you want to configure the project just think, as is php_cs_fixer, or phpunit were installed on it.\n\n**Requisites**\n* Php 7.0+\n* Composer\n\n**Important**\nRead the section about Uncomfortable errors, and [generate your own config files](docs/configFile.md)\n(.php_cs, phpunit.xml, psalm.xml, phpmd.xml)\n(TODO: this files will be generated in the install)\nYou can put this files, in the root of your project, or in the build folder.\n         \n### Commands\nAre in the folder src/CodeQualityTool/Commands.\nThere is a general Abstract called GeneralCommand, that normal commands will heritage.\n\nExamples:\n- FixEntireCommand - Will run all the checkers across the whole project\n- FIxPreCommit- Its intended to be a git-hook precommit, so will analyze only precommited files. (Will ignore the config for src folder and execute in commited files)\n\nAll Commands have an array where you can put the analyzers,\nand filter by files (folder FilterFiles), and add extra parameters.\nThis analyzers are in the Checker folder.\n\n### Checkers\nCheckers are the fixers or checkers that run in each commit and are already configured to be used in fixtro\n[List of Checkers](docs/checkers.md)\n\n\n### Uncomfortable errors\n\nSome of the checkers will show possible errors, that are almost impossible to solve, or there is no need to lost time on it, but you still want to run the other checkers.\n\nThis usually happens on phpmd and psalm.\nYou can configure your own configuration files for this projects, or avoid errors with annotations on the code:\n- [Phpmd conf](https://phpmd.org/documentation/writing-a-phpmd-rule.html)\n- [Phpmd avoid errors](https://phpmd.org/documentation/suppress-warnings.html)\n- [Psalm conf](https://github.com/vimeo/psalm/wiki/Configuration)\n- [Psalm avoid errors](https://github.com/vimeo/psalm/wiki/Dealing-with-code-issues)\n\nYou can also avoid errors, using a listener in your project. Check next section\n\n### Control Fixtro in your own project\n[Using events](docs/events.md)\n\n### Config File Reference\n[Config fixtro.yml Reference](docs/configFile.md)\n\n\n#####TODO:\n- allow to generate your own runner in the config\n- Tests, create a fake fixer test command, to add coverage\n- Checker of phpunit and phpspec if the project has defined a spec folder / phphunit\n\n![Fixtro Logo](docs/fixtro.gif)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarlosagudo%2Ffixtro","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkarlosagudo%2Ffixtro","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarlosagudo%2Ffixtro/lists"}