Code Smell Detection in Infrastructure As Code

IaC has been gaining popularity in recent years, because of its use in being able to maintain many systems with different architectures, software versions and configuration settings, by being faster, more reliable, repeatable and better testable. Since IaC practices treat configuration code similar to software code we should also care about configuration code quality, which is currently especially in industry, but also in academics, not a topic. An aspect to indicate code quality or at least to show flaws concerning e.g. maintainability are code smells. Based on a paper – respectively the only one in this area – which mapped and evaluated code smells for the IaC language Puppet, we alter and apply 10 of the most occurring smells to the IaC language Chef and furthermore map common smells out of software engineering. This conceptual part is rounded off by implementing those smells in rules using a tool called Foodcritic and finally applying them to the official Chef supermarket and the Kisters supermarket to evaluate and compare the quality and saliences of each supermarket.