Skip to content

Use path terminology consistently and report path kind on violations #66

Description

@felixarntz

Konsistent uses “file” for values that may be either files or directories: excludeFiles, for.files, diagnostic filePath, filesChecked, and “Checked N files.” This obscures what was matched and reported. Blocked by #65, which establishes the replacement terminology for the file-versus-directory distinction.

Relevant files:

  • packages/konsistent/src/config/schema.ts
  • packages/konsistent/src/core/runner.ts
  • packages/konsistent/src/core/diagnostics.ts
  • packages/konsistent/src/core/reporter.ts
  • docs/reference/configuration.md

Use “path” throughout, including excludePaths, for.paths, violation path, and pathsChecked. Add a separate violation property for the path kind established in #65 so consumers can distinguish file from directory without inferring it from the path.

Backward compatibility: internal names and documentation can be renamed or removed without compatibility shims. For konsistent.json changes, keep excludeFiles and for.files working with their existing behavior, mark them deprecated, and emit a non-failing CLI warning whenever they are used.

Activity

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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions