Git Komut Rehberi & Terminal Asistanı
Sıfırdan Yeni Bir Depo Başlatın:
Mevcut Bir Git Deposu veya Klasörü Gönderin:
Hataları Geri Alma, İptal & Temizlik:
Son commit'i geri al (yapılan değişiklikleri korur):
git reset --soft HEAD~1
Yapılan yerel değişiklikleri iptal et (çalışma ağacını temizler):
git restore .
Takip edilmeyen gereksiz dosyaları sil:
git clean -fd
Değişiklikleri geçici sakla ve geri getir (stash):
git stash git stash pop
Dal (Branch) ve Sürüm Etiketleri:
Yeni dal aç ve geçiş yap:
git checkout -b yeni-ozellik git push -u origin yeni-ozellik
Sürüm etiketi (tag) oluştur ve gönder:
git tag -a v1.0.0 -m "Sürüm 1.0.0" git push origin --tags
feat: Release v3.0.0 - PHPStan-style analysis, configuration, baseline, and advanced WCAG rules
This commit is contained in:
@@ -0,0 +1,72 @@
|
||||
<?php
|
||||
|
||||
namespace YakNet\AccessibilityConsole\Console\Command;
|
||||
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use Symfony\Component\Console\Style\SymfonyStyle;
|
||||
|
||||
class InitCommand extends Command
|
||||
{
|
||||
protected function configure(): void
|
||||
{
|
||||
$this
|
||||
->setName('init')
|
||||
->setDescription('Initialize a default a11y.yaml configuration file');
|
||||
}
|
||||
|
||||
protected function execute(InputInterface $input, OutputInterface $output): int
|
||||
{
|
||||
$io = new SymfonyStyle($input, $output);
|
||||
$configPath = getcwd() . '/a11y.yaml';
|
||||
|
||||
if (file_exists($configPath)) {
|
||||
$io->warning("Configuration file 'a11y.yaml' already exists in the current directory.");
|
||||
return Command::SUCCESS;
|
||||
}
|
||||
|
||||
$defaultConfig = <<<YAML
|
||||
# YakNet Accessibility Console Configuration
|
||||
# For detailed configuration, see: https://forum.yak.net.tr
|
||||
|
||||
# Paths to scan (can be directories or specific files)
|
||||
paths:
|
||||
- .
|
||||
|
||||
# Exclude directories or files
|
||||
exclude_paths:
|
||||
- vendor
|
||||
- node_modules
|
||||
- tests
|
||||
- storage
|
||||
- .git
|
||||
|
||||
# Accessibility scanning level (1-9, default 4)
|
||||
level: 4
|
||||
|
||||
# Output format (console, json, html, github)
|
||||
format: console
|
||||
|
||||
# Path to the baseline file for ignoring existing violations
|
||||
# baseline: a11y-baseline.json
|
||||
|
||||
# Rule adjustments
|
||||
rules:
|
||||
# Rules to exclude from analysis
|
||||
exclude:
|
||||
# - WCAG_1_3_1_FIELDSET
|
||||
# Additional custom rules to run
|
||||
include:
|
||||
# - App\Rules\MyCustomRule
|
||||
YAML;
|
||||
|
||||
if (file_put_contents($configPath, $defaultConfig) !== false) {
|
||||
$io->success("Created configuration file: a11y.yaml");
|
||||
return Command::SUCCESS;
|
||||
}
|
||||
|
||||
$io->error("Failed to create configuration file 'a11y.yaml'.");
|
||||
return Command::FAILURE;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user