The following issues were found

src/third_party/wiredtiger/test/suite/test_util19.py
15 issues
Unable to import 'wiredtiger'
Error

Line: 30 Column: 1

              # OTHER DEALINGS IN THE SOFTWARE.

from suite_subprocess import suite_subprocess
import wiredtiger, wttest
from wtscenario import make_scenarios

# test_util19.py
#   Utilities: wt downgrade
class test_util19(wttest.WiredTigerTestCase, suite_subprocess):

            

Reported by Pylint.

An attribute defined in wttest line 401 hides this method
Error

Line: 63 Column: 5

              
    scenarios = make_scenarios(create_release, downgrade_release)

    def conn_config(self):
        conf_str = 'log=(archive=false,enabled,file_max=%s),' % self.log_max
        if (self.create_rel != 'none'):
            conf_str += 'compatibility=(release="%s"),' % (self.create_rel)
        return conf_str


            

Reported by Pylint.

Unused import wiredtiger
Error

Line: 30 Column: 1

              # OTHER DEALINGS IN THE SOFTWARE.

from suite_subprocess import suite_subprocess
import wiredtiger, wttest
from wtscenario import make_scenarios

# test_util19.py
#   Utilities: wt downgrade
class test_util19(wttest.WiredTigerTestCase, suite_subprocess):

            

Reported by Pylint.

Anomalous backslash in string: '\.'. String constant might be missing an r prefix.
Error

Line: 90 Column: 37

                      self.runWt(['-C', wt_config , 'downgrade', downgrade_opt], reopensession=False, outfilename='downgrade.out')
        # Based on the downgrade version we can test if the corresponding log compatibility version
        # has been set.
        compat_str = '/WT_CONNECTION\.reconfigure: .*: COMPATIBILITY: Version now %d/' % self.log_downgrade_compat
        if self.log_downgrade_compat != self.log_latest_compat:
            self.check_file_contains('downgrade.out', compat_str)
        else:
            self.check_file_not_contains('downgrade.out', compat_str)


            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              #!/usr/bin/env python
#
# Public Domain 2014-present MongoDB, Inc.
# Public Domain 2008-2014 WiredTiger, Inc.
#
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled

            

Reported by Pylint.

third party import "import wiredtiger, wttest" should be placed before "from suite_subprocess import suite_subprocess"
Error

Line: 30 Column: 1

              # OTHER DEALINGS IN THE SOFTWARE.

from suite_subprocess import suite_subprocess
import wiredtiger, wttest
from wtscenario import make_scenarios

# test_util19.py
#   Utilities: wt downgrade
class test_util19(wttest.WiredTigerTestCase, suite_subprocess):

            

Reported by Pylint.

Multiple imports on one line (wiredtiger, wttest)
Error

Line: 30 Column: 1

              # OTHER DEALINGS IN THE SOFTWARE.

from suite_subprocess import suite_subprocess
import wiredtiger, wttest
from wtscenario import make_scenarios

# test_util19.py
#   Utilities: wt downgrade
class test_util19(wttest.WiredTigerTestCase, suite_subprocess):

            

Reported by Pylint.

Missing class docstring
Error

Line: 35 Column: 1

              
# test_util19.py
#   Utilities: wt downgrade
class test_util19(wttest.WiredTigerTestCase, suite_subprocess):
    tablename = 'test_util19.a'
    uri = 'table:' + tablename
    entries = 100
    log_max = "100K"
    log_latest_compat = 5

            

Reported by Pylint.

Class name "test_util19" doesn't conform to PascalCase naming style
Error

Line: 35 Column: 1

              
# test_util19.py
#   Utilities: wt downgrade
class test_util19(wttest.WiredTigerTestCase, suite_subprocess):
    tablename = 'test_util19.a'
    uri = 'table:' + tablename
    entries = 100
    log_max = "100K"
    log_latest_compat = 5

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 63 Column: 5

              
    scenarios = make_scenarios(create_release, downgrade_release)

    def conn_config(self):
        conf_str = 'log=(archive=false,enabled,file_max=%s),' % self.log_max
        if (self.create_rel != 'none'):
            conf_str += 'compatibility=(release="%s"),' % (self.create_rel)
        return conf_str


            

Reported by Pylint.

src/third_party/abseil-cpp-master/abseil-cpp/conanfile.py
15 issues
Unable to import 'conans'
Error

Line: 8 Column: 1

              # internally, so we won't know if it stops working. We may ask community
# members to help us debug any problems that arise.

from conans import ConanFile, CMake, tools
from conans.errors import ConanInvalidConfiguration
from conans.model.version import Version


class AbseilConan(ConanFile):

            

Reported by Pylint.

Unable to import 'conans.errors'
Error

Line: 9 Column: 1

              # members to help us debug any problems that arise.

from conans import ConanFile, CMake, tools
from conans.errors import ConanInvalidConfiguration
from conans.model.version import Version


class AbseilConan(ConanFile):
    name = "abseil"

            

Reported by Pylint.

Unable to import 'conans.model.version'
Error

Line: 10 Column: 1

              
from conans import ConanFile, CMake, tools
from conans.errors import ConanInvalidConfiguration
from conans.model.version import Version


