Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions scalastyle-config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,11 @@ This file is divided into 3 sections:
scala.jdk.CollectionConverters._ and use .asScala / .asJava methods</customMessage>
</check>

<check customId="getTempDirectory" level="error" class="org.scalastyle.file.RegexChecker" enabled="true">
<parameters><parameter name="regex">\bFileUtils\.getTempDirectory\b</parameter></parameters>
<customMessage>Use System.getProperty instead.</customMessage>
</check>

<check customId="readLines" level="error" class="org.scalastyle.file.RegexChecker" enabled="true">
<parameters><parameter name="regex">\bFileUtils\.readLines\b</parameter></parameters>
<customMessage>Use Files.readAllLines instead.</customMessage>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ import java.nio.file.Files

import scala.collection.mutable

import org.apache.commons.io.FileUtils

import org.apache.spark.sql.catalyst.expressions.AttributeSet
import org.apache.spark.sql.catalyst.util._
import org.apache.spark.sql.execution._
Expand Down Expand Up @@ -138,7 +136,7 @@ trait PlanStabilitySuite extends DisableAdaptiveExecutionSuite {

private def checkWithApproved(plan: SparkPlan, name: String, explain: String): Unit = {
val dir = getDirForTest(name)
val tempDir = FileUtils.getTempDirectory
val tempDir = System.getProperty("java.io.tmpdir")
val actualSimplified = getSimplifiedPlan(plan)
val foundMatch = isApproved(dir, actualSimplified, explain)

Expand Down