Skip to content

Commit 14b6666

Browse files
andrewyuqrli
andauthored
Setup CodeWhisperer path in code coverage tool (#3488)
Co-authored-by: Richard Li <[email protected]> Co-authored-by: Richard Li <[email protected]>
1 parent bd78e12 commit 14b6666

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

buildspec/linuxTests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ phases:
3333
- CI_BUILD_ID="${CODEBUILD_BUILD_ID}"
3434
- test -n "$CODE_COV_TOKEN" && curl -Os https://uploader.codecov.io/latest/linux/codecov && chmod +x codecov || true # this sometimes times out but we don't want to fail the build
3535
- test -n "$CODE_COV_TOKEN" && test -n "$CODEBUILD_BUILD_SUCCEEDING" && ./codecov -t $CODE_COV_TOKEN -F unittest || true
36+
- test -n "$CODE_COV_TOKEN" && test -n "$CODEBUILD_BUILD_SUCCEEDING" && ./codecov -t $CODE_COV_TOKEN -F codewhisperer || true
3637

3738
post_build:
3839
commands:

codecov.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
codecov:
55
notify:
66
require_ci_to_pass: no
7+
max_report_age: off
78

89
coverage:
910
precision: 2
@@ -20,6 +21,12 @@ coverage:
2021
only_pulls: true
2122
flags:
2223
- "unittest"
24+
codewhisperer:
25+
target: 75%
26+
paths:
27+
- "**/src/software/aws/toolkits/jetbrains/services/codewhisperer/*"
28+
flags:
29+
- "codewhisperer"
2330
patch:
2431
default:
2532
threshold: 1
@@ -41,3 +48,8 @@ ignore:
4148
- "sdk-codegen/**/*"
4249
- "jetbrains-rider/**/*.Generated.kt"
4350
- "**/TelemetryDefinitions.kt"
51+
52+
flags:
53+
codewhisperer:
54+
paths:
55+
- "**/src/software/aws/toolkits/jetbrains/services/codewhisperer/"

jetbrains-core/src/software/aws/toolkits/jetbrains/services/codewhisperer/service/CodeWhispererService.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,6 @@ class CodeWhispererService {
448448
}
449449

450450
private fun checkRecommendationsValidity(states: InvocationContext, showHint: Boolean): Boolean {
451-
val userInput = states.recommendationContext.userInputSinceInvocation
452451
val details = states.recommendationContext.details
453452

454453
// set to true when at least one is not discarded or empty

0 commit comments

Comments
 (0)