Skip to content

chore: 84 pre-existing PHPCS lint errors across 95 files — establish baseline #503

@chubes4

Description

@chubes4

Summary

Running homeboy lint data-machine reports 84 errors and 147 warnings across 95 of 339 files. These are all pre-existing and not introduced by any recent changes.

Top violations

WordPress.DB.PreparedSQL.NotPrepared                       35
Generic.CodeAnalysis.UnusedFunctionParameter.Found         34
Generic.CodeAnalysis.UnusedFunctionParameter.FoundAfterLastUsed    18
WordPress.PHP.YodaConditions.NotYoda                       18
WordPress.DB.PreparedSQL.InterpolatedNotPrepared           14
Generic.Formatting.MultipleStatementAlignment.NotSameWarning    14
Universal.NamingConventions.NoReservedKeywordParameterNames.defaultFound    14
WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents    11
Universal.Operators.DisallowShortTernary.Found             10
WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned    10

Options

  1. Batch auto-fix first — 29 of the 84 errors are auto-fixable with homeboy lint data-machine --fix
  2. Incremental cleanup — Fix one violation category at a time (e.g. YodaConditions, short ternaries, alignment)
  3. PHPCS baseline — Annotate known violations so new code is held to the standard without noise from old violations

Impact

This prevents using lint as a CI/PR gate since there's no way to distinguish new violations from pre-existing ones.

Related: Extra-Chill/homeboy#367 (tracking from homeboy side)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions