@@ -11,7 +11,7 @@ const IGNORED = ["tests/fuzz/support"];
1111const 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
1717const 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;
5353if ( 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}
0 commit comments