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

Add new option for disabling validations #220

Merged
merged 1 commit into from
Jan 6, 2018

Conversation

keith
Copy link
Collaborator

@keith keith commented Jan 4, 2018

This gives us an entry point for disabling specific project.yml
validations that sometimes shouldn't apply. The first example is
missingConfigs, which, if you use your .yml file in multiple projects,
can be too strict if the projects have different top level
configurations.

@keith keith requested a review from yonaskolb January 4, 2018 21:52
@keith
Copy link
Collaborator Author

keith commented Jan 4, 2018

This replaces #216

Copy link
Owner

@yonaskolb yonaskolb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @keith.
We could create a followup PR that disables missingFiles

@@ -52,6 +53,10 @@ public struct ProjectSpec {
}
}

public enum DisabledValidations: String {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's rename to ValidationType and move to SpecValidation.swift?

@@ -36,7 +36,7 @@ extension ProjectSpec {
if !(basePath + configFile).exists {
errors.append(.invalidConfigFile(configFile: configFile, config: config))
}
if getConfig(config) == nil {
if !options.disabledValidations.contains(.missingConfigs) && getConfig(config) == nil {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This gives us an entry point for disabling specific project.yml
validations that sometimes shouldn't apply. The first example is
missingConfigs, which, if you use your .yml file in multiple projects,
can be too strict if the projects have different top level
configurations.
@keith keith force-pushed the ks/disable-config-warnings branch from 774bbe8 to b6ef82b Compare January 5, 2018 19:41
@keith
Copy link
Collaborator Author

keith commented Jan 5, 2018

Updated!

@yonaskolb yonaskolb merged commit 7a485f2 into master Jan 6, 2018
@keith keith deleted the ks/disable-config-warnings branch January 6, 2018 02:38
@keith
Copy link
Collaborator Author

keith commented Jan 6, 2018

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants