The following issues were found
modules/core/misc/java/src/java/core+Size.java
9 issues
Line: 23
}
public Size(double[] vals) {
set(vals);
}
public void set(double[] vals) {
if (vals != null) {
width = vals.length > 0 ? vals[0] : 0;
Reported by PMD.
Line: 44
return width <= 0 || height <= 0;
}
public Size clone() {
return new Size(width, height);
}
@Override
public int hashCode() {
Reported by PMD.
Line: 6
//javadoc:Size_
public class Size {
public double width, height;
public Size(double width, double height) {
this.width = width;
this.height = height;
}
Reported by PMD.
Line: 6
//javadoc:Size_
public class Size {
public double width, height;
public Size(double width, double height) {
this.width = width;
this.height = height;
}
Reported by PMD.
Line: 44
return width <= 0 || height <= 0;
}
public Size clone() {
return new Size(width, height);
}
@Override
public int hashCode() {
Reported by PMD.
Line: 44
return width <= 0 || height <= 0;
}
public Size clone() {
return new Size(width, height);
}
@Override
public int hashCode() {
Reported by PMD.
Line: 6
//javadoc:Size_
public class Size {
public double width, height;
public Size(double width, double height) {
this.width = width;
this.height = height;
}
Reported by PMD.
Line: 22
height = p.y;
}
public Size(double[] vals) {
set(vals);
}
public void set(double[] vals) {
if (vals != null) {
Reported by PMD.
Line: 26
set(vals);
}
public void set(double[] vals) {
if (vals != null) {
width = vals.length > 0 ? vals[0] : 0;
height = vals.length > 1 ? vals[1] : 0;
} else {
width = 0;
Reported by PMD.
platforms/android/ndk-22.config.py
9 issues
Line: 2
Column: 5
ABIs = [
ABI("2", "armeabi-v7a", None, cmake_vars=dict(ANDROID_ABI='armeabi-v7a with NEON', ANDROID_GRADLE_PLUGIN_VERSION='4.1.2', GRADLE_VERSION='6.5', KOTLIN_PLUGIN_VERSION='1.5.10')),
ABI("3", "arm64-v8a", None, cmake_vars=dict(ANDROID_GRADLE_PLUGIN_VERSION='4.1.2', GRADLE_VERSION='6.5', KOTLIN_PLUGIN_VERSION='1.5.10')),
ABI("5", "x86_64", None, cmake_vars=dict(ANDROID_GRADLE_PLUGIN_VERSION='4.1.2', GRADLE_VERSION='6.5', KOTLIN_PLUGIN_VERSION='1.5.10')),
ABI("4", "x86", None, cmake_vars=dict(ANDROID_GRADLE_PLUGIN_VERSION='4.1.2', GRADLE_VERSION='6.5', KOTLIN_PLUGIN_VERSION='1.5.10')),
]
Reported by Pylint.
Line: 3
Column: 5
ABIs = [
ABI("2", "armeabi-v7a", None, cmake_vars=dict(ANDROID_ABI='armeabi-v7a with NEON', ANDROID_GRADLE_PLUGIN_VERSION='4.1.2', GRADLE_VERSION='6.5', KOTLIN_PLUGIN_VERSION='1.5.10')),
ABI("3", "arm64-v8a", None, cmake_vars=dict(ANDROID_GRADLE_PLUGIN_VERSION='4.1.2', GRADLE_VERSION='6.5', KOTLIN_PLUGIN_VERSION='1.5.10')),
ABI("5", "x86_64", None, cmake_vars=dict(ANDROID_GRADLE_PLUGIN_VERSION='4.1.2', GRADLE_VERSION='6.5', KOTLIN_PLUGIN_VERSION='1.5.10')),
ABI("4", "x86", None, cmake_vars=dict(ANDROID_GRADLE_PLUGIN_VERSION='4.1.2', GRADLE_VERSION='6.5', KOTLIN_PLUGIN_VERSION='1.5.10')),
]
Reported by Pylint.
Line: 4
Column: 5
ABIs = [
ABI("2", "armeabi-v7a", None, cmake_vars=dict(ANDROID_ABI='armeabi-v7a with NEON', ANDROID_GRADLE_PLUGIN_VERSION='4.1.2', GRADLE_VERSION='6.5', KOTLIN_PLUGIN_VERSION='1.5.10')),
ABI("3", "arm64-v8a", None, cmake_vars=dict(ANDROID_GRADLE_PLUGIN_VERSION='4.1.2', GRADLE_VERSION='6.5', KOTLIN_PLUGIN_VERSION='1.5.10')),
ABI("5", "x86_64", None, cmake_vars=dict(ANDROID_GRADLE_PLUGIN_VERSION='4.1.2', GRADLE_VERSION='6.5', KOTLIN_PLUGIN_VERSION='1.5.10')),
ABI("4", "x86", None, cmake_vars=dict(ANDROID_GRADLE_PLUGIN_VERSION='4.1.2', GRADLE_VERSION='6.5', KOTLIN_PLUGIN_VERSION='1.5.10')),
]
Reported by Pylint.
Line: 5
Column: 5
ABI("2", "armeabi-v7a", None, cmake_vars=dict(ANDROID_ABI='armeabi-v7a with NEON', ANDROID_GRADLE_PLUGIN_VERSION='4.1.2', GRADLE_VERSION='6.5', KOTLIN_PLUGIN_VERSION='1.5.10')),
ABI("3", "arm64-v8a", None, cmake_vars=dict(ANDROID_GRADLE_PLUGIN_VERSION='4.1.2', GRADLE_VERSION='6.5', KOTLIN_PLUGIN_VERSION='1.5.10')),
ABI("5", "x86_64", None, cmake_vars=dict(ANDROID_GRADLE_PLUGIN_VERSION='4.1.2', GRADLE_VERSION='6.5', KOTLIN_PLUGIN_VERSION='1.5.10')),
ABI("4", "x86", None, cmake_vars=dict(ANDROID_GRADLE_PLUGIN_VERSION='4.1.2', GRADLE_VERSION='6.5', KOTLIN_PLUGIN_VERSION='1.5.10')),
]
Reported by Pylint.
Line: 1
Column: 1
ABIs = [
ABI("2", "armeabi-v7a", None, cmake_vars=dict(ANDROID_ABI='armeabi-v7a with NEON', ANDROID_GRADLE_PLUGIN_VERSION='4.1.2', GRADLE_VERSION='6.5', KOTLIN_PLUGIN_VERSION='1.5.10')),
ABI("3", "arm64-v8a", None, cmake_vars=dict(ANDROID_GRADLE_PLUGIN_VERSION='4.1.2', GRADLE_VERSION='6.5', KOTLIN_PLUGIN_VERSION='1.5.10')),
ABI("5", "x86_64", None, cmake_vars=dict(ANDROID_GRADLE_PLUGIN_VERSION='4.1.2', GRADLE_VERSION='6.5', KOTLIN_PLUGIN_VERSION='1.5.10')),
ABI("4", "x86", None, cmake_vars=dict(ANDROID_GRADLE_PLUGIN_VERSION='4.1.2', GRADLE_VERSION='6.5', KOTLIN_PLUGIN_VERSION='1.5.10')),
]
Reported by Pylint.
Line: 2
Column: 1
ABIs = [
ABI("2", "armeabi-v7a", None, cmake_vars=dict(ANDROID_ABI='armeabi-v7a with NEON', ANDROID_GRADLE_PLUGIN_VERSION='4.1.2', GRADLE_VERSION='6.5', KOTLIN_PLUGIN_VERSION='1.5.10')),
ABI("3", "arm64-v8a", None, cmake_vars=dict(ANDROID_GRADLE_PLUGIN_VERSION='4.1.2', GRADLE_VERSION='6.5', KOTLIN_PLUGIN_VERSION='1.5.10')),
ABI("5", "x86_64", None, cmake_vars=dict(ANDROID_GRADLE_PLUGIN_VERSION='4.1.2', GRADLE_VERSION='6.5', KOTLIN_PLUGIN_VERSION='1.5.10')),
ABI("4", "x86", None, cmake_vars=dict(ANDROID_GRADLE_PLUGIN_VERSION='4.1.2', GRADLE_VERSION='6.5', KOTLIN_PLUGIN_VERSION='1.5.10')),
]
Reported by Pylint.
Line: 3
Column: 1
ABIs = [
ABI("2", "armeabi-v7a", None, cmake_vars=dict(ANDROID_ABI='armeabi-v7a with NEON', ANDROID_GRADLE_PLUGIN_VERSION='4.1.2', GRADLE_VERSION='6.5', KOTLIN_PLUGIN_VERSION='1.5.10')),
ABI("3", "arm64-v8a", None, cmake_vars=dict(ANDROID_GRADLE_PLUGIN_VERSION='4.1.2', GRADLE_VERSION='6.5', KOTLIN_PLUGIN_VERSION='1.5.10')),
ABI("5", "x86_64", None, cmake_vars=dict(ANDROID_GRADLE_PLUGIN_VERSION='4.1.2', GRADLE_VERSION='6.5', KOTLIN_PLUGIN_VERSION='1.5.10')),
ABI("4", "x86", None, cmake_vars=dict(ANDROID_GRADLE_PLUGIN_VERSION='4.1.2', GRADLE_VERSION='6.5', KOTLIN_PLUGIN_VERSION='1.5.10')),
]
Reported by Pylint.
Line: 4
Column: 1
ABIs = [
ABI("2", "armeabi-v7a", None, cmake_vars=dict(ANDROID_ABI='armeabi-v7a with NEON', ANDROID_GRADLE_PLUGIN_VERSION='4.1.2', GRADLE_VERSION='6.5', KOTLIN_PLUGIN_VERSION='1.5.10')),
ABI("3", "arm64-v8a", None, cmake_vars=dict(ANDROID_GRADLE_PLUGIN_VERSION='4.1.2', GRADLE_VERSION='6.5', KOTLIN_PLUGIN_VERSION='1.5.10')),
ABI("5", "x86_64", None, cmake_vars=dict(ANDROID_GRADLE_PLUGIN_VERSION='4.1.2', GRADLE_VERSION='6.5', KOTLIN_PLUGIN_VERSION='1.5.10')),
ABI("4", "x86", None, cmake_vars=dict(ANDROID_GRADLE_PLUGIN_VERSION='4.1.2', GRADLE_VERSION='6.5', KOTLIN_PLUGIN_VERSION='1.5.10')),
]
Reported by Pylint.
Line: 5
Column: 1
ABI("2", "armeabi-v7a", None, cmake_vars=dict(ANDROID_ABI='armeabi-v7a with NEON', ANDROID_GRADLE_PLUGIN_VERSION='4.1.2', GRADLE_VERSION='6.5', KOTLIN_PLUGIN_VERSION='1.5.10')),
ABI("3", "arm64-v8a", None, cmake_vars=dict(ANDROID_GRADLE_PLUGIN_VERSION='4.1.2', GRADLE_VERSION='6.5', KOTLIN_PLUGIN_VERSION='1.5.10')),
ABI("5", "x86_64", None, cmake_vars=dict(ANDROID_GRADLE_PLUGIN_VERSION='4.1.2', GRADLE_VERSION='6.5', KOTLIN_PLUGIN_VERSION='1.5.10')),
ABI("4", "x86", None, cmake_vars=dict(ANDROID_GRADLE_PLUGIN_VERSION='4.1.2', GRADLE_VERSION='6.5', KOTLIN_PLUGIN_VERSION='1.5.10')),
]
Reported by Pylint.
platforms/android/ndk-10.config.py
9 issues
Line: 2
Column: 5
ABIs = [
ABI("2", "armeabi-v7a", "arm-linux-androideabi-4.8", cmake_vars=dict(ANDROID_ABI='armeabi-v7a with NEON')),
ABI("1", "armeabi", "arm-linux-androideabi-4.8"),
ABI("3", "arm64-v8a", "aarch64-linux-android-4.9"),
ABI("5", "x86_64", "x86_64-4.9"),
ABI("4", "x86", "x86-4.8"),
ABI("7", "mips64", "mips64el-linux-android-4.9"),
ABI("6", "mips", "mipsel-linux-android-4.8")
]
Reported by Pylint.
Line: 3
Column: 5
ABIs = [
ABI("2", "armeabi-v7a", "arm-linux-androideabi-4.8", cmake_vars=dict(ANDROID_ABI='armeabi-v7a with NEON')),
ABI("1", "armeabi", "arm-linux-androideabi-4.8"),
ABI("3", "arm64-v8a", "aarch64-linux-android-4.9"),
ABI("5", "x86_64", "x86_64-4.9"),
ABI("4", "x86", "x86-4.8"),
ABI("7", "mips64", "mips64el-linux-android-4.9"),
ABI("6", "mips", "mipsel-linux-android-4.8")
]
Reported by Pylint.
Line: 4
Column: 5
ABIs = [
ABI("2", "armeabi-v7a", "arm-linux-androideabi-4.8", cmake_vars=dict(ANDROID_ABI='armeabi-v7a with NEON')),
ABI("1", "armeabi", "arm-linux-androideabi-4.8"),
ABI("3", "arm64-v8a", "aarch64-linux-android-4.9"),
ABI("5", "x86_64", "x86_64-4.9"),
ABI("4", "x86", "x86-4.8"),
ABI("7", "mips64", "mips64el-linux-android-4.9"),
ABI("6", "mips", "mipsel-linux-android-4.8")
]
Reported by Pylint.
Line: 5
Column: 5
ABI("2", "armeabi-v7a", "arm-linux-androideabi-4.8", cmake_vars=dict(ANDROID_ABI='armeabi-v7a with NEON')),
ABI("1", "armeabi", "arm-linux-androideabi-4.8"),
ABI("3", "arm64-v8a", "aarch64-linux-android-4.9"),
ABI("5", "x86_64", "x86_64-4.9"),
ABI("4", "x86", "x86-4.8"),
ABI("7", "mips64", "mips64el-linux-android-4.9"),
ABI("6", "mips", "mipsel-linux-android-4.8")
]
Reported by Pylint.
Line: 6
Column: 5
ABI("1", "armeabi", "arm-linux-androideabi-4.8"),
ABI("3", "arm64-v8a", "aarch64-linux-android-4.9"),
ABI("5", "x86_64", "x86_64-4.9"),
ABI("4", "x86", "x86-4.8"),
ABI("7", "mips64", "mips64el-linux-android-4.9"),
ABI("6", "mips", "mipsel-linux-android-4.8")
]
Reported by Pylint.
Line: 7
Column: 5
ABI("3", "arm64-v8a", "aarch64-linux-android-4.9"),
ABI("5", "x86_64", "x86_64-4.9"),
ABI("4", "x86", "x86-4.8"),
ABI("7", "mips64", "mips64el-linux-android-4.9"),
ABI("6", "mips", "mipsel-linux-android-4.8")
]
Reported by Pylint.
Line: 8
Column: 5
ABI("5", "x86_64", "x86_64-4.9"),
ABI("4", "x86", "x86-4.8"),
ABI("7", "mips64", "mips64el-linux-android-4.9"),
ABI("6", "mips", "mipsel-linux-android-4.8")
]
Reported by Pylint.
Line: 1
Column: 1
ABIs = [
ABI("2", "armeabi-v7a", "arm-linux-androideabi-4.8", cmake_vars=dict(ANDROID_ABI='armeabi-v7a with NEON')),
ABI("1", "armeabi", "arm-linux-androideabi-4.8"),
ABI("3", "arm64-v8a", "aarch64-linux-android-4.9"),
ABI("5", "x86_64", "x86_64-4.9"),
ABI("4", "x86", "x86-4.8"),
ABI("7", "mips64", "mips64el-linux-android-4.9"),
ABI("6", "mips", "mipsel-linux-android-4.8")
]
Reported by Pylint.
Line: 2
Column: 1
ABIs = [
ABI("2", "armeabi-v7a", "arm-linux-androideabi-4.8", cmake_vars=dict(ANDROID_ABI='armeabi-v7a with NEON')),
ABI("1", "armeabi", "arm-linux-androideabi-4.8"),
ABI("3", "arm64-v8a", "aarch64-linux-android-4.9"),
ABI("5", "x86_64", "x86_64-4.9"),
ABI("4", "x86", "x86-4.8"),
ABI("7", "mips64", "mips64el-linux-android-4.9"),
ABI("6", "mips", "mipsel-linux-android-4.8")
]
Reported by Pylint.
modules/videoio/misc/python/test/test_videoio.py
9 issues
Line: 5
Column: 1
from __future__ import print_function
import numpy as np
import cv2 as cv
from tests_common import NewOpenCVTests
class Bindings(NewOpenCVTests):
Reported by Pylint.
Line: 7
Column: 1
import numpy as np
import cv2 as cv
from tests_common import NewOpenCVTests
class Bindings(NewOpenCVTests):
def check_name(self, name):
#print(name)
Reported by Pylint.
Line: 4
Column: 1
#!/usr/bin/env python
from __future__ import print_function
import numpy as np
import cv2 as cv
from tests_common import NewOpenCVTests
class Bindings(NewOpenCVTests):
Reported by Pylint.
Line: 17
Column: 1
self.assertFalse(name == "")
def test_registry(self):
self.check_name(cv.videoio_registry.getBackendName(cv.CAP_ANY));
self.check_name(cv.videoio_registry.getBackendName(cv.CAP_FFMPEG))
self.check_name(cv.videoio_registry.getBackendName(cv.CAP_OPENCV_MJPEG))
backends = cv.videoio_registry.getBackends()
for backend in backends:
self.check_name(cv.videoio_registry.getBackendName(backend))
Reported by Pylint.
Line: 1
Column: 1
#!/usr/bin/env python
from __future__ import print_function
import numpy as np
import cv2 as cv
from tests_common import NewOpenCVTests
class Bindings(NewOpenCVTests):
Reported by Pylint.
Line: 9
Column: 1
from tests_common import NewOpenCVTests
class Bindings(NewOpenCVTests):
def check_name(self, name):
#print(name)
self.assertFalse(name == None)
self.assertFalse(name == "")
Reported by Pylint.
Line: 11
Column: 5
class Bindings(NewOpenCVTests):
def check_name(self, name):
#print(name)
self.assertFalse(name == None)
self.assertFalse(name == "")
def test_registry(self):
Reported by Pylint.
Line: 13
Column: 26
def check_name(self, name):
#print(name)
self.assertFalse(name == None)
self.assertFalse(name == "")
def test_registry(self):
self.check_name(cv.videoio_registry.getBackendName(cv.CAP_ANY));
self.check_name(cv.videoio_registry.getBackendName(cv.CAP_FFMPEG))
Reported by Pylint.
Line: 16
Column: 5
self.assertFalse(name == None)
self.assertFalse(name == "")
def test_registry(self):
self.check_name(cv.videoio_registry.getBackendName(cv.CAP_ANY));
self.check_name(cv.videoio_registry.getBackendName(cv.CAP_FFMPEG))
self.check_name(cv.videoio_registry.getBackendName(cv.CAP_OPENCV_MJPEG))
backends = cv.videoio_registry.getBackends()
for backend in backends:
Reported by Pylint.
modules/core/misc/java/src/java/core+Range.java
9 issues
Line: 18
}
public Range(double[] vals) {
set(vals);
}
public void set(double[] vals) {
if (vals != null) {
start = vals.length > 0 ? (int) vals[0] : 0;
Reported by PMD.
Line: 54
return new Range(start + delta, end + delta);
}
public Range clone() {
return new Range(start, end);
}
@Override
public int hashCode() {
Reported by PMD.
Line: 6
//javadoc:Range
public class Range {
public int start, end;
public Range(int s, int e) {
this.start = s;
this.end = e;
}
Reported by PMD.
Line: 6
//javadoc:Range
public class Range {
public int start, end;
public Range(int s, int e) {
this.start = s;
this.end = e;
}
Reported by PMD.
Line: 54
return new Range(start + delta, end + delta);
}
public Range clone() {
return new Range(start, end);
}
@Override
public int hashCode() {
Reported by PMD.
Line: 54
return new Range(start + delta, end + delta);
}
public Range clone() {
return new Range(start, end);
}
@Override
public int hashCode() {
Reported by PMD.
Line: 6
//javadoc:Range
public class Range {
public int start, end;
public Range(int s, int e) {
this.start = s;
this.end = e;
}
Reported by PMD.
Line: 17
this(0, 0);
}
public Range(double[] vals) {
set(vals);
}
public void set(double[] vals) {
if (vals != null) {
Reported by PMD.
Line: 21
set(vals);
}
public void set(double[] vals) {
if (vals != null) {
start = vals.length > 0 ? (int) vals[0] : 0;
end = vals.length > 1 ? (int) vals[1] : 0;
} else {
start = 0;
Reported by PMD.
modules/core/misc/java/src/java/core+Point.java
9 issues
Line: 19
public Point(double[] vals) {
this();
set(vals);
}
public void set(double[] vals) {
if (vals != null) {
x = vals.length > 0 ? vals[0] : 0;
Reported by PMD.
Line: 32
}
}
public Point clone() {
return new Point(x, y);
}
public double dot(Point p) {
return x * p.x + y * p.y;
Reported by PMD.
Line: 6
//javadoc:Point_
public class Point {
public double x, y;
public Point(double x, double y) {
this.x = x;
this.y = y;
}
Reported by PMD.
Line: 6
//javadoc:Point_
public class Point {
public double x, y;
public Point(double x, double y) {
this.x = x;
this.y = y;
}
Reported by PMD.
Line: 32
}
}
public Point clone() {
return new Point(x, y);
}
public double dot(Point p) {
return x * p.x + y * p.y;
Reported by PMD.
Line: 32
}
}
public Point clone() {
return new Point(x, y);
}
public double dot(Point p) {
return x * p.x + y * p.y;
Reported by PMD.
Line: 6
//javadoc:Point_
public class Point {
public double x, y;
public Point(double x, double y) {
this.x = x;
this.y = y;
}
Reported by PMD.
Line: 17
this(0, 0);
}
public Point(double[] vals) {
this();
set(vals);
}
public void set(double[] vals) {
Reported by PMD.
Line: 22
set(vals);
}
public void set(double[] vals) {
if (vals != null) {
x = vals.length > 0 ? vals[0] : 0;
y = vals.length > 1 ? vals[1] : 0;
} else {
x = 0;
Reported by PMD.
modules/ts/misc/concatlogs.py
9 issues
Line: 3
Column: 1
#!/usr/bin/env python
from optparse import OptionParser
import glob, sys, os, re
if __name__ == "__main__":
parser = OptionParser()
parser.add_option("-o", "--output", dest="output", help="output file name", metavar="FILENAME", default=None)
(options, args) = parser.parse_args()
Reported by Pylint.
Line: 35
Column: 9
idx1 = text.find("<tbody>") + len("<tbody>")
idx2 = html.rfind("</tbody>")
html = html[:idx2] + re.sub(r"[ \t\n\r]+", " ", text[idx1:])
except:
pass
if html:
idx1 = text.find("<title>") + len("<title>")
idx2 = html.find("</title>")
Reported by Pylint.
Line: 1
Column: 1
#!/usr/bin/env python
from optparse import OptionParser
import glob, sys, os, re
if __name__ == "__main__":
parser = OptionParser()
parser.add_option("-o", "--output", dest="output", help="output file name", metavar="FILENAME", default=None)
(options, args) = parser.parse_args()
Reported by Pylint.
Line: 4
Column: 1
#!/usr/bin/env python
from optparse import OptionParser
import glob, sys, os, re
if __name__ == "__main__":
parser = OptionParser()
parser.add_option("-o", "--output", dest="output", help="output file name", metavar="FILENAME", default=None)
(options, args) = parser.parse_args()
Reported by Pylint.
Line: 8
Column: 1
if __name__ == "__main__":
parser = OptionParser()
parser.add_option("-o", "--output", dest="output", help="output file name", metavar="FILENAME", default=None)
(options, args) = parser.parse_args()
if not options.output:
sys.stderr.write("Error: output file name is not provided")
exit(-1)
Reported by Pylint.
Line: 13
Column: 9
if not options.output:
sys.stderr.write("Error: output file name is not provided")
exit(-1)
files = []
for arg in args:
if ("*" in arg) or ("?" in arg):
files.extend([os.path.abspath(f) for f in glob.glob(arg)])
Reported by Pylint.
Line: 22
Column: 5
else:
files.append(os.path.abspath(arg))
html = None
for f in sorted(files):
try:
fobj = open(f)
if not fobj:
continue
Reported by Pylint.
Line: 35
Suggestion:
https://bandit.readthedocs.io/en/latest/plugins/b110_try_except_pass.html
idx1 = text.find("<tbody>") + len("<tbody>")
idx2 = html.rfind("</tbody>")
html = html[:idx2] + re.sub(r"[ \t\n\r]+", " ", text[idx1:])
except:
pass
if html:
idx1 = text.find("<title>") + len("<title>")
idx2 = html.find("</title>")
Reported by Bandit.
Line: 45
Column: 9
open(options.output, "w").write(html)
else:
sys.stderr.write("Error: no input data")
exit(-1)
Reported by Pylint.
modules/python/test/test_copytomask.py
9 issues
Line: 11
Column: 1
from __future__ import print_function
import numpy as np
import cv2 as cv
import sys
from tests_common import NewOpenCVTests
class copytomask_test(NewOpenCVTests):
Reported by Pylint.
Line: 12
Column: 1
import numpy as np
import cv2 as cv
import sys
from tests_common import NewOpenCVTests
class copytomask_test(NewOpenCVTests):
def test_copytomask(self):
Reported by Pylint.
Line: 12
Column: 1
import numpy as np
import cv2 as cv
import sys
from tests_common import NewOpenCVTests
class copytomask_test(NewOpenCVTests):
def test_copytomask(self):
Reported by Pylint.
Line: 16
Column: 1
from tests_common import NewOpenCVTests
class copytomask_test(NewOpenCVTests):
def test_copytomask(self):
img = self.get_sample('python/images/baboon.png', cv.IMREAD_COLOR)
eps = 0.
Reported by Pylint.
Line: 16
Column: 1
from tests_common import NewOpenCVTests
class copytomask_test(NewOpenCVTests):
def test_copytomask(self):
img = self.get_sample('python/images/baboon.png', cv.IMREAD_COLOR)
eps = 0.
Reported by Pylint.
Line: 17
Column: 5
from tests_common import NewOpenCVTests
class copytomask_test(NewOpenCVTests):
def test_copytomask(self):
img = self.get_sample('python/images/baboon.png', cv.IMREAD_COLOR)
eps = 0.
#Create mask using inRange
Reported by Pylint.
Line: 23
Column: 9
eps = 0.
#Create mask using inRange
valeurBGRinf = np.array([0,0,100])
valeurBGRSup = np.array([70, 70,255])
maskRed = cv.inRange(img, valeurBGRinf, valeurBGRSup)
#New binding
dstcv = np.ndarray(np.array((2, 2, 1))*img.shape, dtype=img.dtype)
dstcv.fill(255)
Reported by Pylint.
Line: 24
Column: 9
#Create mask using inRange
valeurBGRinf = np.array([0,0,100])
valeurBGRSup = np.array([70, 70,255])
maskRed = cv.inRange(img, valeurBGRinf, valeurBGRSup)
#New binding
dstcv = np.ndarray(np.array((2, 2, 1))*img.shape, dtype=img.dtype)
dstcv.fill(255)
cv.copyTo(img, maskRed, dstcv[:img.shape[0],:img.shape[1],:])
Reported by Pylint.
Line: 25
Column: 9
#Create mask using inRange
valeurBGRinf = np.array([0,0,100])
valeurBGRSup = np.array([70, 70,255])
maskRed = cv.inRange(img, valeurBGRinf, valeurBGRSup)
#New binding
dstcv = np.ndarray(np.array((2, 2, 1))*img.shape, dtype=img.dtype)
dstcv.fill(255)
cv.copyTo(img, maskRed, dstcv[:img.shape[0],:img.shape[1],:])
#using numpy
Reported by Pylint.
modules/objdetect/misc/java/test/QRCodeDetectorTest.java
9 issues
Line: 24
testDataPath = System.getenv(ENV_OPENCV_TEST_DATA_PATH);
if (testDataPath == null)
throw new Exception(ENV_OPENCV_TEST_DATA_PATH + " has to be defined!");
}
public void testDetectAndDecode() {
Mat img = Imgcodecs.imread(testDataPath + "/cv/qrcode/link_ocv.jpg");
assertFalse(img.empty());
Reported by PMD.
Line: 16
public class QRCodeDetectorTest extends OpenCVTestCase {
private final static String ENV_OPENCV_TEST_DATA_PATH = "OPENCV_TEST_DATA_PATH";
private String testDataPath;
@Override
protected void setUp() throws Exception {
super.setUp();
Reported by PMD.
Line: 18
private final static String ENV_OPENCV_TEST_DATA_PATH = "OPENCV_TEST_DATA_PATH";
private String testDataPath;
@Override
protected void setUp() throws Exception {
super.setUp();
testDataPath = System.getenv(ENV_OPENCV_TEST_DATA_PATH);
if (testDataPath == null)
Reported by PMD.
Line: 27
throw new Exception(ENV_OPENCV_TEST_DATA_PATH + " has to be defined!");
}
public void testDetectAndDecode() {
Mat img = Imgcodecs.imread(testDataPath + "/cv/qrcode/link_ocv.jpg");
assertFalse(img.empty());
QRCodeDetector detector = new QRCodeDetector();
assertNotNull(detector);
String output = detector.detectAndDecode(img);
Reported by PMD.
Line: 27
throw new Exception(ENV_OPENCV_TEST_DATA_PATH + " has to be defined!");
}
public void testDetectAndDecode() {
Mat img = Imgcodecs.imread(testDataPath + "/cv/qrcode/link_ocv.jpg");
assertFalse(img.empty());
QRCodeDetector detector = new QRCodeDetector();
assertNotNull(detector);
String output = detector.detectAndDecode(img);
Reported by PMD.
Line: 29
public void testDetectAndDecode() {
Mat img = Imgcodecs.imread(testDataPath + "/cv/qrcode/link_ocv.jpg");
assertFalse(img.empty());
QRCodeDetector detector = new QRCodeDetector();
assertNotNull(detector);
String output = detector.detectAndDecode(img);
assertEquals(output, "https://opencv.org/");
}
Reported by PMD.
Line: 36
assertEquals(output, "https://opencv.org/");
}
public void testDetectAndDecodeMulti() {
Mat img = Imgcodecs.imread(testDataPath + "/cv/qrcode/multiple/6_qrcodes.png");
assertFalse(img.empty());
QRCodeDetector detector = new QRCodeDetector();
assertNotNull(detector);
List < String > output = new ArrayList< String >();
Reported by PMD.
Line: 36
assertEquals(output, "https://opencv.org/");
}
public void testDetectAndDecodeMulti() {
Mat img = Imgcodecs.imread(testDataPath + "/cv/qrcode/multiple/6_qrcodes.png");
assertFalse(img.empty());
QRCodeDetector detector = new QRCodeDetector();
assertNotNull(detector);
List < String > output = new ArrayList< String >();
Reported by PMD.
Line: 38
public void testDetectAndDecodeMulti() {
Mat img = Imgcodecs.imread(testDataPath + "/cv/qrcode/multiple/6_qrcodes.png");
assertFalse(img.empty());
QRCodeDetector detector = new QRCodeDetector();
assertNotNull(detector);
List < String > output = new ArrayList< String >();
boolean result = detector.detectAndDecodeMulti(img, output);
assertTrue(result);
Reported by PMD.
modules/js/generator/templates.py
9 issues
Line: 1
Column: 1
###############################################################################
#
# IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
#
# By downloading, copying, installing or using the software you agree to this license.
# If you do not agree to this license, do not download, install,
# copy or use the software.
#
#
Reported by Pylint.
Line: 99
Column: 1
Template("""if ($arg0.isUndefined() && $arg1.isUndefined() && $arg2.isUndefined())
return $cpp_call;
else $next"""),
Template("""if ($arg0.isUndefined() && $arg1.isUndefined() && $arg2.isUndefined() && $arg3.isUndefined())
return $cpp_call;
else $next"""),
Template("""if ($arg0.isUndefined() && $arg1.isUndefined() && $arg2.isUndefined() && $arg3.isUndefined() &&
$arg4.isUndefined())
return $cpp_call;
Reported by Pylint.
Line: 102
Column: 1
Template("""if ($arg0.isUndefined() && $arg1.isUndefined() && $arg2.isUndefined() && $arg3.isUndefined())
return $cpp_call;
else $next"""),
Template("""if ($arg0.isUndefined() && $arg1.isUndefined() && $arg2.isUndefined() && $arg3.isUndefined() &&
$arg4.isUndefined())
return $cpp_call;
else $next"""),
Template("""if ($arg0.isUndefined() && $arg1.isUndefined() && $arg2.isUndefined() && $arg3.isUndefined() &&
$arg4.isUndefined() && $arg5.isUndefined() )
Reported by Pylint.
Line: 106
Column: 1
$arg4.isUndefined())
return $cpp_call;
else $next"""),
Template("""if ($arg0.isUndefined() && $arg1.isUndefined() && $arg2.isUndefined() && $arg3.isUndefined() &&
$arg4.isUndefined() && $arg5.isUndefined() )
return $cpp_call;
else $next"""),
Template("""if ($arg0.isUndefined() && $arg1.isUndefined() && $arg2.isUndefined() && $arg3.isUndefined() &&
$arg4.isUndefined() && $arg5.isUndefined() && $arg6.isUndefined() )
Reported by Pylint.
Line: 110
Column: 1
$arg4.isUndefined() && $arg5.isUndefined() )
return $cpp_call;
else $next"""),
Template("""if ($arg0.isUndefined() && $arg1.isUndefined() && $arg2.isUndefined() && $arg3.isUndefined() &&
$arg4.isUndefined() && $arg5.isUndefined() && $arg6.isUndefined() )
return $cpp_call;
else $next"""),
Template("""if ($arg0.isUndefined() && $arg1.isUndefined() && $arg2.isUndefined() && $arg3.isUndefined() &&
$arg4.isUndefined() && $arg5.isUndefined()&& $arg6.isUndefined() && $arg7.isUndefined())
Reported by Pylint.
Line: 114
Column: 1
$arg4.isUndefined() && $arg5.isUndefined() && $arg6.isUndefined() )
return $cpp_call;
else $next"""),
Template("""if ($arg0.isUndefined() && $arg1.isUndefined() && $arg2.isUndefined() && $arg3.isUndefined() &&
$arg4.isUndefined() && $arg5.isUndefined()&& $arg6.isUndefined() && $arg7.isUndefined())
return $cpp_call;
else $next"""),
Template("""if ($arg0.isUndefined() && $arg1.isUndefined() && $arg2.isUndefined() && $arg3.isUndefined() &&
$arg4.isUndefined() && $arg5.isUndefined()&& $arg6.isUndefined() && $arg7.isUndefined() &&
Reported by Pylint.
Line: 118
Column: 1
$arg4.isUndefined() && $arg5.isUndefined()&& $arg6.isUndefined() && $arg7.isUndefined())
return $cpp_call;
else $next"""),
Template("""if ($arg0.isUndefined() && $arg1.isUndefined() && $arg2.isUndefined() && $arg3.isUndefined() &&
$arg4.isUndefined() && $arg5.isUndefined()&& $arg6.isUndefined() && $arg7.isUndefined() &&
$arg8.isUndefined())
return $cpp_call;
else $next"""),
Template("""if ($arg0.isUndefined() && $arg1.isUndefined() && $arg2.isUndefined() && $arg3.isUndefined() &&
Reported by Pylint.
Line: 123
Column: 1
$arg8.isUndefined())
return $cpp_call;
else $next"""),
Template("""if ($arg0.isUndefined() && $arg1.isUndefined() && $arg2.isUndefined() && $arg3.isUndefined() &&
$arg4.isUndefined() && $arg5.isUndefined()&& $arg6.isUndefined() && $arg7.isUndefined()&&
$arg8.isUndefined() && $arg9.isUndefined())
return $cpp_call;
else $next""")]
Reported by Pylint.
Line: 163
Column: 1
.constructor(select_overload<$ret($args)$const>(&$cpp_name)$optional)""")
smart_ptr_ctr_overload_template = Template("""
.smart_ptr_constructor("$ptr_type", select_overload<$ret($args)$const>(&$cpp_name)$optional)""")
function_template = Template("""
.function("$js_name", &$cpp_name)""")
static_function_template = Template("""
Reported by Pylint.