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 rule that surrounding container of a list must be a different name. #50

Closed
wants to merge 1 commit into from

Conversation

wenovus
Copy link
Contributor

@wenovus wenovus commented Dec 21, 2022

Existing inconsistencies in openconfig/public that must be fixed if we're to introduce this:

ate/openconfig-ate-flow.yang:427 (at ate/openconfig-ate-flow.yang:103): error: Surrounding container of list ingress-tracking has the same name (often this should be the plural version of the list name)
ate/openconfig-ate-flow.yang:427 (at ate/openconfig-ate-flow.yang:112): error: Surrounding container of list egress-tracking has the same name (often this should be the plural version of the list name)
ate/openconfig-ate-flow.yang:427 (at ate/openconfig-ate-flow.yang:371): error: Surrounding container of list egress-tracking has the same name (often this should be the plural version of the list name)
macsec/openconfig-macsec.yang:787 (at macsec/openconfig-macsec.yang:428): error: Surrounding container of list scsa-tx has the same name (often this should be the plural version of the list name)
macsec/openconfig-macsec.yang:787 (at macsec/openconfig-macsec.yang:464): error: Surrounding container of list scsa-rx has the same name (often this should be the plural version of the list name)
network-instance/openconfig-network-instance.yang:1349 (at mpls/openconfig-mpls-te.yang:1298): error: Surrounding container of list p2p-primary-path has the same name (often this should be the plural version of the list name)

This change will enable a more user-friendly compressed name for uncompressed GoStructs.

Existing inconsistencies in openconfig/public that must be fixed if
we're to introduce this:
```
ate/openconfig-ate-flow.yang:427 (at ate/openconfig-ate-flow.yang:103): error: Surrounding container of list ingress-tracking has the same name (often this should be the plural version of the list name)
ate/openconfig-ate-flow.yang:427 (at ate/openconfig-ate-flow.yang:112): error: Surrounding container of list egress-tracking has the same name (often this should be the plural version of the list name)
ate/openconfig-ate-flow.yang:427 (at ate/openconfig-ate-flow.yang:371): error: Surrounding container of list egress-tracking has the same name (often this should be the plural version of the list name)
macsec/openconfig-macsec.yang:787 (at macsec/openconfig-macsec.yang:428): error: Surrounding container of list scsa-tx has the same name (often this should be the plural version of the list name)
macsec/openconfig-macsec.yang:787 (at macsec/openconfig-macsec.yang:464): error: Surrounding container of list scsa-rx has the same name (often this should be the plural version of the list name)
network-instance/openconfig-network-instance.yang:1349 (at mpls/openconfig-mpls-te.yang:1298): error: Surrounding container of list p2p-primary-path has the same name (often this should be the plural version of the list name)
```
@wenovus
Copy link
Contributor Author

wenovus commented Dec 21, 2022

In particular this rule will support exception point#2 for struct names in openconfig/ygot#755

@wenovus
Copy link
Contributor Author

wenovus commented Mar 23, 2023

Will close this since no longer pursing this. Autocomplete will help with typing out the names of longer uncompressed structs.

@wenovus wenovus closed this Mar 23, 2023
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.

1 participant