diffplug / diffplug/spotless

[Feature] Support editorconfig

Ouverte
#734 16 commentaires 61 réactions 0 personnes assignées Voir sur GitHub
enhancement
Langage dominant
Java
Étoiles
5.6k
Forks
559
Merge moyen
1 j 14 h
PR mergées (30 j)
43

Description

Support https://editorconfig.org

instead of this

```ts
spotless {
// optional: limit format enforcement to just the files changed by this feature branch
ratchetFrom 'origin/main'

format 'misc', {
// define the files to apply `misc` to
target '*.gradle', '*.md', '.gitignore'

// define the steps to apply to those files
trimTrailingWhitespace()
indentWithTabs() // or spaces. Takes an integer argument if you don't like 4
endWithNewline()
}
```
you could simply do

```kotlin
spotless {
editorConfig()
}
```

which would simply figure out all the same information, and also presumably pass it to other things like

```kotlin
spotless {
java {
}
```
would inherit it.

possibly code or coordination of a general library for editor config in java here.

https://github.com/ec4j/editorconfig-gradle-plugin

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez par le point d’entrée du DSL Gradle de Spotless indiqué par `spotless { ... }`, puis comparez la configuration existante du formatage et de `java` avec le ec4j-gradle-plugin lié. Le travail est terminé lorsque `editorConfig()` peut déduire les paramètres de formatage démontrés et les rendre disponibles pour des configurations telles que `java` ; précisez si une bibliothèque Java partagée entre dans le périmètre.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
java, kotlin
Domaine
build-system
Type d'issue
Fonctionnalité
Difficulté
5/5
Temps estimé
Plus d'une semaine
Activité
Calme
Clarté
Plutôt claire
Accessibilité débutants
42/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.