mirror of
https://github.com/lvgl/lvgl.git
synced 2026-08-17 18:22:42 +08:00
Arduino Lint / lint (push) Waiting to run
Build Examples with C++ Compiler / build-examples (push) Waiting to run
MicroPython CI / Build esp32 port (push) Waiting to run
MicroPython CI / Build rp2 port (push) Waiting to run
MicroPython CI / Build stm32 port (push) Waiting to run
MicroPython CI / Build unix port (push) Waiting to run
C/C++ CI / Build OPTIONS_16BIT - Ubuntu (push) Waiting to run
C/C++ CI / Build OPTIONS_24BIT - Ubuntu (push) Waiting to run
C/C++ CI / Build OPTIONS_FULL_32BIT - Ubuntu (push) Waiting to run
C/C++ CI / Build OPTIONS_NORMAL_8BIT - Ubuntu (push) Waiting to run
C/C++ CI / Build OPTIONS_SDL - Ubuntu (push) Waiting to run
C/C++ CI / Build OPTIONS_16BIT - cl - Windows (push) Waiting to run
C/C++ CI / Build OPTIONS_16BIT - gcc - Windows (push) Waiting to run
C/C++ CI / Build OPTIONS_24BIT - cl - Windows (push) Waiting to run
C/C++ CI / Build OPTIONS_24BIT - gcc - Windows (push) Waiting to run
C/C++ CI / Build OPTIONS_FULL_32BIT - cl - Windows (push) Waiting to run
C/C++ CI / Build OPTIONS_FULL_32BIT - gcc - Windows (push) Waiting to run
C/C++ CI / Build ESP IDF ESP32S3 (push) Waiting to run
C/C++ CI / Run tests with 32bit build (push) Waiting to run
C/C++ CI / Run tests with 64bit build (push) Waiting to run
BOM Check / bom-check (push) Waiting to run
Verify GDB constants are up-to-date / verify-gdb-consts (push) Waiting to run
Verify the widget property name / verify-property-name (push) Waiting to run
Verify code formatting / verify-formatting (push) Waiting to run
Compare file templates with file names / template-check (push) Waiting to run
Code Generation / Code Generation (push) Waiting to run
Build Docs / build-and-deploy (push) Waiting to run
Build .deb packages / build (push) Waiting to run
Validate pkg-config and CMake config / cmake (linux) (push) Waiting to run
Validate pkg-config and CMake config / pkgconfig (linux) (push) Waiting to run
Validate pkg-config and CMake config / cmake (linux-3d) (push) Waiting to run
Validate pkg-config and CMake config / pkgconfig (linux-3d) (push) Waiting to run
Test API JSON generator / Test API JSON (push) Waiting to run
Install LVGL using CMake / build-examples (private) (push) Waiting to run
Install LVGL using CMake / build-examples (public) (push) Waiting to run
Check Makefile / Build using Makefile (push) Canceled after 0s
Check Makefile for UEFI / Build using Makefile for UEFI (push) Canceled after 0s
Emulated Performance Test / ARM Emulated Benchmark - Script Check (scripts/perf/tests/benchmark_results_comment/test.sh) (push) Canceled after 0s
Emulated Performance Test / ARM Emulated Benchmark - Script Check (scripts/perf/tests/filter_docker_logs/test.sh) (push) Canceled after 0s
Emulated Performance Test / ARM Emulated Benchmark - Script Check (scripts/perf/tests/serialize_results/test.sh) (push) Canceled after 0s
Hardware Performance Test / Hardware Performance Benchmark (push) Canceled after 0s
Hardware Performance Test / HW Benchmark - Save PR Number (push) Canceled after 0s
Performance Tests CI / Perf Tests OPTIONS_TEST_PERF_32B - Ubuntu (push) Canceled after 0s
Performance Tests CI / Perf Tests OPTIONS_TEST_PERF_64B - Ubuntu (push) Canceled after 0s
Port repo release update / run-release-branch-updater (push) Canceled after 0s
Static Checks / Static Checks (push) Canceled after 0s
Verify Font License / verify-font-license (push) Canceled after 0s
Verify Kconfig / verify-kconfig (push) Canceled after 0s
Emulated Performance Test / ARM Emulated Benchmark 32b - lv_conf_perf32b (push) Canceled after 0s
Emulated Performance Test / ARM Emulated Benchmark 64b - lv_conf_perf64b (push) Canceled after 0s
Emulated Performance Test / ARM Emulated Benchmark - Save PR Number (push) Canceled after 0s
71 lines
2.0 KiB
Python
Executable File
71 lines
2.0 KiB
Python
Executable File
#!/usr/bin/env python3
|
|
|
|
import sys
|
|
import os
|
|
from pathlib import Path
|
|
|
|
try:
|
|
import kconfiglib
|
|
except ImportError:
|
|
print("Need kconfiglib package, do `pip3 install kconfiglib`")
|
|
sys.exit(1)
|
|
|
|
SCRIPT_PATH = Path(__file__).resolve()
|
|
LVGL_DIR = SCRIPT_PATH.parent.parent
|
|
KCONFIG_PATH = os.path.join(LVGL_DIR, "Kconfig")
|
|
|
|
|
|
def verify_kconfig(kconfig_file):
|
|
if not "LVGL_DIR" in os.environ:
|
|
os.environ["LVGL_DIR"] = str(LVGL_DIR)
|
|
|
|
kconf = kconfiglib.Kconfig(kconfig_file)
|
|
|
|
if kconf.warnings:
|
|
print("Warnings found:")
|
|
for warning in kconf.warnings:
|
|
print(warning)
|
|
sys.exit(1)
|
|
else:
|
|
print("No warnings found.")
|
|
|
|
|
|
def check_kconfig_spaces(file_path):
|
|
"""Check for space-only indentation in a Kconfig file.
|
|
|
|
Tab+spaces is allowed (conventional for help text).
|
|
Pure-space indentation will break kernel/Buildroot Kconfig parsers.
|
|
"""
|
|
try:
|
|
with open(file_path, "r", encoding="utf-8") as f:
|
|
lines = f.readlines()
|
|
violations = []
|
|
for line_num, line in enumerate(lines, 1):
|
|
stripped = line.lstrip()
|
|
if not stripped:
|
|
continue
|
|
indent = line[: len(line) - len(stripped)]
|
|
if indent and not indent.startswith("\t") and " " in indent:
|
|
violations.append((line_num, indent))
|
|
if violations:
|
|
print(f"Space-only indentation found in {file_path}:")
|
|
for line_num, indent in violations:
|
|
print(f" Line {line_num}: {indent.count(' ')} leading spaces")
|
|
except Exception as e:
|
|
print(f"Error processing {file_path}: {e}")
|
|
|
|
|
|
def recurse(path):
|
|
entries = os.listdir(path)
|
|
for entry in entries:
|
|
abs = os.path.join(path, entry)
|
|
if os.path.isdir(abs):
|
|
recurse(abs)
|
|
if entry.startswith("Kconfig"):
|
|
check_kconfig_spaces(abs)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
verify_kconfig(KCONFIG_PATH)
|
|
recurse(LVGL_DIR)
|