Skip to content

Docs: package-lock.json age warnings are also not scored in the slop index #109

Open

Description

@CodeDeficient

The README ("not tests or package.json") and the CHANGELOG entry for the slop index say package-age warnings from package.json are reported but not scored. package-lock.json goes through the same path: analyzeFile returns early for every manifest before recording line counts, so lockfile findings aren't scored either.

Fix: say "package.json or package-lock.json" in both places.

Found by /review of 2548a62 (P3, shipped with the slop index PR).

Activity

  1. coderabbitai commented on Oct 26, 2026

    @coderabbitai
    🔗 Related PRs

    #34 - Rebuild KarpeSlop's rules on the AST and real import resolution [merged]


    📝 Issue Planner

    Check the box below or use the @coderabbitai plan command to generate an implementation plan and prompts that you can use with your favorite coding assistant.

    • Create Plan

    🧪 Issue enrichment is currently in open beta.

    You can configure auto-planning by selecting labels in the issue_enrichment configuration.

    To disable automatic issue enrichment, add the following to your .coderabbit.yaml:

    issue_enrichment:
      auto_enrich:
        enabled: false

    💬 Have feedback or questions? Drop into our discord!

  2. CodeDeficient commented on Oct 26, 2026

    @CodeDeficient
    OwnerAuthor

    The same README sentence also understates which files the slop index leaves out. The filter is isNonProductionPath, which skips stories, examples, benchmarks (bench, perf-measures), fixtures, e2e and runtime-tests as well as tests. Suggested wording: "findings in application code only, not tests, fixtures, examples, benchmarks or package manifests".

    Found by /review of #108 (P3).

  3. CodeDeficient commented on Oct 26, 2026

    @CodeDeficient
    OwnerAuthor

    More slop-index wording from /review of 57cfcd7 (P3, shipped in 2.0.0). All three are in the CHANGELOG's "Upgrading from 1.x" section:

    • It says slopIndex has "a score per axis (noise, lies, soul) and a total", which reads like slopIndex.noise. The shape is slopIndex.axes[] ({ axis, score, rules }) plus slopIndex.total. Name the paths.
    • "per 1,000 lines of application code" reads as if the score is a rate. The findings are normalized per 1,000 lines, and the score is weight × ln(1 + that density) summed per axis.
    • "--fail-on=low to keep failing on everything" leaves out the exception: fresh_package_version warnings never fail a run.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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