Skip to content

Commit 132dd4a

Browse files
committed
refactor: remove redundant naming convention checks from PR validation workflow
1 parent 4d4567a commit 132dd4a

1 file changed

Lines changed: 0 additions & 22 deletions

File tree

.github/workflows/pr-validation.yml

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -49,28 +49,6 @@ jobs:
4949
filename=$(basename "$file")
5050
dir=$(dirname "$file")
5151
52-
# Check for proper naming conventions (Allow snake_case, camelCase, or PascalCase)
53-
case "$file" in
54-
*.c|*.cpp|*.py)
55-
# Allow snake_case, camelCase, or PascalCase for C/C++/Python
56-
if [[ ! "$filename" =~ ^[a-zA-Z0-9_]+\.[a-z]+$ ]]; then
57-
invalid_files+=("$file: Use alphanumeric characters and underscores only (e.g., binary_search.cpp, maxRectangle.cpp)")
58-
fi
59-
;;
60-
*.java)
61-
# Should use PascalCase for Java classes
62-
if [[ ! "$filename" =~ ^[A-Z][a-zA-Z0-9]*\.java$ ]]; then
63-
invalid_files+=("$file: Java files should use PascalCase (e.g., BinarySearch.java, MaxRectangle.java)")
64-
fi
65-
;;
66-
*.js|*.ts|*.go|*.rs|*.kt|*.swift|*.php|*.rb|*.cs|*.dart|*.scala)
67-
# Allow flexible naming for other languages
68-
if [[ ! "$filename" =~ ^[a-zA-Z0-9_]+\.[a-z]+$ ]]; then
69-
invalid_files+=("$file: Use alphanumeric characters and underscores only")
70-
fi
71-
;;
72-
esac
73-
7452
# Check directory structure - must contain a valid category
7553
if [[ "$file" =~ \.(c|cpp|java|py|js|ts|go|rs|kt|swift|php|rb|cs|dart|scala)$ ]]; then
7654
if [[ ! "$dir" =~ (algorithms|data_structures|dynamic_programming|projects) ]]; then

0 commit comments

Comments
 (0)