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

Support profile inheritance on optional profiles #161

Closed
agjohnson opened this issue Feb 26, 2016 · 2 comments
Closed

Support profile inheritance on optional profiles #161

agjohnson opened this issue Feb 26, 2016 · 2 comments

Comments

@agjohnson
Copy link

It seems that configuration inheritance ensures the profile exists. Would inheritance for optional files be a useful feature, and if so, what would the best implementation of this be? I'm happy to get this working if it would be an accepted feature.

My use case is running prospector using vim, and having projects with a base configuration file. I'd like to optionally include a local override profile, but only if it exists. The local override profile wouldn't be checked into the project, but would provide a method for stricter linting for individual developers. For example, consider the following prospector.yaml:

inherits:
  - prospector_local
  - prospector_base

Where prospector_base.yml would be the base project configuration, and prospector_local.yml wouldn't necessarily exist in the repository. A couple implementation options here:

  • Add to the config spec to signify optional profiles
  • Add a configuration option that flags missing profiles as soft errors rather than hard. Default is the normal behavior, present now. To silently skip a missing profile would be unexpected user experience.

It's also possible I'm missing something and there is an easier method to accomplish what I'm talking about.

@carlio
Copy link
Contributor

carlio commented Nov 20, 2018

I think I'd quite like to do this for no particular reason other than I thought of a nice idea.

inherits:
  - prospector_local?
  - prospector_base

Sort of like Typescript to mark it as optional. I think I'll do this just cos I think it'd be cool :-)

carlio added a commit to carlio/prospector that referenced this issue Feb 28, 2022
carlio added a commit that referenced this issue Feb 28, 2022
@carlio
Copy link
Contributor

carlio commented Mar 1, 2022

Only took 6 years but it's finally implemented in 1.7.5 🥳

@carlio carlio closed this as completed Mar 1, 2022
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

No branches or pull requests

2 participants