Locating Style Violations in Automated Code Review for Go
Mathematical Modeling and Computing · 2026 · 13 (4) · 1076-1088
DOI: 10.23939/mmc2026.04.1076 ↗Kurz gefasst
Fachartikel in der Zeitschrift Mathematical Modeling and Computing, 2026. Verfasst von A. I. Holovko. Die Arbeit nennt 29 Literaturangaben.
Abstract (Originalsprache)
Most automated code review tools, whether rule-based or learned, analyze a syntax tree or a token sequence rather than the source text itself. Yet editors modify that text when applying suggested fixes. Detecting a style violation is therefore not enough: a report must identify the exact code fragment it concerns. This paper defines correctness requirements (contracts) and test procedures for two tasks: selecting program elements that require correction under a style policy, and determining, in the source file, the exact boundaries of the fragment where that correction is to be applied. The proposed tests compare reports and fragment boundaries with expected results defined independently of the implementation. Both requirements were checked using reports produced by the developed analyzer on Go test files. An audit of fragment boundaries showed that an inaccuracy in Go's standard library can cause the reported fragment of a block comment containing a carriage return to omit its final byte; deleting that fragment leaves syntactically invalid code. Tested versions of three widely used Go code analysis tools also exhibited this block-comment boundary error inherited from the standard library. Tool developers can use the proposed contracts and procedures in regression testing to distinguish selection errors from boundary errors and check these boundaries before applying suggested fixes.
Zitieren
APA
Holovko, A. I. (2026). Locating Style Violations in Automated Code Review for Go. Mathematical Modeling and Computing, 13(4), 1076-1088. https://doi.org/10.23939/mmc2026.04.1076
Vancouver
Holovko AI. Locating Style Violations in Automated Code Review for Go. Mathematical Modeling and Computing. 2026;13(4):1076-1088. doi:10.23939/mmc2026.04.1076
BibTeX
@article{Holovko2026,
author = {Holovko, A. I.},
title = {Locating Style Violations in Automated Code Review for Go},
journal = {Mathematical Modeling and Computing},
year = {2026},
volume = {13},
number = {4},
pages = {1076--1088},
doi = {10.23939/mmc2026.04.1076}
}
EUVIMED