From 6f8f036b5d226d74e7a72eb073d7e58f0a1b8c19 Mon Sep 17 00:00:00 2001 From: AtlantiXpyce Date: Sat, 28 Feb 2026 12:00:28 +0100 Subject: [PATCH 1/5] =?UTF-8?q?feat:=20A=C3=B1adir=20linter=20para=20gdscr?= =?UTF-8?q?ipt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gdlintrc | 2 ++ .github/workflows/linter.yml | 26 ++++++++++++++++++++++++++ dialogos/estiloDrapy.tres | 2 +- dialogos/hoguera2.dtl | 4 +++- project.godot | 5 +++++ 5 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 .gdlintrc create mode 100644 .github/workflows/linter.yml diff --git a/.gdlintrc b/.gdlintrc new file mode 100644 index 0000000..b2d74e2 --- /dev/null +++ b/.gdlintrc @@ -0,0 +1,2 @@ +max-line-length = 120 +indent-size = 4 \ No newline at end of file diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml new file mode 100644 index 0000000..b7cfaec --- /dev/null +++ b/.github/workflows/linter.yml @@ -0,0 +1,26 @@ +name: GDScript Linter + +on: + pull_request: + branches: [ main, develop ] + push: + branches: [ main, develop ] + +jobs: + lint: + runs-on: ubuntu-latest + + steps: + - name: Checkout código + uses: actions/checkout@v4 + + - name: Instalar Python + uses: actions/setup-python@v5 + with: + python-version: '3.x' + + - name: Instalar gdtoolkit + run: pip install gdtoolkit + + - name: Ejecutar gdlint + run: gdlint . \ No newline at end of file diff --git a/dialogos/estiloDrapy.tres b/dialogos/estiloDrapy.tres index 637d7d2..45437d8 100644 --- a/dialogos/estiloDrapy.tres +++ b/dialogos/estiloDrapy.tres @@ -55,4 +55,4 @@ base_overrides = { "global_font_size": "16.0" } layers = Array[ExtResource("1_j61f0")]([SubResource("Resource_pwsi6"), SubResource("Resource_fn38d"), SubResource("Resource_gkqe6"), SubResource("Resource_02wlt"), SubResource("Resource_ouurs"), SubResource("Resource_yfcxw"), SubResource("Resource_sijlv")]) -metadata/_latest_layer = -1 +metadata/_latest_layer = 0 diff --git a/dialogos/hoguera2.dtl b/dialogos/hoguera2.dtl index 7d17d0b..ae00610 100644 --- a/dialogos/hoguera2.dtl +++ b/dialogos/hoguera2.dtl @@ -1,6 +1,8 @@ +[music path="res://addons/dialogic/Example Assets/sound-effects/typing1.wav" fade="10.0" volume="0.0"] +[sound path="res://addons/dialogic/Example Assets/sound-effects/typing1.wav" volume="1.0"] Klep: Anda, Zuri, por fin vuelves con las cerillas. Vermillion: Eso, y con quien vienes ahora Zuri? Scanf: Pues no se muy bien quien es, pero dice que viene para asegurarse de que hacemos las cosas bien por aquí. Vermillion: Bueno si, menos cháchara y más hacer la hoguera. -Tú: Un momento, vais a dejar así la hoguera? Podrías quemar el bosque entero si no sois cuidadosos. +Tú: Un momento, vais a dejar así la hoguera? Podrías quemar el bosque entero si no sois cuidadosos. Tú: Deberías de colocar unas piedras alrededor de la hoguera para que el fuego no se propague. diff --git a/project.godot b/project.godot index 78d8b9b..9ca313e 100644 --- a/project.godot +++ b/project.godot @@ -63,6 +63,11 @@ choices/reveal_by_input=false save/autosave_delay=60.0 save/encryption_on_exports_only=true text/autopauses={} +event_default_overrides={ +"Sound": { +"loop": false +} +} [editor_plugins] From 1f1d2bb55aee7218d1020c416a5d15a72fec6f83 Mon Sep 17 00:00:00 2001 From: AtlantiXpyce Date: Sat, 28 Feb 2026 12:21:54 +0100 Subject: [PATCH 2/5] =?UTF-8?q?feat:=20A=C3=B1adir=20action=20que=20evalua?= =?UTF-8?q?=20licencias=20de=20los=20addons?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/license-check.yml | 52 +++++++++++++++++++++++++++++ LICENSE => addons/dialogic/LICENSE | 0 2 files changed, 52 insertions(+) create mode 100644 .github/workflows/license-check.yml rename LICENSE => addons/dialogic/LICENSE (100%) diff --git a/.github/workflows/license-check.yml b/.github/workflows/license-check.yml new file mode 100644 index 0000000..1cb9ea0 --- /dev/null +++ b/.github/workflows/license-check.yml @@ -0,0 +1,52 @@ +name: Check Addons Allowed Licenses + +on: + push: + branches: [ main, develop ] + pull_request: + branches: [ main, develop ] + +jobs: + license-check: + runs-on: ubuntu-latest + + steps: + # 1️⃣ Checkout del repositorio + - name: Checkout repository + uses: actions/checkout@v4 + + # 2️⃣ Verificar que cada addon tenga LICENSE + - name: Check each addon has LICENSE + run: | + missing=false + for dir in addons/*; do + if [ -d "$dir" ] && [ ! -f "$dir/LICENSE" ]; then + echo "❌ Missing LICENSE in $dir" + missing=true + fi + done + if [ "$missing" = true ]; then + exit 1 + + # 3️⃣ Instalar ScanCode Toolkit + - name: Install ScanCode Toolkit + run: | + pip install scancode-toolkit + + # 4️⃣ Escanear licencias en addons + - name: Scan licenses + run: | + scancode --license --json licenses.json addons/ + + # 5️⃣ Falla si se encuentra licencia NO permitida + - name: Fail if license is not allowed + run: | + # Licencias permitidas: MIT, BSD-2-Clause, BSD-3-Clause, Apache-2.0, GPL-2.0, GPL-3.0 + ALLOWED="MIT|BSD-2-Clause|BSD-3-Clause|Apache-2.0|GPL-2.0|GPL-3.0" + + # Busca licencias detectadas que no estén en la lista de permitidas + forbidden=$(grep -Po '"key": "\K[^"]+' licenses.json | grep -vE "$ALLOWED" || true) + if [ -n "$forbidden" ]; then + echo "❌ Forbidden licenses detected: $forbidden" + exit 1 + fi \ No newline at end of file diff --git a/LICENSE b/addons/dialogic/LICENSE similarity index 100% rename from LICENSE rename to addons/dialogic/LICENSE From 91a19f91fed82f6c6cc7397817f0510f9d41724c Mon Sep 17 00:00:00 2001 From: AtlantiXpyce Date: Sat, 28 Feb 2026 12:30:02 +0100 Subject: [PATCH 3/5] fix: Arreglar fallos en las actions --- .github/workflows/license-check.yml | 26 +++++++++++++------------- gdlint.toml | 3 +++ 2 files changed, 16 insertions(+), 13 deletions(-) create mode 100644 gdlint.toml diff --git a/.github/workflows/license-check.yml b/.github/workflows/license-check.yml index 1cb9ea0..b4fcb65 100644 --- a/.github/workflows/license-check.yml +++ b/.github/workflows/license-check.yml @@ -1,4 +1,4 @@ -name: Check Addons Allowed Licenses +name: Godot Addons License & Lint Check on: push: @@ -7,46 +7,46 @@ on: branches: [ main, develop ] jobs: - license-check: + check: runs-on: ubuntu-latest steps: - # 1️⃣ Checkout del repositorio - name: Checkout repository uses: actions/checkout@v4 - # 2️⃣ Verificar que cada addon tenga LICENSE - name: Check each addon has LICENSE run: | missing=false for dir in addons/*; do if [ -d "$dir" ] && [ ! -f "$dir/LICENSE" ]; then - echo "❌ Missing LICENSE in $dir" + echo "Missing LICENSE in $dir" missing=true fi done if [ "$missing" = true ]; then exit 1 + fi - # 3️⃣ Instalar ScanCode Toolkit - name: Install ScanCode Toolkit run: | + pip install --upgrade pip pip install scancode-toolkit - # 4️⃣ Escanear licencias en addons - name: Scan licenses run: | scancode --license --json licenses.json addons/ - # 5️⃣ Falla si se encuentra licencia NO permitida - name: Fail if license is not allowed run: | - # Licencias permitidas: MIT, BSD-2-Clause, BSD-3-Clause, Apache-2.0, GPL-2.0, GPL-3.0 ALLOWED="MIT|BSD-2-Clause|BSD-3-Clause|Apache-2.0|GPL-2.0|GPL-3.0" - - # Busca licencias detectadas que no estén en la lista de permitidas forbidden=$(grep -Po '"key": "\K[^"]+' licenses.json | grep -vE "$ALLOWED" || true) if [ -n "$forbidden" ]; then - echo "❌ Forbidden licenses detected: $forbidden" + echo "Forbidden licenses detected: $forbidden" exit 1 - fi \ No newline at end of file + fi + + - name: Run gdlint + run: | + pip install gdtoolkit + # Si no tienes gdlint.toml, gdlint usa defaults + gdlint . \ No newline at end of file diff --git a/gdlint.toml b/gdlint.toml new file mode 100644 index 0000000..2d9a994 --- /dev/null +++ b/gdlint.toml @@ -0,0 +1,3 @@ +[style] +max_line_length = 120 +ignore = [] \ No newline at end of file From 7a21d79455ca999f7696df9e6ba8823214deed99 Mon Sep 17 00:00:00 2001 From: AtlantiXpyce Date: Sat, 28 Feb 2026 12:42:40 +0100 Subject: [PATCH 4/5] fix: Arreglar configuracion erronea --- gdlint.toml | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 gdlint.toml diff --git a/gdlint.toml b/gdlint.toml deleted file mode 100644 index 2d9a994..0000000 --- a/gdlint.toml +++ /dev/null @@ -1,3 +0,0 @@ -[style] -max_line_length = 120 -ignore = [] \ No newline at end of file From 03a89e3c332a23c99b2e7e1eec3d9bd4638db08f Mon Sep 17 00:00:00 2001 From: AtlantiXpyce Date: Sat, 28 Feb 2026 12:51:44 +0100 Subject: [PATCH 5/5] Configurar actions para que funcionen correctamente --- .github/workflows/license-check.yml | 39 +++++++++++++++++++++++------ .github/workflows/linter.yml | 21 +++++++++++++--- 2 files changed, 50 insertions(+), 10 deletions(-) diff --git a/.github/workflows/license-check.yml b/.github/workflows/license-check.yml index b4fcb65..e16dc31 100644 --- a/.github/workflows/license-check.yml +++ b/.github/workflows/license-check.yml @@ -14,13 +14,29 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.11' # Versión estable + + - name: Cache pip + uses: actions/cache@v4 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-license-${{ hashFiles('**/requirements.txt') }} + restore-keys: | + ${{ runner.os }}-pip-license- + - name: Check each addon has LICENSE run: | missing=false for dir in addons/*; do - if [ -d "$dir" ] && [ ! -f "$dir/LICENSE" ]; then - echo "Missing LICENSE in $dir" - missing=true + if [ -d "$dir" ]; then + # Busca cualquier archivo que empiece por "LICENSE" (insensible a mayúsculas/minúsculas) + if ! find "$dir" -maxdepth 1 -iname "license*" -print -quit | grep -q .; then + echo "Missing LICENSE file in $dir" + missing=true + fi fi done if [ "$missing" = true ]; then @@ -39,14 +55,23 @@ jobs: - name: Fail if license is not allowed run: | ALLOWED="MIT|BSD-2-Clause|BSD-3-Clause|Apache-2.0|GPL-2.0|GPL-3.0" - forbidden=$(grep -Po '"key": "\K[^"]+' licenses.json | grep -vE "$ALLOWED" || true) + # Usa jq para extraer todas las claves de licencia (más robusto) + forbidden=$(jq -r '.files[].licenses[].key' licenses.json 2>/dev/null | grep -vE "$ALLOWED" | sort -u || true) if [ -n "$forbidden" ]; then - echo "Forbidden licenses detected: $forbidden" + echo "Forbidden licenses detected:" + echo "$forbidden" exit 1 fi + - name: Install gdtoolkit (lint) + run: | + pip install gdtoolkit==4.4.0 + + - name: Debug config file (optional) + run: | + echo "=== .gdlintrc content (if exists) ===" + cat .gdlintrc || echo "No .gdlintrc file" + - name: Run gdlint run: | - pip install gdtoolkit - # Si no tienes gdlint.toml, gdlint usa defaults gdlint . \ No newline at end of file diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index b7cfaec..9138d69 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -17,10 +17,25 @@ jobs: - name: Instalar Python uses: actions/setup-python@v5 with: - python-version: '3.x' + python-version: '3.11' # Versión estable - - name: Instalar gdtoolkit - run: pip install gdtoolkit + - name: Cache pip + uses: actions/cache@v4 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-linter-${{ hashFiles('**/requirements.txt') }} + restore-keys: | + ${{ runner.os }}-pip-linter- + + - name: Instalar gdtoolkit (versión fija) + run: pip install gdtoolkit==4.4.0 + + - name: Depurar configuración (opcional) + run: | + echo "=== Archivos de configuración ===" + ls -la .gdlintrc* pyproject.toml 2>/dev/null || echo "No config files" + echo "=== Contenido de .gdlintrc ===" + cat .gdlintrc 2>/dev/null || echo "Archivo .gdlintrc no encontrado" - name: Ejecutar gdlint run: gdlint . \ No newline at end of file