exercism / exercism/java-representer
Normalize usage of `this`
- 主要言語
- Java
- スター
- 1
- フォーク
- 12
- 平均マージ
- 4日 4時間
- マージ済み PR(30日)
- 7
説明
It would be nice if the representer was able to normalize code such as the following two snippets into the same representation:
```java
class SomeClass {
private String someField = "";
String getSomeField() {
return someField;
}
void setSomeField(String someField) {
this.someField = someField;
}
}
```
```java
class SomeClass {
private String someField = "";
String getSomeField() {
return this.someField;
}
void setSomeField(String someField) {
this.someField = someField;
}
}
```
Right now, these variants both get their own representation because one uses `this` in `getSomeField()` while the other one doesn't. The easiest way to normalize would be to _always_ add `this` when referencing instance fields or methods, since removing it will result in invalid code for `setSomeField()`.
コントリビューションガイド
評価
この issue はまだ評価されていません。