GCC Code Coverage Report


Directory: ../
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 100.0% 1 / 0 / 1
Functions: 100.0% 1 / 0 / 1
Branches: -% 0 / 0 / 0

src/linter/rules/TooManyParametersRule.h
Line Branch Exec Source
1 // Copyright (c) 2021-2026 ChilliBits. All rights reserved.
2
3 #pragma once
4
5 #include <linter/LintRule.h>
6
7 namespace spice::compiler {
8
9 /**
10 * Flags functions/procedures with more parameters than a caller can reasonably keep straight at a
11 * call site. A style/maintainability check (grouping related parameters into a struct is usually
12 * the fix), not a correctness one, so it lives in `spice lint` rather than as a compiler warning.
13 */
14 class TooManyParametersRule final : public LintRule {
15 public:
16 8 [[nodiscard]] constexpr std::string_view id() const override { return "too-many-parameters"; }
17
18 void checkFctDef(FctDefNode *node, std::vector<LintFinding> &findings) override;
19 void checkProcDef(ProcDefNode *node, std::vector<LintFinding> &findings) override;
20 };
21
22 } // namespace spice::compiler
23