Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed .editorconfig loading #509

Merged
merged 1 commit into from Aug 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -181,14 +181,12 @@ internal abstract class AbstractCheckSupport(

val sourceFiles = ds.includedFiles.map { File(sourceRoot, it) }

val workingDir = File(".").absoluteFile

sourceFiles.forEach { file ->
if (!checkedFiles.add(file.canonicalFile)) {
return@forEach
}

val workingRelativePath = file.toRelativeString(workingDir)
val absolutePath = file.absolutePath
val baseRelativePath = file.toRelativeString(basedir)
reporter.before(baseRelativePath)

Expand All @@ -202,7 +200,7 @@ internal abstract class AbstractCheckSupport(
val sourceText = file.readText(charset)

lintFile(
workingRelativePath,
absolutePath,
sourceText,
ruleProviders,
{ error ->
Expand Down
Expand Up @@ -87,14 +87,12 @@ internal class Format(

val sourceFiles = ds.includedFiles.map { File(sourceRoot, it) }

val workingDir = File(".").absoluteFile

sourceFiles.forEach { file ->
if (!checkedFiles.add(file.canonicalFile)) {
return@forEach
}

val workingRelativePath = file.toRelativeString(workingDir)
val absolutePath = file.absolutePath
val baseRelativePath = file.toRelativeString(basedir)

log.debug("checking format: $baseRelativePath")
Expand All @@ -107,7 +105,7 @@ internal class Format(
val sourceText = file.readText(charset)

val formattedText = formatFile(
workingRelativePath,
absolutePath,
sourceText,
ruleProviders,
{ (line, col, _, detail), corrected ->
Expand Down