Skip to content

Commit 2e68e2a

Browse files
authored
[ci] Add typos workflow (#885)
* [ci] Add typos workflow * fix typo * fix typo * fix typo * fix typo
1 parent ec51521 commit 2e68e2a

8 files changed

Lines changed: 38 additions & 6 deletions

File tree

.github/typos.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[default.extend-words]
2+
Symplify = "Symplify"
3+
4+
Invokable = "Invokable"
5+
6+
# yes, it rename fix in symfony71-serializer to rename Contructor to Constructor
7+
# via RenameMethodRector
8+
Contructor = "Contructor"

.github/workflows/typos.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# see https://github.com/crate-ci/typos
2+
name: "Typos"
3+
4+
on:
5+
pull_request:
6+
push:
7+
branches:
8+
- "main"
9+
10+
jobs:
11+
typos:
12+
name: "Check for typos"
13+
runs-on: "ubuntu-latest"
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
19+
20+
- name: "Check for typos"
21+
uses: "crate-ci/typos@v1.40.0"
22+
with:
23+
config: .github/typos.toml
24+
files: "README.md src config rules tests rules-tests"

rules-tests/CodeQuality/Rector/Class_/ControllerMethodInjectionToConstructorRector/Fixture/allow_use.php.inc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use Psr\Log\LoggerInterface;
88
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
99
use Symfony\Component\Routing\Annotation\Route;
1010

11-
final class AllwoUse extends AbstractController
11+
final class AllowUse extends AbstractController
1212
{
1313
public function __construct()
1414
{
@@ -35,7 +35,7 @@ use Psr\Log\LoggerInterface;
3535
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
3636
use Symfony\Component\Routing\Annotation\Route;
3737

38-
final class AllwoUse extends AbstractController
38+
final class AllowUse extends AbstractController
3939
{
4040
public function __construct(private readonly \Psr\Log\LoggerInterface $logger)
4141
{

rules-tests/Configs/Rector/Closure/MergeServiceNameTypeRector/Fixture/skip_diferent_value.php.inc renamed to rules-tests/Configs/Rector/Closure/MergeServiceNameTypeRector/Fixture/skip_different_value.php.inc

File renamed without changes.

rules-tests/Symfony43/Rector/MethodCall/WebTestCaseAssertResponseCodeRector/Fixture/skip_200_contant_response.php.inc renamed to rules-tests/Symfony43/Rector/MethodCall/WebTestCaseAssertResponseCodeRector/Fixture/skip_200_constant_response.php.inc

File renamed without changes.

rules-tests/Symfony44/Rector/ClassMethod/ConsoleExecuteReturnIntRector/Fixture/multiple_returns.php.inc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ final class MultipleReturnCommand extends Command
1414
return null;
1515
}
1616

17-
if ($erroCondition) {
17+
if ($errorCondition) {
1818
return 1;
1919
}
2020
}
@@ -38,7 +38,7 @@ final class MultipleReturnCommand extends Command
3838
return 0;
3939
}
4040

41-
if ($erroCondition) {
41+
if ($errorCondition) {
4242
return 1;
4343
}
4444
return 0;

rules-tests/Symfony62/Rector/Class_/MessageHandlerInterfaceToAttributeRector/Fixture/class_that_extends_abstact_class_that_implements_handler.php.inc renamed to rules-tests/Symfony62/Rector/Class_/MessageHandlerInterfaceToAttributeRector/Fixture/class_that_extends_abstract_class_that_implements_handler.php.inc

File renamed without changes.

rules/Symfony51/Rector/Class_/LogoutHandlerToLogoutEventSubscriberRector.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,12 +120,12 @@ public function refactor(Node $node): ?Node
120120
}
121121

122122
// 3. add getSubscribedEvents() class method
123-
$node->stmts[] = $this->createGetSubsribersClassMethod();
123+
$node->stmts[] = $this->createGetSubscribersClassMethod();
124124

125125
return $node;
126126
}
127127

128-
private function createGetSubsribersClassMethod(): ClassMethod
128+
private function createGetSubscribersClassMethod(): ClassMethod
129129
{
130130
$classConstFetch = $this->nodeFactory->createClassConstReference(SymfonyClass::LOGOUT_EVENT);
131131

0 commit comments

Comments
 (0)