여전히 수동인가? DSL 기반 LLM 컴파일을 통한 자동화된 린터 구성: 코딩 표준
Still Manual? Automated Linter Configuration via DSL-Based LLM Compilation of Coding Standards
코딩 표준은 팀 및 프로젝트 전반에 걸쳐 일관성 있고 고품질의 코드를 유지하는 데 필수적입니다. 린터는 개발자가 코딩 표준을 준수하도록 돕기 위해 코드 위반을 감지합니다. 그러나 수동 린터 구성은 복잡하고 전문 지식이 필요하며, 프로그래밍 언어, 코딩 표준 및 린터의 다양성과 진화로 인해 반복적이고 유지 관리가 필요한 구성 작업이 발생합니다. 이러한 수동 노력을 줄이기 위해, 우리는 LintCFG를 제안합니다. LintCFG는 프로그래밍 언어, 코딩 표준 및 린터에 독립적으로 코딩 표준에 대한 린터 구성 생성을 자동화하는, 도메인 특화 언어(DSL) 기반의 LLM 컴파일 접근 방식입니다. 컴파일러 설계에서 영감을 받아, 우리는 도구에 독립적이고, 구조화되어 있으며, 읽기 쉽고, 정확한 방식으로 코딩 규칙을 표현할 수 있는 DSL을 설계합니다. 그런 다음, DSL 구성 지침을 사용하여 린터 구성을 생성합니다. 주어진 자연어 코딩 표준에 대해, 컴파일 프로세스는 이를 DSL 코딩 표준으로 파싱하고, DSL 구성 지침과 매칭하여 구성 이름, 옵션 이름 및 값을 설정하고, 표준과 구성 간의 일관성을 검증하고, 마지막으로 린터별 구성을 생성합니다. Java 코딩 표준을 위한 Checkstyle을 사용한 실험 결과, 우리의 접근 방식은 DSL 표현에서 90% 이상의 정확도와 재현율을 달성했으며, 세분화된 린터 구성 생성에서 정확도, 정밀도, 재현율 및 F1 점수가 약 70%에 가까운 수치를 보였습니다 (일부에서는 70%를 초과). 주목할 만한 점은, 우리의 접근 방식이 기준 모델보다 정밀도 측면에서 100% 이상 우수하다는 것입니다. 사용자 연구 결과, 우리의 접근 방식이 개발자가 코딩 표준을 위한 린터를 구성하는 효율성을 향상시키는 것으로 나타났습니다. 마지막으로, 우리는 JavaScript 코딩 표준을 위한 ESLint 구성을 생성하여 이 접근 방식의 일반성을 보여주었으며, 이는 다른 프로그래밍 언어, 코딩 표준 및 린터에도 광범위하게 적용될 수 있음을 입증합니다.
Coding standards are essential for maintaining consistent and high-quality code across teams and projects. Linters help developers enforce these standards by detecting code violations. However, manual linter configuration is complex and expertise-intensive, and the diversity and evolution of programming languages, coding standards, and linters lead to repetitive and maintenance-intensive configuration work. To reduce manual effort, we propose LintCFG, a domain-specific language (DSL)-driven, LLM-based compilation approach to automate linter configuration generation for coding standards, independent of programming languages, coding standards, and linters. Inspired by compiler design, we first design a DSL to express coding rules in a tool-agnostic, structured, readable, and precise manner. Then, we build linter configurations into DSL configuration instructions. For a given natural language coding standard, the compilation process parses it into DSL coding standards, matches them with the DSL configuration instructions to set configuration names, option names and values, verifies consistency between the standards and configurations, and finally generates linter-specific configurations. Experiments with Checkstyle for Java coding standard show that our approach achieves over 90% precision and recall in DSL representation, with accuracy, precision, recall, and F1-scores close to 70% (with some exceeding 70%) in fine-grained linter configuration generation. Notably, our approach outperforms baselines by over 100% in precision. A user study further shows that our approach improves developers' efficiency in configuring linters for coding standards. Finally, we demonstrate the generality of the approach by generating ESLint configurations for JavaScript coding standards, showcasing its broad applicability across other programming languages, coding standards, and linters.
No Analysis Report Yet
This paper hasn't been analyzed by Gemini yet.