Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify handling of inputs from files #1179

Closed
BernieWhite opened this issue Jul 23, 2022 · 0 comments · Fixed by #1830
Closed

Simplify handling of inputs from files #1179

BernieWhite opened this issue Jul 23, 2022 · 0 comments · Fixed by #1830
Assignees
Labels
breaking-change Changes that affect existing functionality enhancement New feature or request
Milestone

Comments

@BernieWhite
Copy link
Member

BernieWhite commented Jul 23, 2022

Currently input from files is processed in two ways:

  • As object by using -Format Detect or specific formats such as Json, Yaml, etc...
    • This option reads objects from supported file formats.
  • As file by using -Format File.
  • This option treats files as objects themselves. It doesn't inspect the contents of the files directly however because the file objects are passed through the pipeline conventions can perform additional processing on each file to read or expands objects found within each file.
  • This option also emits repository information as an object.
  • This option also observes .gitignore and Input.PathIgnore options.
  • Files as objects often generate not processed warnings since repositories may not contain any rules that handle file objects directly.

How these options is often a source of confusion and they are not compatible which each other.

We should consolidate these two options into a single input discovery process that is flexible to address the benefits of each method.

Note: Also this should avoid unnecessary warnings that are generated about unprocessed files.

The new discovery process might look like this.

  • Scan for input files based on input path.
  • Apply filters:
    • Exclude .gitignore path specs.
    • Exclude Input.PathIgnore path specs.
    • Custom filtering.
  • Apply expansion:
    • Built-in expansion of supported file types.
    • Custom expansion.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change Changes that affect existing functionality enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant