OSS プロジェクトを対象にしたコーディング規約違反発生状況の分析

Translated title of the contribution: Investigation of Coding Style Violation for OSS Projects

Masataka Nagura, Kentaro Suetsugu, Hideto Obara, Koichiro Sumi, Akihiro Asahara, Shingo Takada

Research output: Contribution to journalArticlepeer-review

Abstract

There are many coding standards (coding rules) which developers should comply with. However, this not always the case. In this paper, we report the results of investigating coding standard violations and their resolutions through means such as refactoring. The target of our study was the repositories of 1,000 OSS projects. We applied 87 coding standards that were implemented within Cpplint, which is a tool that checks for coding standard violations in programs written in the C++ language. The results showed that there are two types of rules: (1) rules that developers always comply with in a “common sense” way; (2) rules that developers are not conscious of and as a result does not comply with. In the first type of rules, violations did not occur very often, and even when they did, there was a strong tendency for them to be corrected. In the second type of rules, violations did occur often, and when they did, there was a strong tendency for them not to be corrected. We also investigated if such tendencies changed during the development process. We found that for certain rules which are automatically corrected by IDEs, there were significantly more projects where the tendency for compliance changes compared to other rules. This suggests that for rules where developers do not have a conscious understanding of complying, the auto-correct function of IDEs causes the compliance regardless of the developer's intent.

Translated title of the contributionInvestigation of Coding Style Violation for OSS Projects
Original languageJapanese
Pages (from-to)57-82
Number of pages26
JournalComputer Software
Volume40
Issue number1
DOIs
Publication statusPublished - 2023

ASJC Scopus subject areas

  • Software

Fingerprint

Dive into the research topics of 'Investigation of Coding Style Violation for OSS Projects'. Together they form a unique fingerprint.

Cite this