Files
retoor 5a7c24f936 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

46 lines
730 B
Docker

FROM alpine:3.20 AS builder
RUN apk add --no-cache \
gcc \
musl-dev \
pcre-dev \
openssl-dev \
make \
git
WORKDIR /build
COPY . .
RUN make release \
&& strip bin/nimcheck
FROM alpine:3.20 AS runtime
RUN apk add --no-cache \
pcre \
openssl \
ca-certificates \
tzdata
ENV TZ=UTC
ENV NIMCHECK_LOG_LEVEL=info
ENV NIMCHECK_THREADS=4
RUN addgroup -g 1000 nimcheck \
&& adduser -D -u 1000 -G nimcheck nimcheck
COPY --from=builder /build/bin/nimcheck /usr/local/bin/nimcheck
RUN chmod 755 /usr/local/bin/nimcheck
WORKDIR /workspace
USER nimcheck
HEALTHCHECK --interval=30s --timeout=3s --retries=3 \
CMD nimcheck --version || exit 1
ENTRYPOINT ["nimcheck"]
CMD ["--help"]