Skip to main content
Download PDF
- Main
LLMs for Code Style Analysis an Exploratory Study for Integrating Style Linters with LLMs
- Dodor, Ella
- Advisor(s): Lopes, Cristina
Abstract
Recent advances in Large Language Models (LLMs) have opened new horizons, especially in code quality. This paper explores the capabilities of LLMs, such as the GPT-4 model, to identify and enforce code style. We compare LLMs to state-of-the-art linters in Python and Java, feeding them Python and Java code samples with various style deviations and analyzing their performance. The findings reveal a high potential for these tools to be used complementarily. Linters demonstrated strength in identifying well-defined, rule-based formatting guidelines, and LLMs identified higher-level, more conceptual violations, that required an understanding of the code or the guideline.