Retoor software development Projects Research SearchXNG
Register Sign In

40 lines
500 B
Swift
Raw Normal View History

feat: add extended language validators and fix tokenizer crash bugs Expand nimcheck with validators and tokenizers for C, C++, C#, Go, Rust, Ruby, CSS, SQL, Markdown, Dockerfile, Makefile, Kotlin, Lua, Swift, TypeScript, and XML. Register all flavors in the validator factory and improve auto-detection scoring for the new languages. Fix infinite tokenizer loops that caused OOM kills: closeBracket now advances position, finishTokenizeStep guards stalled tokenization, and Jinja/JS tokenizers no longer double-advance on brackets. Fix block-balance false positives in Lua (for/do) and Ruby (postfix unless), SQL trailing-comma detection across whitespace, and Makefile tab literals in test fixtures.
2026-07-15 06:49:45 +02:00
import Foundation
struct Broken {
let x: Int
let name: String
}
class BadRepo {
private var items: [Int: String] = [:]
func add(key: Int, item: String) {
items[key] = item
}
func show() {
print("hello")
let x = 5
print(x)
}
}
let s = "unclosed string
print(s)
let x = 5
if x > 0 {
print("positive")
func missingReturn() -> Int {
let a = 5
}
let list = [1, 2, 3
print(list)
func badFunction() {
let y = 5
print(y)
}
Reference in New Issue Copy Permalink
f3ad8e64c8
nimcheck/tests/fixtures/swift/invalid.swift
Response time: 97ms
Mail Licenses API