Move repeated sequences of operations into named helpers or utilities and reuse them.
duplication-complexitymaintainability+2
Low
Extract duplicated widget logic to reusable methods
Factor identical widget trees or builders into private helpers or dedicated widgets.
duplication-complexityreadability-refactor+1
Low
Extract magic numbers to named constants
Replace raw numeric/string literals used for dimensions, durations, and thresholds with named constants.
maintainabilityreadability-refactor+2
Low
Extract validation logic to separate methods
Centralize validation in dedicated functions/objects and reuse; return typed errors.
duplication-complexityerror-handling+1
Low
First sentence is a clear summary; document errors
The first sentence should be a standalone summary used by godoc. For functions returning error, state error conditions succinctly.
readability-refactormaintainability+1
Low
Fix variable shadowing in nested loops
Use distinct variable names across scopes; never reuse the outer loop variable in inner loops or comprehensions.
readability-refactorstack-python+1
Low
Full-word component names
Component names should prefer full words over abbreviations.
readability-refactorstack-vue+1
Low
Group related parameters in objects
Replace long parameter lists with request objects or records; validate them as a unit.
api-conventionsreadability-refactor
Low
Keep `try` Blocks Small and Focused
Detect `try` blocks that contain excessive code. Large `try` blocks make it harder to debug errors. Recommend narrowing the scope of the `try` block to only the necessary code.
error-handlingreadability-refactor+1
Low
Keep Functions/Methods Single-Responsibility
Write functions and methods so each does one well-defined task. If a function handles distinct steps (validation, processing, saving, notifying), refactor into smaller focused functions.
duplication-complexityreadability-refactor+1
Low
Keep Lines Under 80 Characters for Readability
Check if lines exceed 80 characters (excluding comments and docstrings). Long lines reduce readability. Recommend breaking lines or using line continuations for better formatting.
readability-refactorstack-python+1
Low
Limit Line Length to 120 Characters
Detect lines exceeding 120 characters and suggest breaking them into multiple lines for better readability.
readability-refactorstyle-conventions
Low
Limit lines to 80 characters
Ensure that lines do not exceed 80 characters. Long lines reduce readability, especially on smaller screens or during code reviews.
readability-refactorstyle-conventions
Low
Move large templates to external files
Store long static templates/prompts in files and load them at runtime; avoid embedding huge multi-line strings in code.
maintainabilityreadability-refactor+1
Low
Multi-attribute elements
Elements with multiple attributes should span multiple lines, with one attribute per line.
readability-refactorstack-vue+1
Low
One variable per declaration
Ensure that multiple variables are not declared in a single statement. This practice reduces readability and can introduce subtle bugs. Recommend declaring variables separately.
readability-refactorstyle-conventions
Low
Organize Class Members by Accessibility
Check if class members are grouped by accessibility (`public`, `protected`, `private`) to improve code readability and maintainability.
readability-refactorstyle-conventions
Low
Place Statements on Separate Lines
Ensure that multiple statements are not written on the same line. Each statement should be placed on a new line to improve readability.
readability-refactorstyle-conventions
Low
PREFER a noun phrase for a non-boolean property or variable
Ensure that non-boolean properties or variables are titled with noun phrases (e.g., `userDetails`, not `getUserDetails`). This improves readability.
readability-refactorstack-flutter+1
Low
Prefer arrow functions for callbacks
Use arrow functions (`=>`) for anonymous functions like callbacks (e.g., in lifecycle hooks, watchers, event handlers, array methods) instead of the `function` keyword, especially when needing lexical `this`.
readability-refactorstack-vue+1
Low
Prefer f-strings for String Formatting
Detect string formatting using `.format()` or `%`. These methods are less readable and slower than f-strings. Recommend converting string formatting to f-strings for better readability and performance.
performance-efficiencyreadability-refactor+2
Low
Prefer Named Classes Over Tuples
Ensure that titled classes are used instead of untitled tuples for complex data structures. Tuples should only be used when their purpose is immediately clear.
readability-refactorstyle-conventions
Low
Prefer Strict Comparisons (===) Over Loose (==)
Use strict comparison operators (=== and !==) instead of loose (== and !=) in most cases. Strict comparisons check both type and value, avoiding PHP’s implicit type coercion pitfalls.
readability-refactorstack-php+1
Low
PREFER using _, __, etc. for unused callback parameters
Check for functions with unused parameters and ensure they are titled with `_` or `__` to indicate they are intentionally unused.