class AbseilConan(ConanFile):
    name = "abseil"
    url = "https://github.com/abseil/abseil-cpp"

            

Reported by Pylint.

Instance of 'tuple' has no 'os' member
Error

Line: 27 Column: 12

                  settings = "os", "arch", "compiler", "build_type"

    def configure(self):
        if self.settings.os == "Windows" and \
           self.settings.compiler == "Visual Studio" and \
           Version(self.settings.compiler.version.value) < "14":
            raise ConanInvalidConfiguration("Abseil does not support MSVC < 14")

    def build(self):

            

Reported by Pylint.

Instance of 'tuple' has no 'compiler' member
Error

Line: 28 Column: 12

              
    def configure(self):
        if self.settings.os == "Windows" and \
           self.settings.compiler == "Visual Studio" and \
           Version(self.settings.compiler.version.value) < "14":
            raise ConanInvalidConfiguration("Abseil does not support MSVC < 14")

    def build(self):
        tools.replace_in_file("CMakeLists.txt", "project(absl CXX)", "project(absl CXX)\ninclude(conanbuildinfo.cmake)\nconan_basic_setup()")

            

Reported by Pylint.

Instance of 'tuple' has no 'compiler' member
Error

Line: 29 Column: 20

                  def configure(self):
        if self.settings.os == "Windows" and \
           self.settings.compiler == "Visual Studio" and \
           Version(self.settings.compiler.version.value) < "14":
            raise ConanInvalidConfiguration("Abseil does not support MSVC < 14")

    def build(self):
        tools.replace_in_file("CMakeLists.txt", "project(absl CXX)", "project(absl CXX)\ninclude(conanbuildinfo.cmake)\nconan_basic_setup()")
        cmake = CMake(self)

            

Reported by Pylint.

Instance of 'tuple' has no 'os' member
Error

Line: 47 Column: 12

                      self.copy("*.lib", dst="lib", src=".", keep_path=False)

    def package_info(self):
        if self.settings.os == "Linux":
            self.cpp_info.libs = ["-Wl,--start-group"]
        self.cpp_info.libs.extend(tools.collect_libs(self))
        if self.settings.os == "Linux":
            self.cpp_info.libs.extend(["-Wl,--end-group", "pthread"])

            

Reported by Pylint.

Instance of 'tuple' has no 'os' member
Error

Line: 50 Column: 12

                      if self.settings.os == "Linux":
            self.cpp_info.libs = ["-Wl,--start-group"]
        self.cpp_info.libs.extend(tools.collect_libs(self))
        if self.settings.os == "Linux":
            self.cpp_info.libs.extend(["-Wl,--end-group", "pthread"])

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              #!/usr/bin/env python
# -*- coding: utf-8 -*-

# Note: Conan is supported on a best-effort basis. Abseil doesn't use Conan
# internally, so we won't know if it stops working. We may ask community
# members to help us debug any problems that arise.

from conans import ConanFile, CMake, tools
from conans.errors import ConanInvalidConfiguration

            

Reported by Pylint.

Missing class docstring
Error

Line: 13 Column: 1

              from conans.model.version import Version


class AbseilConan(ConanFile):
    name = "abseil"
    url = "https://github.com/abseil/abseil-cpp"
    homepage = url
    author = "Abseil <abseil-io@googlegroups.com>"
    description = "Abseil Common Libraries (C++) from Google"

            

Reported by Pylint.

src/third_party/wiredtiger/test/suite/test_calc_modify.py
15 issues
Unable to import 'wiredtiger'
Error

Line: 30 Column: 1

              # OTHER DEALINGS IN THE SOFTWARE.

import random, string
import wiredtiger, wttest
from wtscenario import make_scenarios

r = random.Random(42) # Make things repeatable

# test_calc_modify.py

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              #!/usr/bin/env python
#
# Public Domain 2014-present MongoDB, Inc.
# Public Domain 2008-2014 WiredTiger, Inc.
#
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled

            

Reported by Pylint.

Multiple imports on one line (random, string)
Error

Line: 29 Column: 1

              # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.

import random, string
import wiredtiger, wttest
from wtscenario import make_scenarios

r = random.Random(42) # Make things repeatable


            

Reported by Pylint.

Multiple imports on one line (wiredtiger, wttest)
Error

Line: 30 Column: 1

              # OTHER DEALINGS IN THE SOFTWARE.

import random, string
import wiredtiger, wttest
from wtscenario import make_scenarios

r = random.Random(42) # Make things repeatable

# test_calc_modify.py

            

Reported by Pylint.

Missing class docstring
Error

Line: 48 Column: 1

              # difference is under the specified limits, and that applying those
# modifications produces the expected result.  If the edit difference is
# larger than the limits, it okay for the call to fail.
class test_calc_modify(wttest.WiredTigerTestCase):
    uri = 'table:test_calc_modify'

    # operation types
    ADD = 1
    REMOVE = 2

            

Reported by Pylint.

Class name "test_calc_modify" doesn't conform to PascalCase naming style
Error

Line: 48 Column: 1

              # difference is under the specified limits, and that applying those
