Skip to content

Commit d4d99d4

Browse files
authored
Fix #5960: Update kdoc for LintTimeoutWrapper (#5966)
<!-- READ ME FIRST: Please fill in the explanation section below and check off every point from the Essential Checklist! --> ## Explanation <!-- - Explain what your PR does. If this PR fixes an existing bug, please include - "Fixes #bugnum:" in the explanation so that GitHub can auto-close the issue - when this PR is merged. --> Fix #5960 - Remove TODO related to the LintTimeoutWrapper - It was decided that it might be fine to leave a comment around the wrapper explaining why it's there, and we could close issue #5960 since the wrapper doesn't do any harm and there's proper context there for future developers who are wondering why we have it. ## Essential Checklist <!-- Please tick the relevant boxes by putting an "x" in them. --> - [x] The PR title and explanation each start with "Fix #bugnum: " (If this PR fixes part of an issue, prefix the title with "Fix part of #bugnum: ...".) - [x] Any changes to [scripts/assets](https://github.com/oppia/oppia-android/tree/develop/scripts/assets) files have their rationale included in the PR explanation. - [x] The PR follows the [style guide](https://github.com/oppia/oppia-android/wiki/Coding-style-guide). - [x] The PR does not contain any unnecessary code changes from Android Studio ([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#undo-unnecessary-changes)). - [x] The PR is made from a branch that's **not** called "develop" and is up-to-date with "develop". - [x] The PR is **assigned** to the appropriate reviewers ([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#clarification-regarding-assignees-and-reviewers-section)).
1 parent 3ffeedf commit d4d99d4

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

scripts/src/java/org/oppia/android/scripts/lint/AndroidLintRunner.kt

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,8 +297,18 @@ class AndroidLintAnalyzer(
297297
}
298298
}
299299

300-
// TODO(#5960): Remove LintTimeoutWrapper once Lint supports dispatcher timeouts.
301-
/** Wrapper class to run lint with timeout protection. */
300+
/**
301+
* Wrapper class to run lint with timeout protection.
302+
*
303+
* The lint tool sometimes hangs on certain systems after writing the report
304+
* (likely due to lingering non-daemon threads in the native Java process).
305+
* Since lint runs natively inside this script as a Java application,
306+
* it may continue running indefinitely unless explicitly stopped.
307+
*
308+
* This utility ensures that lint execution terminates within a bounded time,
309+
* preventing hangs by enforcing a timeout and interrupting the process if
310+
* it fails to complete.
311+
*/
302312
class LintTimeoutWrapper(
303313
private val cliArgs: Array<String>,
304314
private val timeoutMinutes: Long

scripts/src/java/org/oppia/android/scripts/lint/LintAnalysisReporter.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ class LintAnalysisReporter(private val repoRoot: File) {
544544
wrapText(
545545
"In $filePath the ${toUpperSnakeCase(issueId)} exemption is redundant" +
546546
" and can be removed since there are no corresponding lint issues." +
547-
"Refer Android Lint Check Wiki for more information:" +
547+
"\nRefer to the Android Lint Check Wiki for more information:" +
548548
" https://github.com/oppia/oppia-android/wiki/" +
549549
"Android-Lint-Check#exemption-file-maintenance-prompts"
550550
)
@@ -750,7 +750,8 @@ class LintAnalysisReporter(private val repoRoot: File) {
750750
println("${YELLOW}UNUSED ENUM MAPPINGS DETECTED:$RESET")
751751
println(
752752
"The following issue IDs are defined in issueIdMapping " +
753-
"but no corresponding lint issues were found. Refer Android Lint Check Wiki for more" +
753+
"but no corresponding lint issues were found." +
754+
"\nRefer to the Android Lint Check Wiki for more" +
754755
" information: https://github.com/oppia/oppia-android/wiki/" +
755756
"Android-Lint-Check#unused-enum-mappings-detection"
756757
)

0 commit comments

Comments
 (0)