Skip to content

Commit

Permalink
Fix Lint Checks and Kdoc additions
Browse files Browse the repository at this point in the history
  • Loading branch information
Rd4dev committed Jun 21, 2024
1 parent 9b90ca2 commit dd24d3c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,16 @@ fun main(vararg args: String) {
testFileCheck.execute()
}

class TestFileCheck (
/**
* Class for checking the presence of test files in a repository.
*
* @param repoPath The path of the repo
* @param testFileExemptiontextProto the location of the test file exemption textproto file.
*/
class TestFileCheck(
private val repoPath: String,
private val testFileExemptiontextProto: String
) {
) {

/**
* Retrieves a list of files exempted from requiring a test file based on the specified protocol buffer.
Expand All @@ -41,7 +47,7 @@ class TestFileCheck (
* The files specifically marked as exempt from needing a test file are included,
* rather than those exempt from meeting a minimum coverage percentage.
*
* @param testFileExemptiontextProto The path to the protocol buffer file containing test file exemptions.
* @param testFileExemptiontextProto the location of the test file exemption textproto file.
* @return A list of file paths that are exempted from requiring a test file.
*/
fun getTestFileExemptionList(testFileExemptiontextProto: String): List<String> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
package org.oppia.android.scripts.testfile

import com.google.common.truth.Truth.assertThat
import org.junit.Assert.assertEquals
import org.oppia.android.scripts.proto.TestFileExemptions
import org.oppia.android.scripts.proto.TestFileExemptions.TestFileExemption
import org.junit.After
import org.junit.Assert.assertEquals
import org.junit.Before
import org.junit.Rule
import org.junit.Test
import org.junit.rules.TemporaryFolder
import org.oppia.android.scripts.proto.TestFileExemptions
import org.oppia.android.scripts.proto.TestFileExemptions.TestFileExemption
import org.oppia.android.testing.assertThrows
import java.io.ByteArrayOutputStream
import java.io.PrintStream
import java.io.File
import java.io.FileInputStream
import java.io.FileOutputStream

/** Tests for [TestFileCheck]. */
class TestFileCheckTest {
Expand Down Expand Up @@ -157,7 +154,6 @@ class TestFileCheckTest {
assertEquals(listOf("test/TestExemptedFile.kt"), result)
}


/** Retrieves the absolute path of testfiles directory. */
private fun retrieveTestFilesDirectoryPath(): String {
return "${tempFolder.root}/testfiles"
Expand Down

0 comments on commit dd24d3c

Please sign in to comment.