api: crchcecker ignore version < 1.0.0 and outside of src directory

- For check patchset ignore files outside of src directory
- For check patchset ignore files that have version < 1.0.0
- fix Pylint warnings
- Modify vppapigen_crc to include version in JSON output

Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I171cf6397e129e2438b2a494c5656236a7810f7b
diff --git a/src/tools/vppapigen/vppapigen_crc.py b/src/tools/vppapigen/vppapigen_crc.py
index 6947f12..791e347 100644
--- a/src/tools/vppapigen/vppapigen_crc.py
+++ b/src/tools/vppapigen/vppapigen_crc.py
@@ -10,9 +10,12 @@
 def run(args, input_filename, s):
     j = {}
     major = 0
+    minor = 0
+    patch = 0
     if 'version' in s['Option']:
         v = s['Option']['version']
         (major, minor, patch) = v.split('.')
+    j['_version'] = {'major': major, 'minor': minor, 'patch': patch}
     for t in s['Define']:
         j[t.name] = {'crc': f'{t.crc:#08x}', 'version': major,
                      'options': t.options}
diff --git a/src/vat2/test/vat2_test.api b/src/vat2/test/vat2_test.api
index 6d21155..43fde55 100644
--- a/src/vat2/test/vat2_test.api
+++ b/src/vat2/test/vat2_test.api
@@ -13,6 +13,7 @@
  * limitations under the License.
  */
 
+option version="0.0.0";
 import "vnet/ip/ip_types.api";
 import "vnet/interface_types.api";