Skip to content

Conversation

jksmth
Copy link

@jksmth jksmth commented Feb 1, 2022

SUMMARY

Following on from #64 - match on non-whitespace characters in fetch

This PR also fixes the scenario where an import x { can be incorrectly matched in a description block causing a fetch failure, e.g. https://github.com/YangModels/yang/blob/master/vendor/cisco/xe/1671/tailf-common.yang#L1601

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

fetch

ADDITIONAL INFORMATION

support imports that have extra whitespace

  import ietf-yang-types         {
     prefix yang;
  }

ignores imports that are found in description blocks by removing the description block before matching

  description
     "...
      it MUST be defined in the same module as the
       tailf:unique-selector.  For example, the following is illegal:
         module y {
           ...
           import x {
             prefix x;
           }
           tailf:unique-selector '/x:server' { // illegal
             ...
           }
         }
       For each instance of the node where the selector is defined, it
       is evaluated, and for each node selected by the selector, a
      ...";

strips out all comments before looking for imports

module example {
        ...

        import test {prefix test;}
        //import ethernet {prefix eth;}
/*
Some example comment...

module example {
        ...

        import test {prefix test;}
*/

@softwarefactory-project-zuul
Copy link

Build succeeded (third-party-check pipeline).

@softwarefactory-project-zuul
Copy link

Build succeeded (third-party-check pipeline).

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