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

Raise an error when the name in yaml and json files is different for a config #117

Open
didiladi opened this issue Jan 15, 2021 · 3 comments
Labels
enhancement New feature or request internally-tracked We've moved this issue to the internal backlog of the core team.

Comments

@didiladi
Copy link
Contributor

Is your feature request related to a problem? Please describe.
@JACONDE stumbled upon this issue in #114. When the name in yaml and json files is different for a config, we simply continue, without raising an error.

E.g. here is an example config which runs into this problem:

config:
    - tagging: "tagging.json"
     
tagging:
    - name: "yaml tagging"
{
    "name": "json tagging",
    "rules": [
        ...
    ],
   ...
}

Describe the solution you'd like
We should fail early and raise an error when this happens. The error message should be clear and concise.

Additional context
The implementation of this should wait until #101 is tackled. Special consideration should go to configs, which don't have a name property in its json. E.g. some configs have a display_name property.

@tatomir146
Copy link
Contributor

@didiladi this example is kind of wrong? We have already stated in documentation the name must be a variable. If it's a variable and used in Json then it can be different or am I missing something?

@didiladi
Copy link
Contributor Author

@tatomir146 Maybe the description above is a bit misleading. Yes, you are right, we stated in the documentation that the name must be a variable. But if a user does not declare a variable for it, monaco simply continues without raising an error. This issue is about checking if the config is "compliant" to our rules, and otherwise rejecting it.

@didiladi didiladi added this to the v3.0 milestone Feb 18, 2021
@UnseenWizzard UnseenWizzard added bug Something isn't working and removed bug Something isn't working labels Feb 26, 2022
@UnseenWizzard UnseenWizzard removed this from the after v2 release milestone Jun 23, 2022
@UnseenWizzard UnseenWizzard added the internally-tracked We've moved this issue to the internal backlog of the core team. label May 2, 2023
@kbocock-krg
Copy link

Would also be great given "less is more" to just do away with the config.yaml and do everything in a clean json way?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request internally-tracked We've moved this issue to the internal backlog of the core team.
Projects
None yet
Development

No branches or pull requests

4 participants