#66

Use path terminology consistently and report path kind on violations

Openfelixarntzopened 3mo ago

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

0

No activity yet.