diff --git a/README.ar.md b/README.ar.md index 65facda..72ce083 100644 --- a/README.ar.md +++ b/README.ar.md @@ -2,11 +2,11 @@ # منشئ ثريجيل -| | | -| ----- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| CI/CD | [![CI - Test](https://github.com/vanHeemstraSystems/threagile-builder/actions/workflows/test.yml/badge.svg)](https://github.com/vanHeemstraSystems/threagile-builder/actions/workflows/test.yml)[![CD - Build](https://github.com/vanHeemstraSystems/threagile-builder/actions/workflows/build.yml/badge.svg)](https://github.com/vanHeemstraSystems/threagile-builder/actions/workflows/build.yml) | -| طَرد | [![PyPI - Version](https://img.shields.io/pypi/v/threagile-builder.svg?logo=pypi&label=PyPI&logoColor=gold)](https://pypi.org/project/threagile-builder/)[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/threagile-builder.svg?logo=python&label=Python&logoColor=gold)](https://pypi.org/project/threagile-builder/) | -| ميتا | [![Hatch project](https://img.shields.io/badge/%F0%9F%A5%9A-Hatch-4051b5.svg)](https://github.com/pypa/hatch)[![code style - black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)[![types - Mypy](https://img.shields.io/badge/types-Mypy-blue.svg)](https://github.com/ambv/black)[![License - MIT](https://img.shields.io/badge/license-MIT-9400d3.svg)](https://spdx.org/licenses/)[![GitHub Sponsors](https://img.shields.io/github/sponsors/vanHeemstraSystems?logo=GitHub%20Sponsors&style=social)](https://github.com/sponsors/vanHeemstraSystems) | +| | | +| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| سي آي/سي دي | [![CI - Test](https://github.com/vanHeemstraSystems/threagile-builder/actions/workflows/test.yml/badge.svg)](https://github.com/vanHeemstraSystems/threagile-builder/actions/workflows/test.yml)[![CD - Build](https://github.com/vanHeemstraSystems/threagile-builder/actions/workflows/build.yml/badge.svg)](https://github.com/vanHeemstraSystems/threagile-builder/actions/workflows/build.yml) | +| طَرد | [![PyPI - Version](https://img.shields.io/pypi/v/threagile-builder.svg?logo=pypi&label=PyPI&logoColor=gold)](https://pypi.org/project/threagile-builder/)[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/threagile-builder.svg?logo=python&label=Python&logoColor=gold)](https://pypi.org/project/threagile-builder/) | +| ميتا | [![Hatch project](https://img.shields.io/badge/%F0%9F%A5%9A-Hatch-4051b5.svg)](https://github.com/pypa/hatch)[![code style - black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)[![types - Mypy](https://img.shields.io/badge/types-Mypy-blue.svg)](https://github.com/ambv/black)[![License - MIT](https://img.shields.io/badge/license-MIT-9400d3.svg)](https://spdx.org/licenses/)[![GitHub Sponsors](https://img.shields.io/github/sponsors/vanHeemstraSystems?logo=GitHub%20Sponsors&style=social)](https://github.com/sponsors/vanHeemstraSystems) | * * * @@ -20,7 +20,7 @@ الحصول على التعليمات البرمجية الخاصة بك وتشغيلها على النظام الخاص بك. -**Note**: تأكد من الوفاء[متطلبات](./200/README.md). +**ملحوظة**: تأكد من الوفاء[متطلبات](./200/README.md). 1. عملية التثبيت: ```bash @@ -84,6 +84,27 @@ $ pytest tests/ ``` + ملاحظة: PHPStan هي أداة تحليل ثابتة تكتشف الأخطاء في كود PHP الخاص بك دون تشغيلها. لتشغيل PHPStan في حاوية Docker: + + على نظام التشغيل Unix/Linux/macOS: + + ```bash + $ cd threagile-builder + $ docker run --rm -v $(pwd):/app ghcr.io/phpstan/phpstan analyse /app/src --level 8 -c phpstan.neon + ``` + + على نظام التشغيل Windows: + + ```bash + $ cd threagile-builder + $ docker run --rm -v %CD%:/app ghcr.io/phpstan/phpstan analyse /app/src --level 8 -c phpstan.neon + ``` + + يمكنك تخصيص التحليل عن طريق: + + - تحديد مستويات القاعدة (0-9): إضافة`--level 8` + - باستخدام ملف التكوين: أضف`-c phpstan.neon` + # وثائق واجهة برمجة التطبيقات انتقل إلى`http://127.0.0.1:5000/docs`في متصفح الويب الخاص بك، أو قم بتنزيل openapi.json من`http://127.0.0.1:5000/openapi.json`. @@ -97,7 +118,7 @@ **جدول المحتويات** - [تثبيت](#installation) -- [مصدر الإصدار](#version-source) +- [مصدر النسخة](#version-source) - [البيئات](#environments) - [يبني](#build) - [رخصة](#license) @@ -108,7 +129,7 @@ pip install threagile-builder ``` -## مصدر الإصدار +## مصدر النسخة - ال[Hatch-vcs](https://github.com/ofek/hatch-vcs)يحدد البرنامج المساعد لمصدر الإصدار إصدار المشروع باستخدام علامات Git @@ -119,11 +140,11 @@ pip install threagile-builder ## يبني -- جميع أهداف البناء تستخدم[Hatch-vcs](https://github.com/ofek/hatch-vcs)بناء البرنامج المساعد هوك لشحن أ`_version.py`ملف بحيث يمكن استخدام الإصدار في وقت التشغيل +- تستخدم جميع أهداف البناء[Hatch-vcs](https://github.com/ofek/hatch-vcs)بناء البرنامج المساعد هوك لشحن أ`_version.py`ملف بحيث يمكن استخدام الإصدار في وقت التشغيل - تستخدم العجلات[Hatch-mypyc](https://github.com/ofek/hatch-mypyc)أنشئ ملحقًا ربطًا لتجميع جميع التعليمات البرمجية أولاً[Mypyc](https://github.com/mypyc/mypyc) - ال[يبني](.github/workflows/build.yml)يوضح سير عمل GitHub كيفية: - يستخدم[cibuildwheel](https://github.com/pypa/cibuildwheel)لتوزيع العجلات الثنائية لكل منصة - - استخدم[app](https://hatch.pypa.io/latest/plugins/builder/app/)بناء الهدف لبناء توزيعات مستقلة لكل منصة + - استخدم[برنامج](https://hatch.pypa.io/latest/plugins/builder/app/)بناء الهدف لبناء توزيعات مستقلة لكل منصة ## رخصة diff --git a/README.de.md b/README.de.md index af7cac2..1ba0e6b 100644 --- a/README.de.md +++ b/README.de.md @@ -84,6 +84,27 @@ Bringen Sie Ihren Code auf Ihrem eigenen System zum Laufen. $ pytest tests/ ``` + Hinweis: PHPStan ist ein statisches Analysetool, das Fehler in Ihrem PHP-Code findet, ohne ihn auszuführen. So führen Sie PHPStan in einem Docker-Container aus: + + Unter Unix/Linux/macOS: + + ```bash + $ cd threagile-builder + $ docker run --rm -v $(pwd):/app ghcr.io/phpstan/phpstan analyse /app/src --level 8 -c phpstan.neon + ``` + + Unter Windows: + + ```bash + $ cd threagile-builder + $ docker run --rm -v %CD%:/app ghcr.io/phpstan/phpstan analyse /app/src --level 8 -c phpstan.neon + ``` + + Sie können die Analyse anpassen, indem Sie: + + - Regelebenen einstellen (0-9): Add`--level 8` + - Verwenden einer Konfigurationsdatei: Hinzufügen`-c phpstan.neon` + # API-Dokumentation Navigieren Sie zu`http://127.0.0.1:5000/docs`in Ihrem Webbrowser oder laden Sie openapi.json herunter von`http://127.0.0.1:5000/openapi.json`. @@ -137,7 +158,7 @@ Sehen[README.md](./100/README.md) Sehen[README.md](./200/README.md) -## 300 – Erstellen unserer Anwendung +## 300 - Building Our Application Sehen[README.md](./300/README.md) diff --git a/README.es.md b/README.es.md index ebe29e5..fbdd0e9 100644 --- a/README.es.md +++ b/README.es.md @@ -10,7 +10,7 @@ constructor-threagil * * * -> A[basado en bloques](https://developers.google.com/blockly)aplicación web sin código para crear[amenazante](https://threagile.io)archivos YAML +> A[basado en bloques](https://developers.google.com/blockly)aplicación web sin código para crear[amenazante](https://threagile.io)Archivos YAML - [Glosario](./GLOSSARY.md) - [Referencias](./REFERENCES.md) @@ -18,7 +18,7 @@ constructor-threagil **Resumen ejecutivo** -Poner en funcionamiento su código en su propio sistema. +Cómo poner en marcha su código en su propio sistema. **Nota**: Asegúrese de cumplir con los[requisitos](./200/README.md). @@ -84,6 +84,27 @@ Poner en funcionamiento su código en su propio sistema. $ pytest tests/ ``` + Nota: PHPStan es una herramienta de análisis estático que encuentra errores en su código PHP sin ejecutarlo. Para ejecutar PHPStan en un contenedor Docker: + + En Unix/Linux/macOS: + + ```bash + $ cd threagile-builder + $ docker run --rm -v $(pwd):/app ghcr.io/phpstan/phpstan analyse /app/src --level 8 -c phpstan.neon + ``` + + En Windows: + + ```bash + $ cd threagile-builder + $ docker run --rm -v %CD%:/app ghcr.io/phpstan/phpstan analyse /app/src --level 8 -c phpstan.neon + ``` + + Puede personalizar el análisis mediante: + + - Configuración de niveles de regla (0-9): Agregar`--level 8` + - Usando un archivo de configuración: Agregar`-c phpstan.neon` + # Documentación API Navegar a`http://127.0.0.1:5000/docs`en su navegador web, o descargue openapi.json desde`http://127.0.0.1:5000/openapi.json`. @@ -97,7 +118,7 @@ Dejemos que una herramienta como Prometeo raspe`http://127.0.0.1:9464/metrics`. **Tabla de contenido** - [Instalación](#installation) -- [Fuente de la versión](#version-source) +- [Version source](#version-source) - [Ambientes](#environments) - [Construir](#build) - [Licencia](#license) @@ -115,7 +136,7 @@ pip install threagile-builder ## Ambientes - Definido claramente de forma independiente[`hatch.toml`](https://hatch.pypa.io/latest/intro/#configuration) -- El`test`la matriz utiliza el[contenedores-escotilla](https://github.com/ofek/hatch-containers)complemento para ejecutar cada entorno dentro de contenedores Docker; El uso se puede ver en el[prueba](.github/workflows/test.yml)flujo de trabajo de GitHub +- El`test`La matriz utiliza el[contenedores-escotilla](https://github.com/ofek/hatch-containers)complemento para ejecutar cada entorno dentro de contenedores Docker; El uso se puede ver en el[prueba](.github/workflows/test.yml)flujo de trabajo de GitHub ## Construir diff --git a/README.fr.md b/README.fr.md index 6d685df..59a5ee5 100644 --- a/README.fr.md +++ b/README.fr.md @@ -84,6 +84,27 @@ Faire en sorte que votre code soit opérationnel sur votre propre système. $ pytest tests/ ``` + Remarque : PHPStan est un outil d'analyse statique qui trouve les bugs dans votre code PHP sans l'exécuter. Pour exécuter PHPStan dans un conteneur Docker : + + Sous Unix/Linux/macOS : + + ```bash + $ cd threagile-builder + $ docker run --rm -v $(pwd):/app ghcr.io/phpstan/phpstan analyse /app/src --level 8 -c phpstan.neon + ``` + + Sous Windows : + + ```bash + $ cd threagile-builder + $ docker run --rm -v %CD%:/app ghcr.io/phpstan/phpstan analyse /app/src --level 8 -c phpstan.neon + ``` + + Vous pouvez personnaliser l'analyse en : + + - Définition des niveaux de règle (0-9) : Ajouter`--level 8` + - Utilisation d'un fichier de configuration : Ajouter`-c phpstan.neon` + # Documentation API Accédez à`http://127.0.0.1:5000/docs`dans votre navigateur Web, ou téléchargez le fichier openapi.json depuis`http://127.0.0.1:5000/openapi.json`. @@ -129,7 +150,7 @@ pip install threagile-builder `threagile-builder`est distribué selon les termes du[AVEC](https://spdx.org/licenses/MIT.html)licence. -## 100 - Présentation +## 100 - Introduction Voir[README.md](./100/README.md) @@ -137,7 +158,7 @@ Voir[README.md](./100/README.md) Voir[README.md](./200/README.md) -## 300 - Créer notre application +## 300 - Construire notre application Voir[README.md](./300/README.md) diff --git a/README.hi.md b/README.hi.md index 6a5855d..dbdfce2 100644 --- a/README.hi.md +++ b/README.hi.md @@ -84,6 +84,27 @@ thregile-बिल्डर $ pytest tests/ ``` + ध्यान दें: PHPStan एक स्थिर विश्लेषण उपकरण है जो आपके PHP कोड को चलाए बिना बग ढूंढता है। डॉकर कंटेनर में PHPStan चलाने के लिए: + + यूनिक्स/लिनक्स/मैकओएस पर: + + ```bash + $ cd threagile-builder + $ docker run --rm -v $(pwd):/app ghcr.io/phpstan/phpstan analyse /app/src --level 8 -c phpstan.neon + ``` + + विंडोज़ पर: + + ```bash + $ cd threagile-builder + $ docker run --rm -v %CD%:/app ghcr.io/phpstan/phpstan analyse /app/src --level 8 -c phpstan.neon + ``` + + आप विश्लेषण को इसके द्वारा अनुकूलित कर सकते हैं: + + - नियम स्तर सेट करना (0-9): जोड़ें`--level 8` + - कॉन्फ़िग फ़ाइल का उपयोग करना: जोड़ें`-c phpstan.neon` + # एपीआई दस्तावेज़ीकरण पर नेविगेट करें`http://127.0.0.1:5000/docs`अपने वेब ब्राउज़र में, या openapi.json डाउनलोड करें`http://127.0.0.1:5000/openapi.json`. @@ -92,7 +113,7 @@ thregile-बिल्डर प्रोमेथियस जैसे उपकरण को परिमार्जन करने दें`http://127.0.0.1:9464/metrics`. -**_नया_** +**_ NEW _** **विषयसूची** diff --git a/README.md b/README.md index 7a3bbf4..2ef793c 100644 --- a/README.md +++ b/README.md @@ -80,6 +80,24 @@ Getting your code up and running on your own system. $ pytest tests/ ``` + Note: PHPStan is a static analysis tool that finds bugs in your PHP code without running it. To run PHPStan in a Docker container: + + On Unix/Linux/macOS: + ```bash + $ cd threagile-builder + $ docker run --rm -v $(pwd):/app ghcr.io/phpstan/phpstan analyse /app/src --level 8 -c phpstan.neon + ``` + + On Windows: + ```bash + $ cd threagile-builder + $ docker run --rm -v %CD%:/app ghcr.io/phpstan/phpstan analyse /app/src --level 8 -c phpstan.neon + ``` + + You can customize the analysis by: + - Setting rule levels (0-9): Add `--level 8` + - Using a config file: Add `-c phpstan.neon` + # API Documentation Navigate to `http://127.0.0.1:5000/docs` in your web browser, or download the openapi.json from `http://127.0.0.1:5000/openapi.json`. diff --git a/README.nl.md b/README.nl.md index 0eb9f83..406af58 100644 --- a/README.nl.md +++ b/README.nl.md @@ -84,7 +84,28 @@ Uw code op uw eigen systeem operationeel krijgen. $ pytest tests/ ``` -# API Documentation + Opmerking: PHPStan is een statische analysetool die bugs in uw PHP-code vindt zonder deze uit te voeren. Om PHPStan in een Docker-container uit te voeren: + + Op Unix/Linux/macOS: + + ```bash + $ cd threagile-builder + $ docker run --rm -v $(pwd):/app ghcr.io/phpstan/phpstan analyse /app/src --level 8 -c phpstan.neon + ``` + + Op Windows: + + ```bash + $ cd threagile-builder + $ docker run --rm -v %CD%:/app ghcr.io/phpstan/phpstan analyse /app/src --level 8 -c phpstan.neon + ``` + + U kunt de analyse aanpassen door: + + - Regelniveaus instellen (0-9): Toevoegen`--level 8` + - Een configuratiebestand gebruiken: Add`-c phpstan.neon` + +# API-documentatie Navigeer naar`http://127.0.0.1:5000/docs`in uw webbrowser, of download de openapi.json van`http://127.0.0.1:5000/openapi.json`. diff --git a/README.zh-CN.md b/README.zh-CN.md index 9b5d85e..6026dc7 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -84,6 +84,27 @@ $ pytest tests/ ``` + 注意:PHPStan 是一个静态分析工具,无需运行 PHP 代码即可发现其中的错误。要在 Docker 容器中运行 PHPStan: + + 在 Unix/Linux/macOS 上: + + ```bash + $ cd threagile-builder + $ docker run --rm -v $(pwd):/app ghcr.io/phpstan/phpstan analyse /app/src --level 8 -c phpstan.neon + ``` + + 在 Windows 上: + + ```bash + $ cd threagile-builder + $ docker run --rm -v %CD%:/app ghcr.io/phpstan/phpstan analyse /app/src --level 8 -c phpstan.neon + ``` + + 您可以通过以下方式自定义分析: + + - 设置规则级别(0-9):添加`--level 8` + - 使用配置文件:添加`-c phpstan.neon` + # API文档 导航至`http://127.0.0.1:5000/docs`在您的网络浏览器中,或从以下位置下载 openapi.json`http://127.0.0.1:5000/openapi.json`. @@ -110,12 +131,12 @@ pip install threagile-builder ## 版本来源 -- 这[孵化VCS](https://github.com/ofek/hatch-vcs) version source plugin determines the project version using Git tags +- 这[孵化VCS](https://github.com/ofek/hatch-vcs)版本源插件使用 Git 标签确定项目版本 ## 环境 -- 整齐地定义在一个独立的[`hatch.toml`](https://hatch.pypa.io/latest/intro/#configuration) -- 这`test`矩阵使用[孵化集装箱](https://github.com/ofek/hatch-containers)用于运行 Docker 容器内每个环境的插件;用法可以在[测试](.github/workflows/test.yml) GitHub workflow +- 整齐地定义在独立的[`hatch.toml`](https://hatch.pypa.io/latest/intro/#configuration) +- 这`test`矩阵使用[孵化集装箱](https://github.com/ofek/hatch-containers)用于运行 Docker 容器内每个环境的插件;用法可以在[测试](.github/workflows/test.yml)GitHub 工作流程 ## 建造 diff --git a/README.zh-TW.md b/README.zh-TW.md index 44401f3..518b02c 100644 --- a/README.zh-TW.md +++ b/README.zh-TW.md @@ -14,7 +14,7 @@ - [詞彙表](./GLOSSARY.md) - [參考](./REFERENCES.md) -- [Documentation](./DOCUMENTATION.md) +- [文件](./DOCUMENTATION.md) **執行摘要** @@ -84,6 +84,27 @@ $ pytest tests/ ``` + 注意:PHPStan 是一個靜態分析工具,無需執行 PHP 程式碼即可發現其中的錯誤。要在 Docker 容器中運行 PHPStan: + + 在 Unix/Linux/macOS 上: + + ```bash + $ cd threagile-builder + $ docker run --rm -v $(pwd):/app ghcr.io/phpstan/phpstan analyse /app/src --level 8 -c phpstan.neon + ``` + + 在 Windows 上: + + ```bash + $ cd threagile-builder + $ docker run --rm -v %CD%:/app ghcr.io/phpstan/phpstan analyse /app/src --level 8 -c phpstan.neon + ``` + + 您可以透過以下方式自訂分析: + + - 設定規則等級(0-9):新增`--level 8` + - 使用設定檔:新增`-c phpstan.neon` + # API文件 導航至`http://127.0.0.1:5000/docs`在您的網頁瀏覽器中,或從下列位置下載 openapi.json`http://127.0.0.1:5000/openapi.json`. @@ -114,14 +135,14 @@ pip install threagile-builder ## 環境 -- 整齊地定義在一個獨立的[`hatch.toml`](https://hatch.pypa.io/latest/intro/#configuration) +- 整齊地定義在獨立的[`hatch.toml`](https://hatch.pypa.io/latest/intro/#configuration) - 這`test`矩陣使用[孵化貨櫃](https://github.com/ofek/hatch-containers)用於運行 Docker 容器內每個環境的插件;用法可以在[測試](.github/workflows/test.yml)GitHub 工作流程 ## 建造 - 所有建置目標都使用[孵化VCS](https://github.com/ofek/hatch-vcs)建立鉤子插件來發送`_version.py`文件,以便可以在運行時使用該版本 -- 輪子使用[孵化 mypyc](https://github.com/ofek/hatch-mypyc) build hook plugin to first compile all code with [Mypyc](https://github.com/mypyc/mypyc) -- 這[建造](.github/workflows/build.yml)GitHub 工作流程展示如何: +- 輪子使用[孵化 mypyc](https://github.com/ofek/hatch-mypyc)建立鉤子插件以首先編譯所有程式碼[Mypyc](https://github.com/mypyc/mypyc) +- The [建造](.github/workflows/build.yml)GitHub 工作流程展示如何: - 使用[cibuildwheel](https://github.com/pypa/cibuildwheel)為每個平台分發二進制輪子 - 使用[應用程式](https://hatch.pypa.io/latest/plugins/builder/app/)建構目標為每個平台建立獨立發行版 diff --git a/REFERENCES.md b/REFERENCES.md index 000d323..3bceb75 100644 --- a/REFERENCES.md +++ b/REFERENCES.md @@ -10,3 +10,4 @@ - [Python uses execjs to execute JS code containing objects such as document and window, and uses JSDOM to solve the problem](https://www.cnblogs.com/huchong/p/11044238.html) - [BlockMirror](https://github.com/blockpy-edu/BlockMirror) - [FlowBite Datatables](https://flowbite.com/docs/plugins/datatables/) +- [CodeRabbit](https://coderabbit.org) diff --git a/threagile-builder/phpstan.neon b/threagile-builder/phpstan.neon new file mode 100644 index 0000000..8b437e3 --- /dev/null +++ b/threagile-builder/phpstan.neon @@ -0,0 +1,4 @@ +parameters: + paths: + - src + - tests