# modifications produces the expected result.  If the edit difference is
# larger than the limits, it okay for the call to fail.
class test_calc_modify(wttest.WiredTigerTestCase):
    uri = 'table:test_calc_modify'

    # operation types
    ADD = 1
    REMOVE = 2

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 62 Column: 5

                  ]
    scenarios = make_scenarios(valuefmt)

    def mkstring(self, size, repeat_size=1):
        choices = string.ascii_letters + string.digits
        if self.valuefmt == 'S':
            pattern = ''.join(r.choice(choices) for _ in range(repeat_size))
        else:
            pattern = b''.join(bytes([r.choice(choices.encode())]) for _ in range(repeat_size))

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 70 Column: 5

                          pattern = b''.join(bytes([r.choice(choices.encode())]) for _ in range(repeat_size))
        return (pattern * ((size + repeat_size - 1) // repeat_size))[:size]

    def one_test(self, c, k, oldsz, repeatsz, nmod, maxdiff):
        oldv = self.mkstring(oldsz, repeatsz)

        offsets = sorted(r.sample(range(oldsz), nmod))
        modsizes = sorted(r.sample(range(maxdiff), nmod + 1))
        lengths = [modsizes[i+1] - modsizes[i] for i in range(nmod)]

            

Reported by Pylint.

Too many local variables (16/15)
Error

Line: 70 Column: 5

                          pattern = b''.join(bytes([r.choice(choices.encode())]) for _ in range(repeat_size))
        return (pattern * ((size + repeat_size - 1) // repeat_size))[:size]

    def one_test(self, c, k, oldsz, repeatsz, nmod, maxdiff):
        oldv = self.mkstring(oldsz, repeatsz)

        offsets = sorted(r.sample(range(oldsz), nmod))
        modsizes = sorted(r.sample(range(maxdiff), nmod + 1))
        lengths = [modsizes[i+1] - modsizes[i] for i in range(nmod)]

            

Reported by Pylint.

Argument name "c" doesn't conform to snake_case naming style
Error

Line: 70 Column: 5

                          pattern = b''.join(bytes([r.choice(choices.encode())]) for _ in range(repeat_size))
        return (pattern * ((size + repeat_size - 1) // repeat_size))[:size]

    def one_test(self, c, k, oldsz, repeatsz, nmod, maxdiff):
        oldv = self.mkstring(oldsz, repeatsz)

        offsets = sorted(r.sample(range(oldsz), nmod))
        modsizes = sorted(r.sample(range(maxdiff), nmod + 1))
        lengths = [modsizes[i+1] - modsizes[i] for i in range(nmod)]

            

Reported by Pylint.

src/third_party/wiredtiger/test/suite/test_bug024.py
15 issues
Unable to import 'wiredtiger'
Error

Line: 34 Column: 1

              # [END_TAGS]

from helper import copy_wiredtiger_home
import wiredtiger, wttest
from wtdataset import SimpleDataSet
import os, shutil

# test_bug024.py
# WT-6526: test that we can successfully open a readonly connection after it was stopped while

            

Reported by Pylint.

Unused copy_wiredtiger_home imported from helper
Error

Line: 33 Column: 1

              # connection_api:turtle_file
# [END_TAGS]

from helper import copy_wiredtiger_home
import wiredtiger, wttest
from wtdataset import SimpleDataSet
import os, shutil

# test_bug024.py

            

Reported by Pylint.

Unused import wiredtiger
Error

Line: 34 Column: 1

              # [END_TAGS]

from helper import copy_wiredtiger_home
import wiredtiger, wttest
from wtdataset import SimpleDataSet
import os, shutil

# test_bug024.py
# WT-6526: test that we can successfully open a readonly connection after it was stopped while

            

Reported by Pylint.

Unused import os
Error

Line: 36 Column: 1

              from helper import copy_wiredtiger_home
import wiredtiger, wttest
from wtdataset import SimpleDataSet
import os, shutil

# test_bug024.py
# WT-6526: test that we can successfully open a readonly connection after it was stopped while
# the temporary turtle file existed. We simulate that by copying the turtle file to its temporary name
# and then opening the connection readonly.

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              #!/usr/bin/env python
#
# Public Domain 2014-present MongoDB, Inc.
# Public Domain 2008-2014 WiredTiger, Inc.
#
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled

            

Reported by Pylint.

third party import "import wiredtiger, wttest" should be placed before "from helper import copy_wiredtiger_home"
Error

Line: 34 Column: 1

              # [END_TAGS]

from helper import copy_wiredtiger_home
import wiredtiger, wttest
from wtdataset import SimpleDataSet
import os, shutil

# test_bug024.py
# WT-6526: test that we can successfully open a readonly connection after it was stopped while

            

Reported by Pylint.

Multiple imports on one line (wiredtiger, wttest)
Error

Line: 34 Column: 1

              # [END_TAGS]

from helper import copy_wiredtiger_home
import wiredtiger, wttest
from wtdataset import SimpleDataSet
import os, shutil

# test_bug024.py
# WT-6526: test that we can successfully open a readonly connection after it was stopped while

            

Reported by Pylint.

standard import "import os, shutil" should be placed before "import wiredtiger, wttest"
Error

Line: 36 Column: 1

              from helper import copy_wiredtiger_home
import wiredtiger, wttest
from wtdataset import SimpleDataSet
import os, shutil

# test_bug024.py
# WT-6526: test that we can successfully open a readonly connection after it was stopped while
# the temporary turtle file existed. We simulate that by copying the turtle file to its temporary name
# and then opening the connection readonly.

            

Reported by Pylint.

standard import "import os, shutil" should be placed before "import wiredtiger, wttest"
Error

Line: 36 Column: 1

              from helper import copy_wiredtiger_home
import wiredtiger, wttest
from wtdataset import SimpleDataSet
import os, shutil

# test_bug024.py
# WT-6526: test that we can successfully open a readonly connection after it was stopped while
# the temporary turtle file existed. We simulate that by copying the turtle file to its temporary name
# and then opening the connection readonly.

            

Reported by Pylint.

Multiple imports on one line (os, shutil)
Error

Line: 36 Column: 1

              from helper import copy_wiredtiger_home
import wiredtiger, wttest
from wtdataset import SimpleDataSet
import os, shutil

# test_bug024.py
# WT-6526: test that we can successfully open a readonly connection after it was stopped while
# the temporary turtle file existed. We simulate that by copying the turtle file to its temporary name
# and then opening the connection readonly.

            

Reported by Pylint.

src/third_party/wiredtiger/dist/api_err.py
15 issues
Unused import re
Error

Line: 4 Column: 1

              # Output C #defines for errors into wiredtiger.in and the associated error
# message code in strerror.c.

import re, textwrap
from dist import compare_srcfile, format_srcfile

class Error:
    def __init__(self, name, value, desc, long_desc=None, **flags):
        self.name = name

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              # Output C #defines for errors into wiredtiger.in and the associated error
# message code in strerror.c.

import re, textwrap
from dist import compare_srcfile, format_srcfile

class Error:
    def __init__(self, name, value, desc, long_desc=None, **flags):
        self.name = name

            

Reported by Pylint.

Multiple imports on one line (re, textwrap)
Error

Line: 4 Column: 1

              # Output C #defines for errors into wiredtiger.in and the associated error
# message code in strerror.c.

import re, textwrap
from dist import compare_srcfile, format_srcfile

class Error:
    def __init__(self, name, value, desc, long_desc=None, **flags):
        self.name = name

            

Reported by Pylint.

Missing class docstring
Error

Line: 7 Column: 1

              import re, textwrap
from dist import compare_srcfile, format_srcfile

class Error:
    def __init__(self, name, value, desc, long_desc=None, **flags):
        self.name = name
        self.value = value
        self.desc = desc
        self.long_desc = long_desc

            

Reported by Pylint.

Too few public methods (0/2)
Error

Line: 7 Column: 1

              import re, textwrap
from dist import compare_srcfile, format_srcfile

class Error:
    def __init__(self, name, value, desc, long_desc=None, **flags):
        self.name = name
        self.value = value
        self.desc = desc
        self.long_desc = long_desc

            

Reported by Pylint.

Constant name "tmp_file" doesn't conform to UPPER_CASE naming style
Error

Line: 78 Column: 1

              ]

# Update the #defines in the wiredtiger.in file.
tmp_file = '__tmp'
tfile = open(tmp_file, 'w')
skip = 0
for line in open('../src/include/wiredtiger.in', 'r'):
    if not skip:
        tfile.write(line)

            

Reported by Pylint.

Constant name "skip" doesn't conform to UPPER_CASE naming style
Error

Line: 80 Column: 1

              # Update the #defines in the wiredtiger.in file.
tmp_file = '__tmp'
tfile = open(tmp_file, 'w')
skip = 0
for line in open('../src/include/wiredtiger.in', 'r'):
    if not skip:
        tfile.write(line)
    if line.count('Error return section: END'):
        tfile.write(line)

            

Reported by Pylint.

Constant name "skip" doesn't conform to UPPER_CASE naming style
Error

Line: 86 Column: 9

                      tfile.write(line)
    if line.count('Error return section: END'):
        tfile.write(line)
        skip = 0
    elif line.count('Error return section: BEGIN'):
        tfile.write(' */\n')
        skip = 1
        for err in errors:
            if 'undoc' in err.flags:

            

Reported by Pylint.

Constant name "skip" doesn't conform to UPPER_CASE naming style
Error

Line: 89 Column: 9

                      skip = 0
    elif line.count('Error return section: BEGIN'):
        tfile.write(' */\n')
        skip = 1
        for err in errors:
            if 'undoc' in err.flags:
                tfile.write('/*! @cond internal */\n')
            tfile.write('/*!%s.%s */\n' %
                (('\n * ' if err.long_desc else ' ') +

            

Reported by Pylint.

Constant name "tmp_file" doesn't conform to UPPER_CASE naming style
Error

Line: 107 Column: 1

              compare_srcfile(tmp_file, '../src/include/wiredtiger.in')

# Output the wiredtiger_strerror and wiredtiger_sterror_r code.
tmp_file = '__tmp'
tfile = open(tmp_file, 'w')
tfile.write('''/* DO NOT EDIT: automatically built by dist/api_err.py. */

#include "wt_internal.h"


            

Reported by Pylint.

src/third_party/wiredtiger/test/suite/test_bulk02.py
15 issues
Unable to import 'wiredtiger'
Error

Line: 33 Column: 1

              #       Bulk-load testing.

import shutil, os
import wiredtiger, wttest
from helper import confirm_empty
from suite_subprocess import suite_subprocess
from wtdataset import SimpleDataSet, simple_key, simple_value
from wtscenario import make_scenarios


            

Reported by Pylint.

Unused import shutil
Error

Line: 32 Column: 1

              # test_bulk02.py
#       Bulk-load testing.

import shutil, os
import wiredtiger, wttest
from helper import confirm_empty
from suite_subprocess import suite_subprocess
from wtdataset import SimpleDataSet, simple_key, simple_value
from wtscenario import make_scenarios

            

Reported by Pylint.

Unused import os
Error

Line: 32 Column: 1

              # test_bulk02.py
#       Bulk-load testing.

import shutil, os
import wiredtiger, wttest
from helper import confirm_empty
from suite_subprocess import suite_subprocess
from wtdataset import SimpleDataSet, simple_key, simple_value
from wtscenario import make_scenarios

            

Reported by Pylint.

Unused confirm_empty imported from helper
Error

Line: 34 Column: 1

              
import shutil, os
import wiredtiger, wttest
from helper import confirm_empty
from suite_subprocess import suite_subprocess
from wtdataset import SimpleDataSet, simple_key, simple_value
from wtscenario import make_scenarios

# test_bulkload_checkpoint

            

Reported by Pylint.

Unused SimpleDataSet imported from wtdataset
Error

Line: 36 Column: 1

              import wiredtiger, wttest
from helper import confirm_empty
from suite_subprocess import suite_subprocess
from wtdataset import SimpleDataSet, simple_key, simple_value
from wtscenario import make_scenarios

# test_bulkload_checkpoint
#       Test bulk-load with checkpoints.
class test_bulkload_checkpoint(wttest.WiredTigerTestCase, suite_subprocess):

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              #!/usr/bin/env python
#
# Public Domain 2014-present MongoDB, Inc.
# Public Domain 2008-2014 WiredTiger, Inc.
#
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled

            

Reported by Pylint.

Multiple imports on one line (shutil, os)
Error

Line: 32 Column: 1

              # test_bulk02.py
#       Bulk-load testing.

import shutil, os
import wiredtiger, wttest
from helper import confirm_empty
from suite_subprocess import suite_subprocess
from wtdataset import SimpleDataSet, simple_key, simple_value
from wtscenario import make_scenarios

            

Reported by Pylint.

Multiple imports on one line (wiredtiger, wttest)
Error

Line: 33 Column: 1

              #       Bulk-load testing.

import shutil, os
import wiredtiger, wttest
from helper import confirm_empty
from suite_subprocess import suite_subprocess
from wtdataset import SimpleDataSet, simple_key, simple_value
from wtscenario import make_scenarios


            

Reported by Pylint.

Missing class docstring
Error

Line: 41 Column: 1

              
# test_bulkload_checkpoint
#       Test bulk-load with checkpoints.
class test_bulkload_checkpoint(wttest.WiredTigerTestCase, suite_subprocess):
    types = [
        ('file', dict(uri='file:data')),
        ('table', dict(uri='table:data')),
    ]
    ckpt_type = [

            

Reported by Pylint.

Class name "test_bulkload_checkpoint" doesn't conform to PascalCase naming style
Error

Line: 41 Column: 1

              
# test_bulkload_checkpoint
#       Test bulk-load with checkpoints.
class test_bulkload_checkpoint(wttest.WiredTigerTestCase, suite_subprocess):
    types = [
        ('file', dict(uri='file:data')),
        ('table', dict(uri='table:data')),
    ]
    ckpt_type = [

            

Reported by Pylint.

src/third_party/scons-3.1.2/scons-local-3.1.2/SCons/Tool/DCommon.py
15 issues
String statement has no effect
Error

Line: 3 Column: 1

              from __future__ import print_function

"""SCons.Tool.DCommon

Common code for the various D tools.

Coded by Russel Winder (russel@winder.org.uk)
2012-09-06
"""

            

Reported by Pylint.

Unused argument 'env'
Error

Line: 39 Column: 9

              import os.path


def isD(env, source):
    if not source:
        return 0
    for s in source:
        if s.sources:
            ext = os.path.splitext(str(s.sources[0]))[1]

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              from __future__ import print_function

"""SCons.Tool.DCommon

Common code for the various D tools.

Coded by Russel Winder (russel@winder.org.uk)
2012-09-06
"""

            

Reported by Pylint.

Module name "DCommon" doesn't conform to snake_case naming style
Error

Line: 1 Column: 1

              from __future__ import print_function

"""SCons.Tool.DCommon

Common code for the various D tools.

Coded by Russel Winder (russel@winder.org.uk)
2012-09-06
"""

            

Reported by Pylint.

Line too long (118/100)
Error

Line: 34 Column: 1

              # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#

__revision__ = "src/engine/SCons/Tool/DCommon.py bee7caf9defd6e108fc2998a2520ddb36a967691 2019-12-17 02:07:09 bdeegan"

import os.path


def isD(env, source):

            

Reported by Pylint.

Import "import os.path" should be placed at the top of the module
Error

Line: 36 Column: 1

              
__revision__ = "src/engine/SCons/Tool/DCommon.py bee7caf9defd6e108fc2998a2520ddb36a967691 2019-12-17 02:07:09 bdeegan"

import os.path


def isD(env, source):
    if not source:
        return 0

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 39 Column: 1

              import os.path


def isD(env, source):
    if not source:
        return 0
    for s in source:
        if s.sources:
            ext = os.path.splitext(str(s.sources[0]))[1]

            

Reported by Pylint.

Function name "isD" doesn't conform to snake_case naming style
Error

Line: 39 Column: 1

              import os.path


def isD(env, source):
    if not source:
        return 0
    for s in source:
        if s.sources:
            ext = os.path.splitext(str(s.sources[0]))[1]

            

Reported by Pylint.

Variable name "s" doesn't conform to snake_case naming style
Error

Line: 42 Column: 9

              def isD(env, source):
    if not source:
        return 0
    for s in source:
        if s.sources:
            ext = os.path.splitext(str(s.sources[0]))[1]
            if ext == '.d':
                return 1
    return 0

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 50 Column: 1

                  return 0


def addDPATHToEnv(env, executable):
    dPath = env.WhereIs(executable)
    if dPath:
        phobosDir = dPath[:dPath.rindex(executable)] + '/../src/phobos'
        if os.path.isdir(phobosDir):
            env.Append(DPATH=[phobosDir])

            

Reported by Pylint.

src/third_party/mozjs-60/extract/js/src/jit/BaselineBailouts.cpp
15 issues
memcpy - Does not check for buffer overflows when copying to destination
Security

Line: 154 Column: 9 CWE codes: 120
Suggestion: Make sure destination can always hold the source data

                      uint8_t* newBuffer = reinterpret_cast<uint8_t*>(js_calloc(newSize));
        if (!newBuffer)
            return false;
        memcpy((newBuffer + newSize) - bufferUsed_, header_->copyStackBottom, bufferUsed_);
        memcpy(newBuffer, header_, sizeof(BaselineBailoutInfo));
        js_free(buffer_);
        buffer_ = newBuffer;
        bufferTotal_ = newSize;
        bufferAvail_ = newSize - (HeaderSize() + bufferUsed_);

            

Reported by FlawFinder.

memcpy - Does not check for buffer overflows when copying to destination
Security

Line: 155 Column: 9 CWE codes: 120
Suggestion: Make sure destination can always hold the source data

                      if (!newBuffer)
            return false;
        memcpy((newBuffer + newSize) - bufferUsed_, header_->copyStackBottom, bufferUsed_);
        memcpy(newBuffer, header_, sizeof(BaselineBailoutInfo));
        js_free(buffer_);
        buffer_ = newBuffer;
        bufferTotal_ = newSize;
        bufferAvail_ = newSize - (HeaderSize() + bufferUsed_);


            

Reported by FlawFinder.

memcpy - Does not check for buffer overflows when copying to destination
Security

Line: 213 Column: 9 CWE codes: 120
Suggestion: Make sure destination can always hold the source data

                                 "Should not reference memory that can be freed");
        if (!subtract(sizeof(T)))
            return false;
        memcpy(header_->copyStackBottom, &t, sizeof(T));
        return true;
    }

    template <typename T>
    MOZ_MUST_USE bool writePtr(T* t, const char* info) {

            

Reported by FlawFinder.

memcpy - Does not check for buffer overflows when copying to destination
Security

Line: 1483 Column: 5 CWE codes: 120
Suggestion: Make sure destination can always hold the source data

                  BufferPointer<uint8_t> stubArgsEnd =
        builder.pointerAtStackOffset<uint8_t>(builder.framePushed() - endOfBaselineStubArgs);
    JitSpew(JitSpew_BaselineBailouts, "      MemCpy from %p", stubArgsEnd.get());
    memcpy(builder.pointerAtStackOffset<uint8_t>(0).get(), stubArgsEnd.get(),
           (actualArgc + 1) * sizeof(Value));

    // Calculate frame size for descriptor.
    size_t rectifierFrameSize = builder.framePushed() - startOfRectifierFrame;
    size_t rectifierFrameDescr = MakeFrameDescriptor((uint32_t) rectifierFrameSize,

            

Reported by FlawFinder.

read - Check buffer boundaries if used in a loop including recursive loops
Security

Line: 732 Column: 24 CWE codes: 120 20

                          iter.skip();
        }
    } else {
        Value v = iter.read();
        if (v.isObject()) {
            envChain = &v.toObject();

            // If Ion has updated env slot from UndefinedValue, it will be the
            // complete initial environment, so we can set the HAS_INITIAL_ENV

            

Reported by FlawFinder.

read - Check buffer boundaries if used in a loop including recursive loops
Security

Line: 793 Column: 28 CWE codes: 120 20

              
        // Make sure to add HAS_RVAL to flags here because setFlags() below
        // will clobber it.
        returnValue = iter.read();
        flags |= BaselineFrame::HAS_RVAL;

        // If script maybe has an arguments object, the third slot will hold it.
        if (script->argumentsHasVarBinding()) {
            v = iter.read();

            

Reported by FlawFinder.

read - Check buffer boundaries if used in a loop including recursive loops
Security

Line: 798 Column: 22 CWE codes: 120 20

              
        // If script maybe has an arguments object, the third slot will hold it.
        if (script->argumentsHasVarBinding()) {
            v = iter.read();
            MOZ_ASSERT(v.isObject() || v.isUndefined() || v.isMagic(JS_OPTIMIZED_OUT));
            if (v.isObject())
                argsObj = &v.toObject().as<ArgumentsObject>();
        }
    }

            

Reported by FlawFinder.

read - Check buffer boundaries if used in a loop including recursive loops
Security

Line: 819 Column: 28 CWE codes: 120 20

                  if (fun) {
        // The unpacked thisv and arguments should overwrite the pushed args present
        // in the calling frame.
        Value thisv = iter.read();
        JitSpew(JitSpew_BaselineBailouts, "      Is function!");
        JitSpew(JitSpew_BaselineBailouts, "      thisv=%016" PRIx64, *((uint64_t*) &thisv));

        size_t thisvOffset = builder.framePushed() + JitFrameLayout::offsetOfThis();
        builder.valuePointerAtStackOffset(thisvOffset).set(thisv);

            

Reported by FlawFinder.

read - Check buffer boundaries if used in a loop including recursive loops
Security

Line: 842 Column: 30 CWE codes: 120 20

                      }

        for (uint32_t i = 0; i < fun->nargs(); i++) {
            Value arg = iter.read();
            JitSpew(JitSpew_BaselineBailouts, "      arg %d = %016" PRIx64,
                        (int) i, *((uint64_t*) &arg));
            if (callerPC) {
                size_t argOffset = builder.framePushed() + JitFrameLayout::offsetOfActualArg(i);
                builder.valuePointerAtStackOffset(argOffset).set(arg);

            

Reported by FlawFinder.

read - Check buffer boundaries if used in a loop including recursive loops
Security

Line: 855 Column: 27 CWE codes: 120 20

                  }

    for (uint32_t i = 0; i < script->nfixed(); i++) {
        Value slot = iter.read();
        if (!builder.writeValue(slot, "FixedValue"))
            return false;
    }

    // Get the pc. If we are handling an exception, resume at the pc of the

            

Reported by FlawFinder.

src/third_party/scons-3.1.2/scons-local-3.1.2/SCons/Scanner/Fortran.py
15 issues
__init__ method from base class 'Classic' is not called
Error

Line: 55 Column: 5

                  smart thing to do.
    """

    def __init__(self, name, suffixes, path_variable,
                 use_regex, incl_regex, def_regex, *args, **kw):

        self.cre_use = re.compile(use_regex, re.M)
        self.cre_incl = re.compile(incl_regex, re.M)
        self.cre_def = re.compile(def_regex, re.M)

            

Reported by Pylint.

__init__ method from a non direct base class 'Current' is called
Error

Line: 76 Column: 9

                      kw['skeys'] = suffixes
        kw['name'] = name

        SCons.Scanner.Current.__init__(self, *args, **kw)

    def scan(self, node, env, path=()):

        # cache the includes list in node so we only scan it once:
        if node.includes is not None:

            

Reported by Pylint.

Parameters differ from overridden 'scan' method
Error

Line: 78 Column: 5

              
        SCons.Scanner.Current.__init__(self, *args, **kw)

    def scan(self, node, env, path=()):

        # cache the includes list in node so we only scan it once:
        if node.includes is not None:
            mods_and_includes = node.includes
        else:

            

Reported by Pylint.

Module name "Fortran" doesn't conform to snake_case naming style
Error

Line: 1 Column: 1

              """SCons.Scanner.Fortran

This module implements the dependency scanner for Fortran code.

"""

#
# Copyright (c) 2001 - 2019 The SCons Foundation
#

            

Reported by Pylint.

Line too long (121/100)
Error

Line: 29 Column: 1

              # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

__revision__ = "src/engine/SCons/Scanner/Fortran.py bee7caf9defd6e108fc2998a2520ddb36a967691 2019-12-17 02:07:09 bdeegan"

import re

import SCons.Node
import SCons.Node.FS

            

Reported by Pylint.

Too many arguments (7/5)
Error

Line: 55 Column: 5

                  smart thing to do.
    """

    def __init__(self, name, suffixes, path_variable,
                 use_regex, incl_regex, def_regex, *args, **kw):

        self.cre_use = re.compile(use_regex, re.M)
        self.cre_incl = re.compile(incl_regex, re.M)
        self.cre_def = re.compile(def_regex, re.M)

            

Reported by Pylint.

Too many local variables (17/15)
Error

Line: 78 Column: 5

              
        SCons.Scanner.Current.__init__(self, *args, **kw)

    def scan(self, node, env, path=()):

        # cache the includes list in node so we only scan it once:
        if node.includes is not None:
            mods_and_includes = node.includes
        else:

            

Reported by Pylint.

Variable name "d" doesn't conform to snake_case naming style
Error

Line: 93 Column: 13

              
            # Remove all USE'd module names that are defined in the same file
            # (case-insensitively)
            d = {}
            for m in defmodules:
                d[m.lower()] = 1
            modules = [m for m in modules if m.lower() not in d]

            # Convert module name to a .mod filename

            

Reported by Pylint.

Variable name "m" doesn't conform to snake_case naming style
Error

Line: 94 Column: 17

                          # Remove all USE'd module names that are defined in the same file
            # (case-insensitively)
            d = {}
            for m in defmodules:
                d[m.lower()] = 1
            modules = [m for m in modules if m.lower() not in d]

            # Convert module name to a .mod filename
            suffix = env.subst('$FORTRANMODSUFFIX')

            

Reported by Pylint.

Variable name "n" doesn't conform to snake_case naming style
Error

Line: 115 Column: 13

                      if callable(path):
            path = path()
        for dep in mods_and_includes:
            n, i = self.find_include(dep, source_dir, path)

            if n is None:
                SCons.Warnings.warn(SCons.Warnings.DependencyWarning,
                                    "No dependency generated for file: %s (referenced by: %s) -- file not found" % (i, node))
            else:

            

Reported by Pylint.

src/third_party/mozjs-60/extract/js/src/devtools/rootAnalysis/t/sixgill.py
15 issues
__init__ method from base class 'dict' is not called
Error

Line: 10 Column: 5

              
# Simplified version of the body info.
class Body(dict):
    def __init__(self, body):
        self['BlockIdKind'] = body['BlockId']['Kind']
        if 'Variable' in body['BlockId']:
            self['BlockName'] = body['BlockId']['Variable']['Name'][0].split("$")[-1]
        loc = body['Location']
        self['LineRange'] = (loc[0]['Line'], loc[1]['Line'])

            

Reported by Pylint.

Unused variable 'dst'
Error

Line: 28 Column: 18

                          self['Line2Points'][line].append(point)
        self['SrcPoint2Edges'] = defaultdict(list)
        for edge in self['Edges']:
            src, dst = edge['Index']
            self['SrcPoint2Edges'][src].append(edge)
        self['Line2Edges'] = defaultdict(list)
        for (src, edges) in self['SrcPoint2Edges'].items():
            line = self['Points'][src]
            self['Line2Edges'][line].extend(edges)

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              #!/usr/bin/env python
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

from collections import defaultdict

# Simplified version of the body info.
class Body(dict):

            

Reported by Pylint.

Missing class docstring
Error

Line: 9 Column: 1

              from collections import defaultdict

# Simplified version of the body info.
class Body(dict):
    def __init__(self, body):
        self['BlockIdKind'] = body['BlockId']['Kind']
        if 'Variable' in body['BlockId']:
            self['BlockName'] = body['BlockId']['Variable']['Name'][0].split("$")[-1]
        loc = body['Location']

            

Reported by Pylint.

Line too long (114/100)
Error

Line: 20 Column: 1

                      self['Edges'] = body.get('PEdge', [])
        self['Points'] = { i: p['Location']['Line'] for i, p in enumerate(body['PPoint'], 1) }
        self['Index'] = body['Index']
        self['Variables'] = { x['Variable']['Name'][0].split("$")[-1]: x['Type'] for x in body['DefineVariable'] }

        # Indexes
        self['Line2Points'] = defaultdict(list)
        for point, line in self['Points'].items():
            self['Line2Points'][line].append(point)

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 35 Column: 5

                          line = self['Points'][src]
            self['Line2Edges'][line].extend(edges)

    def edges_from_line(self, line):
        return self['Line2Edges'][line]

    def edge_from_line(self, line):
        edges = self.edges_from_line(line)
        assert(len(edges) == 1)

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 38 Column: 5

                  def edges_from_line(self, line):
        return self['Line2Edges'][line]

    def edge_from_line(self, line):
        edges = self.edges_from_line(line)
        assert(len(edges) == 1)
        return edges[0]

    def edges_from_point(self, point):

            

Reported by Pylint.

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Security

Line: 40
Suggestion: https://bandit.readthedocs.io/en/latest/plugins/b101_assert_used.html

              
    def edge_from_line(self, line):
        edges = self.edges_from_line(line)
        assert(len(edges) == 1)
        return edges[0]

    def edges_from_point(self, point):
        return self['SrcPoint2Edges'][point]


            

Reported by Bandit.

Unnecessary parens after 'assert' keyword
Error

Line: 40 Column: 1

              
    def edge_from_line(self, line):
        edges = self.edges_from_line(line)
        assert(len(edges) == 1)
        return edges[0]

    def edges_from_point(self, point):
        return self['SrcPoint2Edges'][point]


            

Reported by Pylint.

Missing function or method docstring
Error

Line: 43 Column: 5

                      assert(len(edges) == 1)
        return edges[0]

    def edges_from_point(self, point):
        return self['SrcPoint2Edges'][point]

    def edge_from_point(self, point):
        edges = self.edges_from_point(point)
        assert(len(edges) == 1)

            

Reported by Pylint.