Update builds to support strictMode testing
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 20/100
- issue の種類
- 機能追加
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- java
調査の方向性
Start by locating the Gradle and Maven build files and their existing test tasks, then determine how strictMode is configured and how the tests should be run twice. The issue does not name files or provide a verified implementation; completion requires a confirmed approach that works in both builds and passes the full test suite.
索引モデルが issue の本文から書いたものです。
説明
After executing the unit tests, set default strictMode to true, then re-run all of the tests.
Fix in both gradle and maven builds. It might be possible (?) to integrate this action into the existing test task, but if not:
In Gradle:
Modify the existing test task (copilot, I have not verified this):
apply plugin: 'java'
repositories {
mavenCentral()
}
dependencies {
testImplementation 'junit:junit:4.12'
}
task modifyCode {
doLast {
// Add your code modification logic here
def file = file('src/main/java/com/example/YourClass.java')
def text = file.text
text = text.replaceAll('oldCode', 'newCode')
file.text = text
println 'Code modified.'
}
}
task rerunTests(dependsOn: ['modifyCode', 'test']) {
doLast {
println 'Re-running tests...'
}
}
test {
finalizedBy 'rerunTests'
}
If a new task is needed (claude.ai, not verified):
dependsOn test
doLast {
// Make your code change here
File sourceFile = file('src/main/java/YourFile.java')
String content = sourceFile.text
content = content.replace('oldCode', 'newCode')
sourceFile.text = content
// Run tests again
tasks.test.execute()
}
}
Copilot also suggests a one-test-run fix for maven, but it requires a new ModifyCode class. Not shown here.
In Maven, new task (claude.ai, not verified):
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<id>test-with-code-change</id>
<phase>verify</phase>
<goals>
<goal>java</goal>
</goals>
<configuration>
<mainClass>org.apache.maven.shared.utils.io.FileUtils</mainClass>
<arguments>
<argument>src/main/java/YourFile.java</argument>
<argument>oldCode</argument>
<argument>newCode</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
- 主要言語
- Java
- スター
- 4.7k
- フォーク
- 2.6k
- 平均マージ
- 11日 18分
- マージ済み PR(30日)
- 1
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
stleary/JSON-java のほかの issue
-
Fix before the next release
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
Fix before the next release
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
stleary/JSON-java の issue をすべて見る
似ている issue
-
Bug Java Platform: Java
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
getsentry/sentry-java#6138 · コメント 1 件 ·
-
bug needs triage p2
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
GoogleCloudPlatform/DataflowTemplates#4273 · コメント 1 件 ·
-
[Studio][Bug] Bulk-deleting a full page of alert rules steps the page back while more rules remain オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
apache/rocketmq-dashboard#4654 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100