From f4a29c4830b0eacfe33313a83d6a360c54a97bfb Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Mon, 2 Feb 2026 14:13:05 +0800 Subject: [PATCH] Add dev:lint-config to replace sort-config command --- config/pkg/lib/attr.yml | 6 +++--- config/pkg/lib/brotli.yml | 14 +++++++------- config/pkg/lib/bzip2.yml | 10 +++++----- config/pkg/lib/fastlz.yml | 12 ++++++------ config/pkg/lib/gmp.yml | 12 ++++++------ config/pkg/lib/openssl.yml | 17 +++++++++-------- config/pkg/lib/zlib.yml | 14 +++++++------- src/StaticPHP/ConsoleApplication.php | 4 ++-- 8 files changed, 45 insertions(+), 44 deletions(-) diff --git a/config/pkg/lib/attr.yml b/config/pkg/lib/attr.yml index 4e785851..289bcd67 100644 --- a/config/pkg/lib/attr.yml +++ b/config/pkg/lib/attr.yml @@ -1,7 +1,5 @@ attr: type: library - static-libs@unix: - - libattr.a artifact: source: type: url @@ -10,5 +8,7 @@ attr: type: url url: 'https://mirror.souseiseki.middlendian.com/nongnu/attr/attr-2.5.2.tar.gz' metadata: - license-files: ['doc/COPYING.LGPL'] + license-files: [doc/COPYING.LGPL] license: LGPL-2.1-or-later + static-libs@unix: + - libattr.a diff --git a/config/pkg/lib/brotli.yml b/config/pkg/lib/brotli.yml index 342359aa..524f9ddc 100644 --- a/config/pkg/lib/brotli.yml +++ b/config/pkg/lib/brotli.yml @@ -1,11 +1,5 @@ brotli: type: library - pkg-configs: - - libbrotlicommon - - libbrotlidec - - libbrotlienc - headers: - - brotli artifact: source: type: ghtagtar @@ -13,5 +7,11 @@ brotli: match: 'v1\.\d.*' binary: hosted metadata: - license-files: ['LICENSE'] + license-files: [LICENSE] license: MIT + headers: + - brotli + pkg-configs: + - libbrotlicommon + - libbrotlidec + - libbrotlienc diff --git a/config/pkg/lib/bzip2.yml b/config/pkg/lib/bzip2.yml index 6f7b483b..132a24ff 100644 --- a/config/pkg/lib/bzip2.yml +++ b/config/pkg/lib/bzip2.yml @@ -1,9 +1,5 @@ bzip2: type: library - static-libs@unix: - - libbz2.a - headers: - - bzlib.h artifact: source: type: url @@ -15,4 +11,8 @@ bzip2: binary: hosted metadata: license-files: ['{registry_root}/src/globals/licenses/bzip2.txt'] - license: bzip2-1.0.6 \ No newline at end of file + license: bzip2-1.0.6 + headers: + - bzlib.h + static-libs@unix: + - libbz2.a diff --git a/config/pkg/lib/fastlz.yml b/config/pkg/lib/fastlz.yml index 32f26d8a..e3296831 100644 --- a/config/pkg/lib/fastlz.yml +++ b/config/pkg/lib/fastlz.yml @@ -1,14 +1,14 @@ fastlz: type: library - static-libs@unix: - - libfastlz.a - headers: - - fastlz.h artifact: source: type: git url: 'https://github.com/ariya/FastLZ.git' rev: master metadata: - license-files: ['LICENSE.MIT'] - license: MIT \ No newline at end of file + license-files: [LICENSE.MIT] + license: MIT + headers: + - fastlz.h + static-libs@unix: + - libfastlz.a diff --git a/config/pkg/lib/gmp.yml b/config/pkg/lib/gmp.yml index 8a28069b..bdc13b55 100644 --- a/config/pkg/lib/gmp.yml +++ b/config/pkg/lib/gmp.yml @@ -1,11 +1,5 @@ gmp: type: library - static-libs@unix: - - libgmp.a - headers: - - gmp.h - pkg-configs: - - gmp artifact: source: type: filelist @@ -17,3 +11,9 @@ gmp: metadata: license-files: ['@/gmp.txt'] license: Custom + headers: + - gmp.h + pkg-configs: + - gmp + static-libs@unix: + - libgmp.a diff --git a/config/pkg/lib/openssl.yml b/config/pkg/lib/openssl.yml index ce83a4d4..22d06508 100644 --- a/config/pkg/lib/openssl.yml +++ b/config/pkg/lib/openssl.yml @@ -1,16 +1,10 @@ openssl: type: library - static-libs@unix: - - libssl.a - - libcrypto.a - headers: ['openssl'] - depends: - - zlib artifact: source: type: ghrel repo: openssl/openssl - match: 'openssl.+\.tar\.gz' + match: openssl.+\.tar\.gz prefer-stable: true source-mirror: type: filelist @@ -18,5 +12,12 @@ openssl: regex: '/href="(?openssl-(?[^"]+)\.tar\.gz)"/' binary: hosted metadata: - license-files: ['LICENSE.txt'] + license-files: [LICENSE.txt] license: OpenSSL + depends: + - zlib + headers: + - openssl + static-libs@unix: + - libssl.a + - libcrypto.a diff --git a/config/pkg/lib/zlib.yml b/config/pkg/lib/zlib.yml index 0a7eec71..9ca70f42 100644 --- a/config/pkg/lib/zlib.yml +++ b/config/pkg/lib/zlib.yml @@ -1,16 +1,16 @@ zlib: type: library - static-libs@unix: - - libz.a - headers: - - zlib.h - - zconf.h artifact: source: type: ghrel repo: madler/zlib - match: 'zlib.+\.tar\.gz' + match: zlib.+\.tar\.gz binary: hosted metadata: license-files: ['{registry_root}/src/globals/licenses/zlib.txt'] - license: Zlib-Custom \ No newline at end of file + license: Zlib-Custom + headers: + - zlib.h + - zconf.h + static-libs@unix: + - libz.a diff --git a/src/StaticPHP/ConsoleApplication.php b/src/StaticPHP/ConsoleApplication.php index bd2e4eb1..e6561705 100644 --- a/src/StaticPHP/ConsoleApplication.php +++ b/src/StaticPHP/ConsoleApplication.php @@ -8,8 +8,8 @@ use StaticPHP\Command\BuildLibsCommand; use StaticPHP\Command\BuildTargetCommand; use StaticPHP\Command\Dev\EnvCommand; use StaticPHP\Command\Dev\IsInstalledCommand; +use StaticPHP\Command\Dev\LintConfigCommand; use StaticPHP\Command\Dev\ShellCommand; -use StaticPHP\Command\Dev\SortConfigCommand; use StaticPHP\Command\DoctorCommand; use StaticPHP\Command\DownloadCommand; use StaticPHP\Command\DumpLicenseCommand; @@ -62,7 +62,7 @@ class ConsoleApplication extends Application new ShellCommand(), new IsInstalledCommand(), new EnvCommand(), - new SortConfigCommand(), + new LintConfigCommand(), ]); // add additional commands from registries