// library
Severity
Bucket
Move long/branchy UI decisions into named predicates or mappers to keep build methods simple.
Move long conditional expressions to well-named predicate methods.
Keep migrations readable by extracting multi-step data fixes to helper methods within the migration.
Move magic values (strings, thresholds, paths) to module-level constants with descriptive names.
Move domain-specific processing (validation, normalization, mapping) into cohesive services instead of scattering it across controllers/handlers.
Factor repeated HTTP call setup/parsing/retry into a reusable helper or client.
Move repeated domain rules into reusable methods/services; keep controllers and handlers thin.
Move repeated domain calculations/transformations into named functions or service classes; keep controllers/scripts thin.
Move domain behavior from controllers/views into models or service objects.
When the same set of attribute/field names is used in multiple places (strong params, serializers, queries), extract it to a constant and reuse.
Factor common interaction/message handling into reusable functions or classes with parameters for the differing bits.
Duplicate sequences of statements must be extracted into a named function or utility.
Move repeated sequences of operations into named helpers or utilities and reuse them.
For HTTP/RPC handlers, parse+validate inputs in dedicated functions. Return typed errors and reuse across endpoints.
Factor identical widget trees or builders into private helpers or dedicated widgets.
Parameterize tool/runtime versions via ARGs (and CI build args) instead of hardcoding them across multiple Dockerfiles.
Replace raw numeric/string literals used for dimensions, durations, and thresholds with named constants.
Define SQL strings as static final constants or in a repository, not inline across methods.
Centralize queue names and reuse across workers and tests.
Centralize validation in dedicated functions/objects and reuse; return typed errors.
Check if file titles follow the lowercase naming convention with underscores or dashes. This improves cross-platform compatibility and consistency.
Use $dontFlash in app/Http/Middleware/TrimStrings.php or logging processors to redact 'password', 'token', 'ssn', and emails.
The first sentence should be a standalone summary used by godoc. For functions returning error, state error conditions succinctly.
Keep public types in files with matching names (one top-level type per file) to improve navigation.
553–576 of 808