Skip to content

Commit

Permalink
Setup CodeWhisperer path in code coverage tool (aws#3488)
Browse files Browse the repository at this point in the history
Co-authored-by: Richard Li <[email protected]>
Co-authored-by: Richard Li <[email protected]>
  • Loading branch information
3 people authored Mar 1, 2023
1 parent bd78e12 commit 14b6666
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions buildspec/linuxTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ phases:
- CI_BUILD_ID="${CODEBUILD_BUILD_ID}"
- 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
- test -n "$CODE_COV_TOKEN" && test -n "$CODEBUILD_BUILD_SUCCEEDING" && ./codecov -t $CODE_COV_TOKEN -F unittest || true
- test -n "$CODE_COV_TOKEN" && test -n "$CODEBUILD_BUILD_SUCCEEDING" && ./codecov -t $CODE_COV_TOKEN -F codewhisperer || true

post_build:
commands:
Expand Down
12 changes: 12 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
codecov:
notify:
require_ci_to_pass: no
max_report_age: off

coverage:
precision: 2
Expand All @@ -20,6 +21,12 @@ coverage:
only_pulls: true
flags:
- "unittest"
codewhisperer:
target: 75%
paths:
- "**/src/software/aws/toolkits/jetbrains/services/codewhisperer/*"
flags:
- "codewhisperer"
patch:
default:
threshold: 1
Expand All @@ -41,3 +48,8 @@ ignore:
- "sdk-codegen/**/*"
- "jetbrains-rider/**/*.Generated.kt"
- "**/TelemetryDefinitions.kt"

flags:
codewhisperer:
paths:
- "**/src/software/aws/toolkits/jetbrains/services/codewhisperer/"
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,6 @@ class CodeWhispererService {
}

private fun checkRecommendationsValidity(states: InvocationContext, showHint: Boolean): Boolean {
val userInput = states.recommendationContext.userInputSinceInvocation
val details = states.recommendationContext.details

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

0 comments on commit 14b6666

Please sign in to comment.