Skip to content

Commit 5401fe3

Browse files
committed
Merge branch 'main' into bump-super-linter
2 parents e5ced45 + e778786 commit 5401fe3

File tree

3 files changed

+18
-2
lines changed

3 files changed

+18
-2
lines changed

.github/workflows/lint-checker.yml

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ jobs:
2222
VALIDATE_SCALAFMT: true
2323
VALIDATE_RUST_2021: true
2424
VALIDATE_RUST_CLIPPY: true
25+
VALIDATE_PYTHON_RUFF: true
2526
VALIDATE_PYTHON_BLACK: true
2627
VALIDATE_PYTHON_ISORT: true
2728
VALIDATE_JAVASCRIPT_ES: true

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -4468,8 +4468,8 @@ In order to achieve greater coverage and encourage more people to contribute to
44684468
</a>
44694469
</td>
44704470
<td> <!-- Scala -->
4471-
<a href="./CONTRIBUTING.md">
4472-
<img align="center" height="25" src="./logos/github.svg" />
4471+
<a href="./src/scala/Palindrome.scala">
4472+
<img align="center" height="25" src="./logos/scala.svg" />
44734473
</a>
44744474
</td>
44754475
<td> <!-- Kotlin -->

src/scala/Palindrome.scala

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
def isPalindrome(content: String): Boolean = {
2+
val sanitizedContent: String = content.replaceAll("\\W", "").toLowerCase
3+
sanitizedContent == sanitizedContent.reverse
4+
}
5+
6+
object Main extends App {
7+
val data: Seq[String] = Seq(
8+
"",
9+
"a",
10+
"abba",
11+
"No lemon, no melon",
12+
"Was it a palindrome?"
13+
)
14+
data.foreach(x => println(s"'$x' is a palindrome? ${isPalindrome(x)}"))
15+
}

0 commit comments

Comments
 (0)