aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts/linters/src/Linter.php
blob: 3fb6038fbfd426951b1df156c6d828ea16b21a20 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?php

declare(strict_types=1);

namespace Shirabe\Lint;

interface Linter
{
    public function name(): string;

    /**
     * @param list<string> $excludes root-relative paths to skip
     * @return list<string> formatted violation lines; empty when the linter passes
     */
    public function check(string $rootDir, array $excludes): array;

    /** Printed once, above the violation list, when violations are found. */
    public function failureIntro(): string;
}