#[allow(unused_imports)]
use crate::linter::LintResult;
pub fn check(_source: &str) -> LintResult {
LintResult::new()
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_sc2214_placeholder() {
let code = r#"while getopts "a:b:c" opt; do"#;
let result = check(code);
assert_eq!(result.diagnostics.len(), 0); }
#[test]
fn test_sc2214_invalid_char_ok() {
let code = r#"while getopts "a-b" opt; do"#;
let result = check(code);
assert_eq!(result.diagnostics.len(), 0); }
#[test]
fn test_sc2214_standalone_colon_ok() {
let code = r#"while getopts "a:" opt; do"#;
let result = check(code);
assert_eq!(result.diagnostics.len(), 0); }
#[test]
fn test_sc2214_double_colon_ok() {
let code = r#"while getopts "a::" opt; do"#;
let result = check(code);
assert_eq!(result.diagnostics.len(), 0); }
#[test]
fn test_sc2214_leading_colon_ok() {
let code = r#"while getopts ":abc" opt; do"#;
let result = check(code);
assert_eq!(result.diagnostics.len(), 0); }
#[test]
fn test_sc2214_numbers_ok() {
let code = r#"while getopts "123" opt; do"#;
let result = check(code);
assert_eq!(result.diagnostics.len(), 0); }
#[test]
fn test_sc2214_mixed_case() {
let code = r#"while getopts "aAbBcC" opt; do"#;
let result = check(code);
assert_eq!(result.diagnostics.len(), 0); }
#[test]
fn test_sc2214_special_char_ok() {
let code = r#"while getopts "a$b" opt; do"#;
let result = check(code);
assert_eq!(result.diagnostics.len(), 0); }
#[test]
fn test_sc2214_comment() {
let code = r#"# while getopts "abc" opt; do"#;
let result = check(code);
assert_eq!(result.diagnostics.len(), 0);
}
#[test]
fn test_sc2214_variable_optstring() {
let code = r#"while getopts "$opts" opt; do"#;
let result = check(code);
assert_eq!(result.diagnostics.len(), 0); }
}