Browse Source

Begin to add initial scanner modules

Change-Id: I3fba1cd83723c2787e67dca641b8907abbd577bf
changes/04/268804/1
Joshua Harlow 3 years ago
parent
commit
12db43fcf3
3 changed files with 28 additions and 0 deletions
  1. 0
    0
      nerdreviewer/scanners/__init__.py
  2. 27
    0
      nerdreviewer/scanners/speller.py
  3. 1
    0
      requirements.txt

+ 0
- 0
nerdreviewer/scanners/__init__.py View File


+ 27
- 0
nerdreviewer/scanners/speller.py View File

@@ -0,0 +1,27 @@
1
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
2
+#    not use this file except in compliance with the License. You may obtain
3
+#    a copy of the License at
4
+#
5
+#         http://www.apache.org/licenses/LICENSE-2.0
6
+#
7
+#    Unless required by applicable law or agreed to in writing, software
8
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10
+#    License for the specific language governing permissions and limitations
11
+#    under the License.
12
+
13
+from oslo_utils import importutils
14
+
15
+enchant = importutils.try_import("enchant")
16
+
17
+
18
+class Scanner(object):
19
+    version = "0.1"
20
+
21
+    @staticmethod
22
+    def is_available():
23
+        return enchant is not None
24
+
25
+    @staticmethod
26
+    def scan_for_problems(review):
27
+        return []

+ 1
- 0
requirements.txt View File

@@ -4,6 +4,7 @@
4 4
 
5 5
 pbr>=1.6 # Apache-2.0
6 6
 paramiko>=1.13.0 # LGPL
7
+oslo.utils>=3.2.0 # Apache-2.0
7 8
 enum34;python_version=='2.7' or python_version=='2.6' or python_version=='3.3' # BSD
8 9
 jsonschema>=2.0.0,<3.0.0,!=2.5.0 # MIT
9 10
 netaddr>=0.7.12,!=0.7.16 # BSD

Loading…
Cancel
Save