From c899a4675ca90507a420d901ef7fa26d8b285f23 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Tue, 21 Jul 2026 08:08:15 +0900 Subject: refactor(lint): rewrite structural linters from Ruby to PHP Fold scripts/lint and scripts/linters/*.rb into a standalone Composer project under scripts/linters/, matching the scripts/plugin-class-classifier/ convention. Uses no external packages, only PHP + Composer autoloading. Verified byte-for-byte identical output against the original Ruby implementation, both on the current repo (all linters pass) and on a synthetic fixture exercising every violation type. Entry point moves from `scripts/lint` to `scripts/linters/lint`. --- scripts/lint | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100755 scripts/lint (limited to 'scripts/lint') diff --git a/scripts/lint b/scripts/lint deleted file mode 100755 index c9e33049..00000000 --- a/scripts/lint +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env ruby - -require 'pathname' - -LINTERS = { - cargo_workspace_dependencies: [], - contiguous_use_block: [], - no_banned_use: [], - no_decorative_section_comment: %w[ - crates/shirabe-semver/src/version_parser.rs - ], - no_format_trailing_comma: %w[ - crates/shirabe/src/package/loader/root_package_loader.rs - crates/shirabe-spdx-licenses/src/spdx_licenses.rs - ], - no_mod_rs: [], - no_std_collections_maps: [], - no_use_as_alias: [], - sorted_dependencies: [], -} - -root_dir = Pathname.new(__dir__).join('..').expand_path - -results = LINTERS.map do |linter, excludes| - require_relative "linters/#{linter}" - puts "===== #{linter} =====" - ok = send(linter, root_dir, excludes) - puts "Passed." if ok - puts - ok -end -exit(results.all? ? 0 : 1) -- cgit v1.3.1