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

Capture unrecognized fields with lint #851

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open

Capture unrecognized fields with lint #851

wants to merge 16 commits into from

Commits on Aug 26, 2024

  1. WIP: Updating spec deserialize method to handle lints.

    Signed-off-by: Nichol Yip <nyip@imageworks.com>
    Nichol Yip committed Aug 26, 2024
    Configuration menu
    Copy the full SHA
    9f5e86a View commit details
    Browse the repository at this point in the history
  2. Added LintedSpec type to return lint warnings

    Signed-off-by: Nichol Yip <nyip@imageworks.com>
    Nichol Yip committed Aug 26, 2024
    Configuration menu
    Copy the full SHA
    1b48468 View commit details
    Browse the repository at this point in the history
  3. Implemented lint for the top level of the spec config

    Signed-off-by: Nichol Yip <nyip@imageworks.com>
    Nichol Yip committed Aug 26, 2024
    Configuration menu
    Copy the full SHA
    8171994 View commit details
    Browse the repository at this point in the history
  4. Added lints for InstallSpec

    Signed-off-by: Nichol Yip <nyip@imageworks.com>
    
    Fixed error message when no similar configs are found.
    
    Added linting for EnvOp
    
    Signed-off-by: Nichol Yip <nyip@imageworks.com>
    
    Removed redudancy and simplified code.
    
    WIP: Generalizing LintedItem struct across all config types.
    
    Signed-off-by: Nichol Yip <nyip@imageworks.com>
    
    Added blanket implementation for LintedItem to generalize lints across all configs
    
    Signed-off-by: Nichol Yip <nyip@imageworks.com>
    
    Moved lint logic into separate file.
    
    Signed-off-by: Nichol Yip <nyip@imageworks.com>
    
    WIP: enum for lint messages
    
    Signed-off-by: Nichol Yip <nyip@imageworks.com>
    
    Moved lint error message inside new lint file.
    
    Fixed error message when unknown key is found.
    
    Implemented LintMessage enum for current variantions of lint error types.
    
    Signed-off-by: Nichol Yip <nyip@imageworks.com>
    Nichol Yip committed Aug 26, 2024
    Configuration menu
    Copy the full SHA
    29d710b View commit details
    Browse the repository at this point in the history
  5. Implemented lint feature for EnvOp

    Signed-off-by: Nichol Yip <nyip@imageworks.com>
    Nichol Yip committed Aug 26, 2024
    Configuration menu
    Copy the full SHA
    85d4aa5 View commit details
    Browse the repository at this point in the history
  6. Reworked NoOp type for EnvOp to UnrecognizedKey.

    Signed-off-by: Nichol Yip <nyip@imageworks.com>
    
    WIP: Adding lint feature to source spec
    
    Signed-off-by: Nichol Yip <nyip@imageworks.com>
    Nichol Yip committed Aug 26, 2024
    Configuration menu
    Copy the full SHA
    1477822 View commit details
    Browse the repository at this point in the history
  7. Implemented lint feature for source spec

    Removed lint from spk-schema/crates/ident
    
    Signed-off-by: Nichol Yip <nyip@imageworks.com>
    Nichol Yip committed Aug 26, 2024
    Configuration menu
    Copy the full SHA
    fe9c849 View commit details
    Browse the repository at this point in the history
  8. Implemented linting feature for test spec and meta spec

    Signed-off-by: Nichol Yip <nyip@imageworks.com>
    Nichol Yip committed Aug 26, 2024
    Configuration menu
    Copy the full SHA
    bcbc053 View commit details
    Browse the repository at this point in the history
  9. Implemented proc macro for linting feature

    Fixed configs to use Lint proc macro to generate lint messages
    
    WIP: Add Lint proc macro for EnvOp and TestSpec
    
    Signed-off-by: Nichol Yip <nyip@imageworks.com>
    Nichol Yip committed Aug 26, 2024
    Configuration menu
    Copy the full SHA
    58278c8 View commit details
    Browse the repository at this point in the history
  10. Implemented lint feature for EnvOp and TestSpec

    Signed-off-by: Nichol Yip <nyip@imageworks.com>
    Nichol Yip committed Aug 26, 2024
    Configuration menu
    Copy the full SHA
    2df3f80 View commit details
    Browse the repository at this point in the history
  11. Removed lint-proc-macro and replaced with using struct-field-names-as…

    …-array crate instead.
    
    Signed-off-by: Nichol Yip <nyip@imageworks.com>
    
    Fixed linting errors and removed unused commented code.
    
    Signed-off-by: Nichol Yip <nyip@imageworks.com>
    
    Removed dead commented code and fixed du test with the correct sizes.
    
    Signed-off-by: Nichol Yip <nyip@imageworks.com>
    
    Fixed issue where no default source spec if found when no source provided
    
    Fixed issue with the default values for the meta struct when no values are provided
    
    Reverted du command tests back as it was related to the issue with the source spec.
    
    Signed-off-by: Nichol Yip <nyip@imageworks.com>
    
    Fixed typo in opentimelineio.spk.yaml
    
    Added render logic to linting command that caused some packages to return an error without it.
    
    Signed-off-by: Nichol Yip <nyip@imageworks.com>
    
    Added new line at EOF
    
    Signed-off-by: Nichol Yip <nyip@imageworks.com>
    
    Fixed changes from rebase that was not correctly added.
    
    Signed-off-by: Nichol Yip <nyip@imageworks.com>
    
    Removed shellexpand call from EnvOp
    
    Signed-off-by: Nichol Yip <nyip@imageworks.com>
    
    Moved crates to top level cargo.toml
    
    Changed linting feature to return an UnknownKey object instead of a generated string
    
    Modified new method for UnknownKey to store values needed to generated lint message
    
    Added enum for lints to support different kinds of lints
    
    Removed commented code
    
    Refactored render method and renamed render_lint -> render_to_string
    
    Signed-off-by: Nichol Yip <nyip@imageworks.com>
    
    Fixed changes from rebase
    
    Signed-off-by: Nichol Yip <nyip@imageworks.com>
    
    Fixed linting errors
    
    Signed-off-by: Nichol Yip <nyip@imageworks.com>
    
    WIP: Properly convert UncheckedBuildSpec -> BuildSpec
    
    Signed-off-by: Nichol Yip <nyip@imageworks.com>
    
    Implmented LintedBuildSpec struct to properly evaluate error if any, in the visitor method instead of the from implementation.
    
    Signed-off-by: Nichol Yip <nyip@imageworks.com>
    
    Removed redundant struct and replaced with using LintedItem instead.
    
    Signed-off-by: Nichol Yip <nyip@imageworks.com>
    Nichol Yip committed Aug 26, 2024
    Configuration menu
    Copy the full SHA
    93d4866 View commit details
    Browse the repository at this point in the history
  12. Fixed changes from rebase

    Signed-off-by: Nichol Yip <nyip@imageworks.com>
    Nichol Yip committed Aug 26, 2024
    Configuration menu
    Copy the full SHA
    098e062 View commit details
    Browse the repository at this point in the history

Commits on Aug 27, 2024

  1. Fix conflicts from rebase

    Nichol Yip committed Aug 27, 2024
    Configuration menu
    Copy the full SHA
    e03d04d View commit details
    Browse the repository at this point in the history
  2. Fix UncheckedBuildSpec deserialize() with newest version

    Signed-off-by: Nichol Yip <nyip@imageworks.com>
    Nichol Yip committed Aug 27, 2024
    Configuration menu
    Copy the full SHA
    6d0dddb View commit details
    Browse the repository at this point in the history

Commits on Sep 9, 2024

  1. Implemented linting for build options

    Signed-off-by: Nichol Yip <nyip@imageworks.com>
    Nichol Yip committed Sep 9, 2024
    Configuration menu
    Copy the full SHA
    67fa96c View commit details
    Browse the repository at this point in the history

Commits on Sep 16, 2024

  1. Assign linted_opts to unchecked.options once checks has passed.

    Signed-off-by: Nichol Yip <nyip@imageworks.com>
    Nichol Yip committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    6aaf500 View commit details
    Browse the repository at this point in the history