-
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(config): Add readme-lint script to validate README files
- Introduce a new script `readme-lint` to ensure all README-* files have the same number of lines as README.md - Update `.php-cs-fixer.php` and `composer.json` to include the new linting script in the configuration - Enable checking for inconsistencies in README files as part of the development workflow
- Loading branch information
ityaozm@gmail.com
committed
Nov 1, 2024
1 parent
179cbb1
commit 815485c
Showing
8 changed files
with
41 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/usr/bin/env php | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/** | ||
* This file is part of the guanguans/ai-commit. | ||
* | ||
* (c) guanguans <ityaozm@gmail.com> | ||
* | ||
* This source file is subject to the MIT license that is bundled. | ||
*/ | ||
require __DIR__.'/vendor/autoload.php'; | ||
|
||
collect(glob('README-*.md'))->each(static function (string $file): void { | ||
if (count(file($file)) !== count(file('README.md'))) { | ||
echo "The file [$file] has a different number of lines than [README.md]\n"; | ||
exit(1); | ||
} | ||
}); | ||
|
||
exit(0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters