Manuscript Offprint

arXiv:2610.20027

LintEval: Benchmarking LLMs on Linter-Guided File Refactoring

Tongwei Deng, Jinyu Zhu, Yue Cao, Chenxu Wang, Yanzhen Zou, Bing Xie

Abstract

Linters are widely used in code maintenance and real-time IDE editing to surface lint alerts related to performance, style, error-prone, and other patterns in source files. However, existing code benchmarks do not explicitly evaluate linter-guided file refactoring, where models must reduce lint alerts in source files with correct initial functionality while satisfying functionality preservation. We introduce LintEval, a multilingual benchmark for linter-guided file refactoring across C++, Python, and Java, comprising 13,061 programs with correct initial functionality and 171,662 lint alerts extracted using language-specific linters. LintEval jointly evaluates functionality preservation, lint alert reduction, new alert avoidance, and edit minimality. Experiments reveal a persistent trade-off: closed-source commercial models reach up to 90.4% Reduction@P but achieve only 67.1%–68.3% Pass@1, while several open-source small models show low or negative Reduction@P. A controlled fine-tuning study further shows that supervision format matters: refactoring-oriented SFT raises Qwen2.5-Coder-7B Reduction@P from 24.7% to 76.0%. LintEval enables controlled evaluation of models that improve source files under functionality preservation.

Code: https://github.com/6643789wsx/LintEval

1 Introduction

Large Language Models (LLMs) have advanced many software-engineering tasks (Yang et al., 2025; Hui et al., 2024; Wang et al., 2024). Existing code benchmarks assess them through code generation from specifications (Chen et al., 2021; Jain et al., 2025; Tong and Zhang, 2024; Huang et al., 2024; Uniyal et al., 2024; He et al., 2024; Wang et al., 2023), automated debugging and repair (Zhang et al., 2026; Zhong et al., 2024; Tian et al., 2024; Bui et al., 2022), and non-functional requirements or refactoring beyond functional correctness (Singhal et al., 2024; Gautam et al., 2025).

Within the scope of functionality-preserving refactoring, linter-guided file refactoring remains under-explored despite its direct connection to developer workflows. Linters identify performance inefficiencies, style violations, and fine-grained risks within source files, and resolving these file-level alerts helps maintain code health and reduce technical debt (Christakis and Bird, 2016; Tómasdóttir et al., 2020; Zampetti et al., 2017; Beller et al., 2016; Borg et al., 2024). Because many alerts require context-sensitive changes, they provide a controlled setting for testing whether LLMs can resolve code-quality issues beyond fixed rule-based transformations (Venkatesh et al., 2024; Al-Bataineh and Moonen, 2022). However, despite the increasing use of static-analysis and code-quality feedback to improve model outputs (Dolcetti et al., 2026; Robeyns and Aitchison, 2025), existing benchmarks fail to jointly evaluate functionality preservation, lint alert reduction, new alert avoidance, and edit minimality.

We introduce LintEval, a large-scale, multilingual benchmark for linter-guided file refactoring (Figure 1, Table 1). To support rigorous functionality preservation, we curate 13,061 files across C++, Python, and Java from CodeContests+ (Wang et al., 2025), using algorithmic tasks not to mimic all production settings but to obtain high-coverage test oracles that detect subtle functionality preservation failures. Within these files, we identify 171,662 lint alerts.

We evaluate representative closed-source commercial and open-source models alongside rule-based baselines, and find that linter-guided file refactoring remains challenging for current models. Rule-based baselines resolve only 25.9% of lint alerts, while closed-source commercial models

†^{\dagger}Corresponding author.

Figure

Figure 1: The LintEval framework for linter-guided file refactoring. The pipeline systematically extracts lint alerts (L) from functionally correct programs (A) across multiple programming languages to evaluate LLM-driven revision. The resulting refactored file ( A′A' ) is evaluated across four dimensions, where quality metrics are strictly conditionalized on functionality preservation to ensure new alert avoidance and edit minimality.

BenchmarkInitial FunctionalityMultilingualLint Alerts
Code Generation
HumanEvalNone✕✕
MBPPNone✕✕
CodeContestsNone✓✕
Bug Repair
Defects4JIncorrect✕✕
QuixBugsIncorrect✕✕
DebugBenchIncorrect✕✕
Code Refactoring
RefactorBenchCorrect✕✕
LintEval (Ours)Correct✓✓

Table 1: Comparison with existing benchmarks.

prioritize lint alert reduction at the cost of functionality preservation, introducing functional regressions in over 31% of samples; a pronounced cross-lingual disparity also persists (e.g., DeepSeek-v3.2 falls from 76.6% Reduction@P on C++ to 63.7% on Java). A controlled fine-tuning study shows that explicit lint alerts in the training format, rather than exposure to cleaner code alone, are central to this capability: refactoring-oriented supervision raises Qwen2.5-Coder-7B from 24.7% to 76.0% Reduction@P.

Core contributions are summarized as follows:

  • Benchmark: We introduce LintEval, a large-scale, multilingual benchmark for linter-guided file refactoring, featuring 13,061 files and 171,662 lint alerts to evaluate lint alert reduction by LLMs under strict functionality preservation.

  • Empirical Analysis: Through extensive evaluation of representative models and training settings, we map model boundaries: closed- source commercial models prioritize lint alert reduction over functionality preservation, while open-source models show cross-language and alert-category weaknesses.

  • Fine-Tuning Study: We demonstrate that while generation-oriented training does not reliably improve linter-guided file refactoring, refactoring-oriented data formatting substantially narrows the gap between open-source models and closed-source commercial models on this task.