Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ This document is intended for Spotless developers.
We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (starting after version `1.27.0`).

## [Unreleased]
### Fixed
- GrEclipse no longer leaves a `file%3A...` directory in the working directory. ([#2019](https://github.com/diffplug/spotless/issues/2019))

## [4.11.0] - 2026-11-02
### Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,12 @@ private static Logger warnAsInfo(Logger delegate) {
// used by the formatter. Solstice removes them before starting it.
solstice.warnAndModifyManifestsToFix(warnAsInfo(LOGGER));

// Solstice URL-encodes an explicit instance area into a directory name relative to
// the working directory (#2019), so set it through the default Equinox falls back on.
var props = Map.of(
"osgi.nl", "en_US",
Constants.FRAMEWORK_STORAGE_CLEAN, Constants.FRAMEWORK_STORAGE_CLEAN_ONFIRSTINIT,
EquinoxLocations.PROP_INSTANCE_AREA,
EquinoxLocations.PROP_INSTANCE_AREA_DEFAULT,
Files.createTempDirectory("spotless-groovy-instance").toAbsolutePath().toString(),
EquinoxLocations.PROP_CONFIG_AREA,
Files.createTempDirectory("spotless-groovy-config").toAbsolutePath().toString());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,13 @@
*/
package com.diffplug.spotless.extra.groovy;

import static org.assertj.core.api.Assertions.assertThat;

import java.nio.file.Files;
import java.nio.file.Path;
import java.util.stream.Stream;

import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.MethodSource;

Expand All @@ -42,4 +47,13 @@ void formatWithVersion(String version) throws Exception {
private static Stream<String> formatWithVersion() {
return Stream.of("4.18", GrEclipseFormatterStep.defaultVersion());
}

/** https://github.com/diffplug/spotless/issues/2019 */
@Test
void doesNotCreateDirectoriesInWorkingDirectory() throws Exception {
harnessFor(GrEclipseFormatterStep.defaultVersion()).test("test.groovy", INPUT, EXPECTED);
try (Stream<Path> files = Files.list(Path.of(System.getProperty("user.dir")))) {
assertThat(files.map(file -> file.getFileName().toString())).noneMatch(name -> name.startsWith("file%3A"));
}
}
}
2 changes: 2 additions & 0 deletions plugin-gradle/CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (starting after version `3.27.0`).

## [Unreleased]
### Fixed
- GrEclipse no longer leaves a `file%3A...` directory in the working directory. ([#2019](https://github.com/diffplug/spotless/issues/2019))

## [8.11.0] - 2026-11-02
### Added
Expand Down
2 changes: 2 additions & 0 deletions plugin-maven/CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (starting after version `1.27.0`).

## [Unreleased]
### Fixed
- GrEclipse no longer leaves a `file%3A...` directory in the working directory. ([#2019](https://github.com/diffplug/spotless/issues/2019))

## [3.11.0] - 2026-11-02
### Added
Expand Down
Loading