Repository navigation
Expand file tree
/
Copy pathmiss_hit.cfg
More file actions
35 lines (32 loc) · 1.8 KB
/
Copy pathmiss_hit.cfg
File metadata and controls
35 lines (32 loc) · 1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Style guide configuration for MISS_HIT
# Reference: https://florianschanda.github.io/miss_hit/style_checker.html
# Format check parameters:
# Maximum allowed length for a single line of code (in characters)
# Helps maintain code readability without unnecessary horizontal scrolling.
line_length: 1000
# Number of spaces a single tab corresponds to
# Ensures consistent indentation throughout the codebase.
tab_width: 2
# Regular expression for function names
# Enforces CamelCase naming convention: starts with lower case, then each word starts with an uppercase letter, no underscores.
regex_function_name: "[a-z][a-zA-Z0-9]*([A-Z][a-z0-9]*)*"
# Regular expression for script file names
# Enforces CamelCase naming convention: starts with lower case, then each word starts with an uppercase letter, no underscores.
regex_script_name: "[a-z][a-zA-Z0-9]*([A-Z][a-z0-9]*)*"
# Regular expression for parameter (variable) names
regex_parameter_name: "([A-Za-z0-9\-\_]+)"
# Metrics for code quality
# "cnest" (Control Nesting Depth): Maximum allowed nesting level of control structures (e.g., loops, conditionals)
# Helps reduce code complexity and improve maintainability.
metric "cnest": limit 6
# "file_length": Maximum allowed number of lines in a single file
# Keeps files manageable and easier to navigate.
metric "file_length": limit 1000
# "cyc" (Cyclomatic Complexity): Maximum allowed complexity of a single function
# A lower value ensures that functions remain simple and focused.
metric "cyc": limit 55
# "parameters": Maximum allowed number of parameters for a single function
# Encourages simpler function signatures and improves readability.
metric "parameters": limit 29
# A boolean, by default true. This controls if the rule also checks comments and continuations, not just program text.
enforce_encoding_comments: false