The Impact of Compiler Warnings on Code Quality in C++ Projects
Saved in:
| Title: | The Impact of Compiler Warnings on Code Quality in C++ Projects |
|---|---|
| Authors: | Johansson, Albin, Holmberg, Carl, Gomes, Francisco, 1987, Leitner, Philipp, 1982 |
| Source: | Utvecklarfokuserad prestandaförbättring för programvaruingenjörer 32nd IEEE/ACM International Conference on Program Comprehension, ICPC 2024, Lisbon, Portugal IEEE International Conference on Program Comprehension. :270-279 |
| Subject Terms: | Code Quality, Compiler Warnings, Bayesian Data Analysis |
| Description: | Modern compilers often offer a variety of warning flags, which developers can enable to get feedback on code that, while syntactically correct, may be problematic. In the case of C++, one example of such 'correct but problematic' code is code that leads to undefined behavior (UB). The usage of compiler warnings has long been suspected as a way to decrease bugs and increase code quality. However, empirical evidence that supports this hypothesis is rare. In this study, we present evidence from a study of 127 open source C++ projects. We categorize their usage of compiler warnings into five groups based on which warning flags are being used, and analyse the relationship between compiler warnings and five quality metrics (bugs, critical issues, vulnerabilities, code smells, and technical debt) using Bayesian analysis. We conclude that, in general, compiler warnings indeed correlate with, and potentially cause, higher code quality, with the clearest impact being on the number of critical issues in a project. Using stricter warning flags expectantly correlates with higher code quality in our study objects. However, there are substantial differences between projects, which we attribute to the project's individual development culture. That is, while warnings matter, other factors such as quality culture, are likely to be even more important to source code quality. |
| File Description: | electronic |
| Access URL: | https://research.chalmers.se/publication/541819 https://research.chalmers.se/publication/541819/file/541819_Fulltext.pdf |
| Database: | SwePub |
| FullText | Text: Availability: 0 CustomLinks: – Url: https://research.chalmers.se/publication/541819# Name: EDS - SwePub (s4221598) Category: fullText Text: View record in SwePub – Url: https://resolver.ebscohost.com/openurl?sid=EBSCO:edsswe&genre=article&issn=26437147&ISBN=&volume=&issue=&date=20240101&spage=270&pages=270-279&title=Utvecklarfokuserad prestandaförbättring för programvaruingenjörer 32nd IEEE/ACM International Conference on Program Comprehension, ICPC 2024, Lisbon, Portugal IEEE International Conference on Program Comprehension&atitle=The%20Impact%20of%20Compiler%20Warnings%20on%20Code%20Quality%20in%20C%2B%2B%20Projects&aulast=Johansson%2C%20Albin&id=DOI:10.1145/3643916.3644410 Name: Full Text Finder Category: fullText Text: Full Text Finder Icon: https://imageserver.ebscohost.com/branding/images/FTF.gif MouseOverText: Full Text Finder – Url: https://www.webofscience.com/api/gateway?GWVersion=2&SrcApp=EBSCO&SrcAuth=EBSCO&DestApp=WOS&ServiceName=TransferToWoS&DestLinkType=GeneralSearchSummary&Func=Links&author=Johansson%20A Name: ISI Category: fullText Text: Nájsť tento článok vo Web of Science Icon: https://imagesrvr.epnet.com/ls/20docs.gif MouseOverText: Nájsť tento článok vo Web of Science |
|---|---|
| Header | DbId: edsswe DbLabel: SwePub An: edsswe.oai.research.chalmers.se.5522292d.931c.47a9.8d70.e93d4466be7a RelevancyScore: 986 AccessLevel: 6 PubType: Conference PubTypeId: conference PreciseRelevancyScore: 986.415405273438 |
| IllustrationInfo | |
| Items | – Name: Title Label: Title Group: Ti Data: The Impact of Compiler Warnings on Code Quality in C++ Projects – Name: Author Label: Authors Group: Au Data: <searchLink fieldCode="AR" term="%22Johansson%2C+Albin%22">Johansson, Albin</searchLink><br /><searchLink fieldCode="AR" term="%22Holmberg%2C+Carl%22">Holmberg, Carl</searchLink><br /><searchLink fieldCode="AR" term="%22Gomes%2C+Francisco%22">Gomes, Francisco</searchLink>, 1987<br /><searchLink fieldCode="AR" term="%22Leitner%2C+Philipp%22">Leitner, Philipp</searchLink>, 1982 – Name: TitleSource Label: Source Group: Src Data: <i>Utvecklarfokuserad prestandaförbättring för programvaruingenjörer 32nd IEEE/ACM International Conference on Program Comprehension, ICPC 2024, Lisbon, Portugal IEEE International Conference on Program Comprehension</i>. :270-279 – Name: Subject Label: Subject Terms Group: Su Data: <searchLink fieldCode="DE" term="%22Code+Quality%22">Code Quality</searchLink><br /><searchLink fieldCode="DE" term="%22Compiler+Warnings%22">Compiler Warnings</searchLink><br /><searchLink fieldCode="DE" term="%22Bayesian+Data+Analysis%22">Bayesian Data Analysis</searchLink> – Name: Abstract Label: Description Group: Ab Data: Modern compilers often offer a variety of warning flags, which developers can enable to get feedback on code that, while syntactically correct, may be problematic. In the case of C++, one example of such 'correct but problematic' code is code that leads to undefined behavior (UB). The usage of compiler warnings has long been suspected as a way to decrease bugs and increase code quality. However, empirical evidence that supports this hypothesis is rare. In this study, we present evidence from a study of 127 open source C++ projects. We categorize their usage of compiler warnings into five groups based on which warning flags are being used, and analyse the relationship between compiler warnings and five quality metrics (bugs, critical issues, vulnerabilities, code smells, and technical debt) using Bayesian analysis. We conclude that, in general, compiler warnings indeed correlate with, and potentially cause, higher code quality, with the clearest impact being on the number of critical issues in a project. Using stricter warning flags expectantly correlates with higher code quality in our study objects. However, there are substantial differences between projects, which we attribute to the project's individual development culture. That is, while warnings matter, other factors such as quality culture, are likely to be even more important to source code quality. – Name: Format Label: File Description Group: SrcInfo Data: electronic – Name: URL Label: Access URL Group: URL Data: <link linkTarget="URL" linkTerm="https://research.chalmers.se/publication/541819" linkWindow="_blank">https://research.chalmers.se/publication/541819</link><br /><link linkTarget="URL" linkTerm="https://research.chalmers.se/publication/541819/file/541819_Fulltext.pdf" linkWindow="_blank">https://research.chalmers.se/publication/541819/file/541819_Fulltext.pdf</link> |
| PLink | https://erproxy.cvtisr.sk/sfx/access?url=https://search.ebscohost.com/login.aspx?direct=true&site=eds-live&db=edsswe&AN=edsswe.oai.research.chalmers.se.5522292d.931c.47a9.8d70.e93d4466be7a |
| RecordInfo | BibRecord: BibEntity: Identifiers: – Type: doi Value: 10.1145/3643916.3644410 Languages: – Text: English PhysicalDescription: Pagination: PageCount: 10 StartPage: 270 Subjects: – SubjectFull: Code Quality Type: general – SubjectFull: Compiler Warnings Type: general – SubjectFull: Bayesian Data Analysis Type: general Titles: – TitleFull: The Impact of Compiler Warnings on Code Quality in C++ Projects Type: main BibRelationships: HasContributorRelationships: – PersonEntity: Name: NameFull: Johansson, Albin – PersonEntity: Name: NameFull: Holmberg, Carl – PersonEntity: Name: NameFull: Gomes, Francisco – PersonEntity: Name: NameFull: Leitner, Philipp IsPartOfRelationships: – BibEntity: Dates: – D: 01 M: 01 Type: published Y: 2024 Identifiers: – Type: issn-print Value: 26437147 – Type: issn-print Value: 26437171 – Type: issn-locals Value: SWEPUB_FREE – Type: issn-locals Value: CTH_SWEPUB Titles: – TitleFull: Utvecklarfokuserad prestandaförbättring för programvaruingenjörer 32nd IEEE/ACM International Conference on Program Comprehension, ICPC 2024, Lisbon, Portugal IEEE International Conference on Program Comprehension Type: main |
| ResultId | 1 |
Full Text Finder
Nájsť tento článok vo Web of Science