-
Notifications
You must be signed in to change notification settings - Fork 0
π‘οΈ Sentinel: [MEDIUM] readline μ λ ₯ μ μ μ μ€λ²νλ‘μ° λ°©μ§ μ ν¨μ± κ²μ¬ μμ #302
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
π‘οΈ Sentinel: [MEDIUM] readline μ λ ₯ μ μ μ μ€λ²νλ‘μ° λ°©μ§ μ ν¨μ± κ²μ¬ μμ #302
Changes from all commits
478b591
11de87c
73347a9
d79e7bd
f4c9656
dd88f96
ba8b18c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| {"MD013": false, "MD022": false, "MD041": false} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -141,7 +141,7 @@ autoFIPC <- | |
| } | ||
| for (attempt in seq_len(3)) { | ||
| n <- readline(prompt = "Is it correct? (1: Yes 2: No) : ") | ||
| if (grepl("^[0-9]+$", n)) { | ||
| if (grepl("^[12]$", n)) { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. π Info: Prompt input handling behavior change Tightening the accepted input from any digits to only Was this helpful? React with π or π to provide feedback. |
||
| return(as.integer(n)) | ||
| } | ||
| } | ||
|
|
@@ -171,7 +171,7 @@ autoFIPC <- | |
| readline( | ||
| prompt = "Do you want to use default BILOG-MG priors for oldform Data? (1: Yes 2: No) : " | ||
| ) | ||
| if (grepl("^[0-9]+$", n)) { | ||
| if (grepl("^[12]$", n)) { | ||
| return(as.integer(n)) | ||
| } | ||
| } | ||
|
|
@@ -390,7 +390,7 @@ autoFIPC <- | |
| readline( | ||
| prompt = "Do you want to use default BILOG-MG priors for newform Data? (1: Yes 2: No) : " | ||
| ) | ||
| if (grepl("^[0-9]+$", n)) { | ||
| if (grepl("^[12]$", n)) { | ||
| return(as.integer(n)) | ||
| } | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π Maintainability & Code Quality | π‘ Minor | β‘ Quick win
μΈ μ λ ₯ λΆκΈ°μ νμ©κ° κ³μ½μ νκ· ν μ€νΈλ‘ κ³ μ ν΄ μ£ΌμΈμ.
tests/testthat/test-autoFIPC.Rμ μ 곡λ ν μ€νΈλ λΉλνν μ€λ₯λ§ νμΈν©λλ€.checkCorrect(),checkoldformBILOGprior(),checknewformBILOGprior()μμ"1"κ³Ό"2"κ° ν΅κ³Όνκ³ ,"0","3", λΉ λ¬Έμμ΄ λ° λ§€μ° κΈ΄ μ«μ λ¬Έμμ΄μ΄ κ±°λΆλλμ§ ν μ€νΈλ₯Ό μΆκ°ν΄ μ£ΌμΈμ.As per coding guidelines:
**/*: βAdd tests/fixtures first when behavior changes are required.βAlso applies to: 174-174, 393-393
π€ Prompt for AI Agents
Source: Coding guidelines