nus-cs2103-AY2425S1 / forum

12 stars 0 forks source link

Is there any way to disable checkstyle in gradle check in CI file? #265

Open Rachelcoll opened 6 days ago

Rachelcoll commented 6 days ago

Currently my CI test always fail due to the failure of checkstyle, because I feel some checkstyle are unnecessary to follow. How can I disable it in gradle.yml? Currently I tried `

stanleytangzh commented 6 days ago

Hi, if you want to disable Checkstyle checks, you can use build and exclude the Checkstyle tasks. Thus, you can try - name: Build with Gradle with Gradle run: ./gradlew build -x checkstyleMain -x checkstyleTest -x checkstyleMain and -x checkstyleTest are used to exclude the Checkstyle tasks. These tasks might be named differently depending on your configuration, but checkstyleMain and checkstyleTest are the standard names for Checkstyle tasks in many setups. To verify task names, you can also run the following command locally to list all available tasks and their names: ./gradlew tasks --all