assertj / assertj/assertj-generator

Add @see tags to methods to point back to the original member

Offen
#100 3 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Java
Sterne
72
Forks
47
Ø Merge
1 T. 16 Std.
Gemergte PRs (30 T.)
2

Beschreibung

It'd be helpful if generated methods included an `@see` to the member the value was generated from.

## Example

### Given
```java
class Foo {
public int getBar() {
return 0;
}
}
```
### Actual

```java
/**
* Verifies that the actual Foo's bar is equal to the given one.
* @param bar the given bar to compare the actual Foo's bar to.
* @return this assertion object.
* @throws AssertionError - if the actual Foo's bar is not equal to the given one.
*/
public FooAssert hasBar(int bar) {
// ... cut for brevity ...
return this;
}
```

### Expected

```java
/**
* Verifies that the actual Foo's bar is equal to the given one.
* @param bar the given bar to compare the actual Foo's bar to.
* @return this assertion object.
* @throws AssertionError - if the actual Foo's bar is not equal to the given one.
* @see Foo#getBar() Member under test.
*/
public FooAssert hasBar(int bar) {
// ... cut for brevity ...
return this;
}
```

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Das Issue nennt keine Dateien, Tests oder Einstiegspunkte. Beginne damit, den Generatorcode zu finden, der Javadocs für generierte Assertion-Methoden ausgibt, sowie alle Tests, die diese Ausgabe abdecken; erledigt ist die Aufgabe, wenn generierte Methoden einen @see-Link wie Foo#getBar() mit dem Label "Member under test" enthalten.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
java
Bereich
tooling
Issue-Typ
Feature
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
38/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.