Skip to content

Commit 4216b0b

Browse files
committed
fix: copilot fixes
Signed-off-by: exploreriii <133720349+exploreriii@users.noreply.github.com>
1 parent eac6a55 commit 4216b0b

2 files changed

Lines changed: 7 additions & 9 deletions

File tree

.github/scripts/pr-check-test-files.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const IGNORED = ["tests/fuzz/support"];
1111
const EXCEPTIONS = ["conftest.py", "__init__.py", "init.py", "mock_server.py", "utils.py"];
1212

1313
// Collect naming errors to report at the end
14-
const name_errors = [];
14+
const nameErrors = [];
1515

1616
// Use "git ls-files" to get all tracked files in the repository
1717
const output = execSync("git ls-files", { encoding: "utf-8" });
@@ -41,9 +41,9 @@ for (const file of files) {
4141

4242
// Enforce naming rule on files
4343
if (!name.endsWith("_test.py")) {
44-
console.error(`Name invalid test file: ${file}`);
44+
console.error(`Invalid test file name: ${file}`);
4545
console.error(`::error file=${file}::Must end with '_test.py'`);
46-
name_errors.push(file);
46+
nameErrors.push(file);
4747
}
4848
}
4949

@@ -53,12 +53,12 @@ const summaryPath = process.env.GITHUB_STEP_SUMMARY;
5353
if (summaryPath) {
5454
let summary = `## 🧪 Test File Naming Check\n\n`;
5555

56-
if (name_errors.length === 0) {
56+
if (nameErrors.length === 0) {
5757
summary += `✅ All test files are correctly named\n`;
5858
} else {
5959
// Counts and lists all the incorrectly named test files
60-
summary += `❌ Found ${name_errors.length} incorrectly named test files:\n\n`;
61-
name_errors.forEach(f => {
60+
summary += `❌ Found ${nameErrors.length} incorrectly named test files:\n\n`;
61+
nameErrors.forEach(f => {
6262
summary += `- \`${f}\`\n`;
6363
});
6464
}
@@ -67,6 +67,6 @@ if (summaryPath) {
6767
}
6868

6969
// Fail job if needed
70-
if (name_errors.length > 0) {
70+
if (nameErrors.length > 0) {
7171
process.exit(1);
7272
}

.github/workflows/pr-check-primary-test-files.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ on:
88
- "tests/**"
99
pull_request:
1010
types: [opened, synchronize, review_requested, ready_for_review, reopened]
11-
paths:
12-
- "tests/**"
1311

1412
permissions:
1513
contents: read

0 commit comments

Comments
 (0)