-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
Cannot disable bad-import-yang-version #40
Comments
Same for me |
@Sparrow1029 This kind of validation |
Hello @dhuebner, I have a related issue on TypeFox/yang-lsp#228 where it is requested to refine the diagnostic to match the RFC, as it is allowed to import yang-version 1.1 models from yang-version 1.0 models as long as the import is not with a revision-date. Also, this ticket was helpful, since I had struggled in isolation when trying to downgrade bad-import-yang-version to a warning severity, due to the false positive against the RFC compliant import behavior. |
Thanks @dhuebner, I have discussed with Rim and this is rather an independent engagement from my side hence it should not not interfere. I may provide a draft PR for consideration, if welcome, for TypeFox/yang-lsp#228 when I get my development environment up and running. |
Based on discussion in TypeFox/yang-vscode#40 bad-include-yang-version and bad-import-yang-version are not configurable. Also updated Settings.md documentation to clarify. Signed-off-by: Siddharth Sharma <[email protected]>
Making validation configurable bei the user is pretty easy, see: |
Thanks @dhuebner . The other cases of using |
@esmasth |
@dhuebner it would need a dedicated exercise to comb through the layers of RFC text to create that definitive list. I don't have that readily available for contribution, sorry. |
Thank you for making this extension!
I have YANG models that I am using with Cisco NSO (Network Services Orchestrator), and cannot disable
bad-import-yang-version
error.I have set up my
~/.yang/yang.settings
file like this:I have also tried placing this same configuration into
yang.settings
at my project root.Setting "ambiguous-import" to "ignore" works just fine, as those warnings are now disabled.
I currently have some "duplicate-name" errors in my YANG, and as an experiment, successfully changed/disabled those errors using
yang.settings
as well.The bad-import-yang-version errors do not disappear until I explicitly put
at the top of the module (which isn't usually necessary for Cisco NSO to infer the version).
Adding the explicit yang-version leaf at the top of the modules isn't a huge pain, but wanted to report this behavior. I am wondering if it is a bug, or if I should be using some other configuration.
The text was updated successfully, but these errors were encountered: