Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .agent/workflows/typescript-edit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
description: TypeScriptファイル編集後の自動整形
---

# TypeScriptファイル編集後のワークフロー

TypeScriptファイル(`.ts`)を編集した後は、以下の手順を実行してください。

## 手順

1. TypeScriptファイルの編集を完了する

// turbo
2. Lintと自動修正を実行する
```bash
npm run lint-fix
```

これにより、コードスタイルが自動的に整形され、修正可能なlintエラーが修正されます。
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Currently, it identifies the following:
- Psalm checks based on the presence of `psalm.xml.dist` or `psalm.xml` files.
- PHPStan checks based on the presence of `phpstan.neon`, `phpstan.neon.dist` or `phpstan.dist.neon` files.
- ComposerRequireChecker checks based on the presence of `composer-require-checker.json` file.
- composer-dependency-analyser checks based on the presence of `composer-dependency-analyser.php` file.
- phpbench benchmarks based on the presence of a `phpbench.json`.
- Infection mutation tests based on the presence of `infection.json` or `infection.json.dist`. In case that `roave/infection-static-analysis-plugin` is installed, this will be used instead.
- Markdown documentation based on the presence of a `mkdocs.yml` and/or markdown files in the `doc/book/` or `doc/books/` trees.
Expand Down
4 changes: 3 additions & 1 deletion src/tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {InfectionTool} from './tools/infection';
import {PhpCodeSnifferTool} from './tools/codesniffer';
import {PsalmTool} from './tools/psalm';
import {ComposerRequireCheckerTool} from './tools/composerRequireChecker';
import {ComposerDependencyAnalyser} from './tools/composerDependencyAnalyser';
import {PhpBenchTool} from './tools/phpbench';
import {CodeceptionTool} from './tools/codeception';
import {PhpCsFixerTool} from './tools/phpCsFixer';
Expand Down Expand Up @@ -80,6 +81,7 @@ export default function createTools(config: Config): Array<Tool> {
PhpCodeSnifferTool,
PsalmTool,
ComposerRequireCheckerTool,
ComposerDependencyAnalyser,
PhpBenchTool,
CodeceptionTool,
PhpCsFixerTool,
Expand All @@ -106,4 +108,4 @@ export function removeNonExistentFilesToCheck(tool: Tool): Tool {

export function isToolRunningContainerDefaultPhpVersion(tool: Tool): tool is ToolRunningContainerDefaultPhpVersion {
return (tool as ToolRunningContainerDefaultPhpVersion).php === CONTAINER_DEFAULT_PHP_VERSION;
}
}
11 changes: 11 additions & 0 deletions src/tools/composerDependencyAnalyser.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { ToolType } from '../enum/toolType';
import { ToolExecutionType } from '../enum/toolExecutionType';

export const ComposerDependencyAnalyser = {
executionType: ToolExecutionType.STATIC,
name: 'Composer Dependency Analyser',
command: './vendor/bin/composer-dependency-analyser',
filesToCheck: ['composer-dependency-analyser.php'],
toolType: ToolType.CODE_CHECK,
};

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"stablePHP": "7.4"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php

declare(strict_types=1);

use ShipMonk\ComposerDependencyAnalyser\Config\Configuration;

$config = new Configuration();

return $config;
10 changes: 10 additions & 0 deletions tests/code-check-composer-dependency-analyser/matrix.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"include": [
{
"name": "Composer Dependency Analyser [7.4, latest]",
"job": "{\"command\":\"./vendor/bin/composer-dependency-analyser\",\"php\":\"7.4\",\"extensions\":[],\"ini\":[],\"dependencies\":\"latest\",\"ignore_platform_reqs_8\":false,\"ignore_php_platform_requirement\":false,\"additional_composer_arguments\":[],\"before_script\":[]}",
"operatingSystem": "ubuntu-latest",
"action": "laminas/laminas-continuous-integration-action@v1"
}
]
}
Empty file.
Loading