The following issues were found
src/third_party/icu4c-57.1/source/i18n/plurrule.cpp
8 issues
Line: 59
static const UChar PK_DECIMAL[]={LOW_D,LOW_E,LOW_C,LOW_I,LOW_M,LOW_A,LOW_L,0};
static const UChar PK_INTEGER[]={LOW_I,LOW_N,LOW_T,LOW_E,LOW_G,LOW_E,LOW_R,0};
UOBJECT_DEFINE_RTTI_IMPLEMENTATION(PluralRules)
UOBJECT_DEFINE_RTTI_IMPLEMENTATION(PluralKeywordEnumeration)
PluralRules::PluralRules(UErrorCode& /*status*/)
: UObject(),
mRules(NULL)
Reported by Cppcheck.
Line: 664
Column: 9
CWE codes:
119
120
Suggestion:
Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length
if (s == NULL) {
// Check parent locales.
UErrorCode status = U_ZERO_ERROR;
char parentLocaleName[ULOC_FULLNAME_CAPACITY];
const char *curLocaleName=locale.getName();
uprv_strcpy(parentLocaleName, curLocaleName);
while (uloc_getParent(parentLocaleName, parentLocaleName,
ULOC_FULLNAME_CAPACITY, &status) > 0) {
Reported by FlawFinder.
Line: 683
Column: 5
CWE codes:
119
120
Suggestion:
Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length
return emptyStr;
}
char setKey[256];
u_UCharsToChars(s, setKey, resLen + 1);
// printf("\n PluralRule: %s\n", setKey);
LocalUResourceBundlePointer ruleRes(ures_getByKey(rb.getAlias(), "rules", NULL, &errCode));
if(U_FAILURE(errCode)) {
Reported by FlawFinder.
Line: 1059
Column: 5
CWE codes:
119
120
Suggestion:
Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length
int32_t
PluralRuleParser::getNumberValue(const UnicodeString& token) {
int32_t i;
char digits[128];
i = token.extract(0, token.length(), digits, UPRV_LENGTHOF(digits), US_INV);
digits[i]='\0';
return((int32_t)atoi(digits));
Reported by FlawFinder.
Line: 1064
Column: 21
CWE codes:
190
Suggestion:
If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended)
i = token.extract(0, token.length(), digits, UPRV_LENGTHOF(digits), US_INV);
digits[i]='\0';
return((int32_t)atoi(digits));
}
void
PluralRuleParser::checkSyntax(UErrorCode &status)
Reported by FlawFinder.
Line: 1530
Column: 5
CWE codes:
119
120
Suggestion:
Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length
}
// Slow path, convert with sprintf, parse converted output.
char buf[30] = {0};
sprintf(buf, "%1.15e", n);
// formatted number looks like this: 1.234567890123457e-01
int exponent = atoi(buf+18);
int numFractionDigits = 15;
for (int i=16; ; --i) {
Reported by FlawFinder.
Line: 1531
Column: 5
CWE codes:
120
Suggestion:
Use sprintf_s, snprintf, or vsnprintf
// Slow path, convert with sprintf, parse converted output.
char buf[30] = {0};
sprintf(buf, "%1.15e", n);
// formatted number looks like this: 1.234567890123457e-01
int exponent = atoi(buf+18);
int numFractionDigits = 15;
for (int i=16; ; --i) {
if (buf[i] != '0') {
Reported by FlawFinder.
Line: 1533
Column: 20
CWE codes:
190
Suggestion:
If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended)
char buf[30] = {0};
sprintf(buf, "%1.15e", n);
// formatted number looks like this: 1.234567890123457e-01
int exponent = atoi(buf+18);
int numFractionDigits = 15;
for (int i=16; ; --i) {
if (buf[i] != '0') {
break;
}
Reported by FlawFinder.
src/third_party/icu4c-57.1/source/i18n/dtitvinf.cpp
8 issues
Line: 545
Column: 5
CWE codes:
120
Suggestion:
Use sprintf_s, snprintf, or vsnprintf
char result_1[1000];
char mesg[2000];
skeleton.extract(0, skeleton.length(), result, "UTF-8");
sprintf(mesg, "in getBestSkeleton: skeleton: %s; \n", result);
PRINTMESG(mesg)
#endif
int32_t inputSkeletonFieldWidth[] =
Reported by FlawFinder.
Line: 611
Column: 5
CWE codes:
120
Suggestion:
Use sprintf_s, snprintf, or vsnprintf
UnicodeString* skeleton = (UnicodeString*)keyTok.pointer;
#ifdef DTITVINF_DEBUG
skeleton->extract(0, skeleton->length(), result, "UTF-8");
sprintf(mesg, "available skeletons: skeleton: %s; \n", result);
PRINTMESG(mesg)
#endif
// clear skeleton field width
int8_t i;
Reported by FlawFinder.
Line: 404
Column: 5
CWE codes:
119
120
Suggestion:
Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length
// Get the correct calendar type
const char * calendarTypeToUse = gGregorianTag; // initial default
char calendarType[ULOC_KEYWORDS_CAPACITY]; // to be filled in with the type to use, if all goes well
char localeWithCalendarKey[ULOC_LOCALE_IDENTIFIER_CAPACITY];
// obtain a locale that always has the calendar key value that should be used
(void)ures_getFunctionalEquivalent(localeWithCalendarKey, ULOC_LOCALE_IDENTIFIER_CAPACITY, NULL,
"calendar", "calendar", locName, NULL, FALSE, &status);
localeWithCalendarKey[ULOC_LOCALE_IDENTIFIER_CAPACITY-1] = 0; // ensure null termination
Reported by FlawFinder.
Line: 405
Column: 5
CWE codes:
119
120
Suggestion:
Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length
// Get the correct calendar type
const char * calendarTypeToUse = gGregorianTag; // initial default
char calendarType[ULOC_KEYWORDS_CAPACITY]; // to be filled in with the type to use, if all goes well
char localeWithCalendarKey[ULOC_LOCALE_IDENTIFIER_CAPACITY];
// obtain a locale that always has the calendar key value that should be used
(void)ures_getFunctionalEquivalent(localeWithCalendarKey, ULOC_LOCALE_IDENTIFIER_CAPACITY, NULL,
"calendar", "calendar", locName, NULL, FALSE, &status);
localeWithCalendarKey[ULOC_LOCALE_IDENTIFIER_CAPACITY-1] = 0; // ensure null termination
// now get the calendar key value from that locale
Reported by FlawFinder.
Line: 541
Column: 5
CWE codes:
119
120
Suggestion:
Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length
DateIntervalInfo::getBestSkeleton(const UnicodeString& skeleton,
int8_t& bestMatchDistanceInfo) const {
#ifdef DTITVINF_DEBUG
char result[1000];
char result_1[1000];
char mesg[2000];
skeleton.extract(0, skeleton.length(), result, "UTF-8");
sprintf(mesg, "in getBestSkeleton: skeleton: %s; \n", result);
PRINTMESG(mesg)
Reported by FlawFinder.
Line: 542
Column: 5
CWE codes:
119
120
Suggestion:
Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length
int8_t& bestMatchDistanceInfo) const {
#ifdef DTITVINF_DEBUG
char result[1000];
char result_1[1000];
char mesg[2000];
skeleton.extract(0, skeleton.length(), result, "UTF-8");
sprintf(mesg, "in getBestSkeleton: skeleton: %s; \n", result);
PRINTMESG(mesg)
#endif
Reported by FlawFinder.
Line: 543
Column: 5
CWE codes:
119
120
Suggestion:
Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length
#ifdef DTITVINF_DEBUG
char result[1000];
char result_1[1000];
char mesg[2000];
skeleton.extract(0, skeleton.length(), result, "UTF-8");
sprintf(mesg, "in getBestSkeleton: skeleton: %s; \n", result);
PRINTMESG(mesg)
#endif
Reported by FlawFinder.
Line: 173
Column: 12
CWE codes:
126
Suggestion:
This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it
equal = fIntervalPatterns->equals(*(other.fIntervalPatterns));
}
return equal;
}
UnicodeString&
DateIntervalInfo::getIntervalPattern(const UnicodeString& skeleton,
Reported by FlawFinder.
src/third_party/wiredtiger/test/suite/test_bug014.py
8 issues
Line: 29
Column: 1
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
import wiredtiger, wttest
from wtdataset import SimpleDataSet
from helper import copy_wiredtiger_home
# test_bug014.py
# JIRA WT-2115: fast-delete pages can be incorrectly lost due to a crash.
Reported by Pylint.
Line: 29
Column: 1
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
import wiredtiger, wttest
from wtdataset import SimpleDataSet
from helper import copy_wiredtiger_home
# test_bug014.py
# JIRA WT-2115: fast-delete pages can be incorrectly lost due to a crash.
Reported by Pylint.
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.
Line: 29
Column: 1
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
import wiredtiger, wttest
from wtdataset import SimpleDataSet
from helper import copy_wiredtiger_home
# test_bug014.py
# JIRA WT-2115: fast-delete pages can be incorrectly lost due to a crash.
Reported by Pylint.
Line: 35
Column: 1
# test_bug014.py
# JIRA WT-2115: fast-delete pages can be incorrectly lost due to a crash.
class test_bug014(wttest.WiredTigerTestCase):
def test_bug014(self):
# Populate a table with 1000 keys on small pages.
uri = 'table:test_bug014'
ds = SimpleDataSet(self, uri, 1000,
config='allocation_size=512,leaf_page_max=512')
Reported by Pylint.
Line: 35
Column: 1
# test_bug014.py
# JIRA WT-2115: fast-delete pages can be incorrectly lost due to a crash.
class test_bug014(wttest.WiredTigerTestCase):
def test_bug014(self):
# Populate a table with 1000 keys on small pages.
uri = 'table:test_bug014'
ds = SimpleDataSet(self, uri, 1000,
config='allocation_size=512,leaf_page_max=512')
Reported by Pylint.
Line: 36
Column: 5
# test_bug014.py
# JIRA WT-2115: fast-delete pages can be incorrectly lost due to a crash.
class test_bug014(wttest.WiredTigerTestCase):
def test_bug014(self):
# Populate a table with 1000 keys on small pages.
uri = 'table:test_bug014'
ds = SimpleDataSet(self, uri, 1000,
config='allocation_size=512,leaf_page_max=512')
ds.populate()
Reported by Pylint.
Line: 39
Column: 9
def test_bug014(self):
# Populate a table with 1000 keys on small pages.
uri = 'table:test_bug014'
ds = SimpleDataSet(self, uri, 1000,
config='allocation_size=512,leaf_page_max=512')
ds.populate()
# Reopen it so we can fast-delete pages.
self.reopen_conn()
Reported by Pylint.
src/third_party/scons-3.1.2/scons-local-3.1.2/SCons/Tool/hpcxx.py
8 issues
Line: 71
Suggestion:
https://bandit.readthedocs.io/en/latest/plugins/b605_start_process_with_a_shell.html
env['CXX'] = acc or 'aCC'
env['SHCXXFLAGS'] = SCons.Util.CLVar('$CXXFLAGS +Z')
# determine version of aCC
with os.popen(acc + ' -V 2>&1') as p:
line = p.readline().rstrip()
if line.find('aCC: HP ANSI C++') == 0:
env['CXXVERSION'] = line.split()[-1]
if env['PLATFORM'] == 'cygwin':
Reported by Bandit.
Line: 56
Column: 5
# (IOError) or isn't readable (OSError) is okay.
dirs = []
for dir in dirs:
cc = '/opt/' + dir + '/bin/aCC'
if os.path.exists(cc):
acc = cc
break
Reported by Pylint.
Line: 81
Column: 12
else:
env['SHCXXFLAGS'] = SCons.Util.CLVar('$CXXFLAGS +Z')
def exists(env):
return acc
# Local Variables:
# tab-width:4
# indent-tabs-mode:nil
Reported by Pylint.
Line: 34
Column: 1
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
__revision__ = "src/engine/SCons/Tool/hpcxx.py bee7caf9defd6e108fc2998a2520ddb36a967691 2019-12-17 02:07:09 bdeegan"
import os.path
import SCons.Util
Reported by Pylint.
Line: 45
Column: 1
#cplusplus = __import__('cxx', globals(), locals(), [])
acc = None
# search for the acc compiler and linker front end
try:
dirs = os.listdir('/opt')
Reported by Pylint.
Line: 62
Column: 1
acc = cc
break
def generate(env):
"""Add Builders and construction variables for g++ to an Environment."""
cplusplus.generate(env)
if acc:
Reported by Pylint.
Line: 71
Column: 44
env['CXX'] = acc or 'aCC'
env['SHCXXFLAGS'] = SCons.Util.CLVar('$CXXFLAGS +Z')
# determine version of aCC
with os.popen(acc + ' -V 2>&1') as p:
line = p.readline().rstrip()
if line.find('aCC: HP ANSI C++') == 0:
env['CXXVERSION'] = line.split()[-1]
if env['PLATFORM'] == 'cygwin':
Reported by Pylint.
Line: 81
Column: 1
else:
env['SHCXXFLAGS'] = SCons.Util.CLVar('$CXXFLAGS +Z')
def exists(env):
return acc
# Local Variables:
# tab-width:4
# indent-tabs-mode:nil
Reported by Pylint.
src/third_party/icu4c-57.1/source/common/utypes.c
8 issues
Line: 20
Column: 14
CWE codes:
119
120
Suggestion:
Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length
/* u_errorName() ------------------------------------------------------------ */
static const char * const
_uErrorInfoName[U_ERROR_WARNING_LIMIT-U_ERROR_WARNING_START]={
"U_USING_FALLBACK_WARNING",
"U_USING_DEFAULT_WARNING",
"U_SAFECLONE_ALLOCATED_WARNING",
"U_STATE_OLD_WARNING",
Reported by FlawFinder.
Line: 33
Column: 14
CWE codes:
119
120
Suggestion:
Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length
"U_PLUGIN_CHANGED_LEVEL_WARNING",
};
static const char * const
_uTransErrorName[U_PARSE_ERROR_LIMIT - U_PARSE_ERROR_START]={
"U_BAD_VARIABLE_DEFINITION",
"U_MALFORMED_RULE",
"U_MALFORMED_SET",
"U_MALFORMED_SYMBOL_REFERENCE",
Reported by FlawFinder.
Line: 72
Column: 14
CWE codes:
119
120
Suggestion:
Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length
"U_INVALID_FUNCTION"
};
static const char * const
_uErrorName[U_STANDARD_ERROR_LIMIT]={
"U_ZERO_ERROR",
"U_ILLEGAL_ARGUMENT_ERROR",
"U_MISSING_RESOURCE_ERROR",
Reported by FlawFinder.
Line: 107
Column: 14
CWE codes:
119
120
Suggestion:
Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length
"U_USELESS_COLLATOR_ERROR",
"U_NO_WRITE_PERMISSION"
};
static const char * const
_uFmtErrorName[U_FMT_PARSE_ERROR_LIMIT - U_FMT_PARSE_ERROR_START] = {
"U_UNEXPECTED_TOKEN",
"U_MULTIPLE_DECIMAL_SEPARATORS",
"U_MULTIPLE_EXPONENTIAL_SYMBOLS",
"U_MALFORMED_EXPONENTIAL_PATTERN",
Reported by FlawFinder.
Line: 129
Column: 14
CWE codes:
119
120
Suggestion:
Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length
"U_FORMAT_INEXACT_ERROR"
};
static const char * const
_uBrkErrorName[U_BRK_ERROR_LIMIT - U_BRK_ERROR_START] = {
"U_BRK_INTERNAL_ERROR",
"U_BRK_HEX_DIGITS_EXPECTED",
"U_BRK_SEMICOLON_EXPECTED",
"U_BRK_RULE_SYNTAX",
Reported by FlawFinder.
Line: 147
Column: 14
CWE codes:
119
120
Suggestion:
Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length
"U_BRK_MALFORMED_RULE_TAG"
};
static const char * const
_uRegexErrorName[U_REGEX_ERROR_LIMIT - U_REGEX_ERROR_START] = {
"U_REGEX_INTERNAL_ERROR",
"U_REGEX_RULE_SYNTAX",
"U_REGEX_INVALID_STATE",
"U_REGEX_BAD_ESCAPE_SEQUENCE",
Reported by FlawFinder.
Line: 173
Column: 14
CWE codes:
119
120
Suggestion:
Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length
"U_REGEX_INVALID_CAPTURE_GROUP_NAME"
};
static const char * const
_uIDNAErrorName[U_IDNA_ERROR_LIMIT - U_IDNA_ERROR_START] = {
"U_STRINGPREP_PROHIBITED_ERROR",
"U_STRINGPREP_UNASSIGNED_ERROR",
"U_STRINGPREP_CHECK_BIDI_ERROR",
"U_IDNA_STD3_ASCII_RULES_ERROR",
Reported by FlawFinder.
Line: 186
Column: 14
CWE codes:
119
120
Suggestion:
Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length
"U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR"
};
static const char * const
_uPluginErrorName[U_PLUGIN_ERROR_LIMIT - U_PLUGIN_ERROR_START] = {
"U_PLUGIN_TOO_HIGH",
"U_PLUGIN_DIDNT_SET_LEVEL",
};
Reported by FlawFinder.
src/mongo/db/fts/unicode/gen_helper.py
8 issues
Line: 1
Column: 1
def getCopyrightNotice():
return """/**
* Copyright (C) 2018-present MongoDB, Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the Server Side Public License, version 1,
* as published by MongoDB, Inc.
*
* This program is distributed in the hope that it will be useful,
Reported by Pylint.
Line: 1
Column: 1
def getCopyrightNotice():
return """/**
* Copyright (C) 2018-present MongoDB, Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the Server Side Public License, version 1,
* as published by MongoDB, Inc.
*
* This program is distributed in the hope that it will be useful,
Reported by Pylint.
Line: 1
Column: 1
def getCopyrightNotice():
return """/**
* Copyright (C) 2018-present MongoDB, Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the Server Side Public License, version 1,
* as published by MongoDB, Inc.
*
* This program is distributed in the hope that it will be useful,
Reported by Pylint.
Line: 34
Column: 1
*/\n\n"""
def openNamespaces():
return "namespace mongo {\nnamespace unicode {\n\n"
def closeNamespaces():
return "\n} // namespace unicode\n} // namespace mongo\n"
Reported by Pylint.
Line: 34
Column: 1
*/\n\n"""
def openNamespaces():
return "namespace mongo {\nnamespace unicode {\n\n"
def closeNamespaces():
return "\n} // namespace unicode\n} // namespace mongo\n"
Reported by Pylint.
Line: 38
Column: 1
return "namespace mongo {\nnamespace unicode {\n\n"
def closeNamespaces():
return "\n} // namespace unicode\n} // namespace mongo\n"
def include(header):
return '#include "' + header + '"\n'
Reported by Pylint.
Line: 38
Column: 1
return "namespace mongo {\nnamespace unicode {\n\n"
def closeNamespaces():
return "\n} // namespace unicode\n} // namespace mongo\n"
def include(header):
return '#include "' + header + '"\n'
Reported by Pylint.
Line: 42
Column: 1
return "\n} // namespace unicode\n} // namespace mongo\n"
def include(header):
return '#include "' + header + '"\n'
Reported by Pylint.
src/mongo/db/fts/unicode/gen_delimiter_list.py
8 issues
Line: 1
Column: 1
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
from gen_helper import getCopyrightNotice, openNamespaces, closeNamespaces, \
include
def generate(unicode_proplist_file, target):
Reported by Pylint.
Line: 9
Column: 1
include
def generate(unicode_proplist_file, target):
"""Generates a C++ source file that contains a delimiter checking function.
The delimiter checking function contains a switch statement with cases for
every delimiter in the Unicode Character Database with the properties
specified in delim_properties.
Reported by Pylint.
Line: 9
Column: 1
include
def generate(unicode_proplist_file, target):
"""Generates a C++ source file that contains a delimiter checking function.
The delimiter checking function contains a switch statement with cases for
every delimiter in the Unicode Character Database with the properties
specified in delim_properties.
Reported by Pylint.
Line: 35
Column: 1
for line in proplist_file:
# Filter out blank lines and lines that start with #
data = line[:line.find('#')]
if (data == ""):
continue
# Parse the data on the line
values = data.split("; ")
assert (len(values) == 2)
Reported by Pylint.
Line: 40
Column: 1
# Parse the data on the line
values = data.split("; ")
assert (len(values) == 2)
uproperty = values[1].strip()
if uproperty in delim_properties:
if len(values[0].split('..')) == 2:
codepoint_range = values[0].split('..')
Reported by Pylint.
Line: 40
Suggestion:
https://bandit.readthedocs.io/en/latest/plugins/b101_assert_used.html
# Parse the data on the line
values = data.split("; ")
assert (len(values) == 2)
uproperty = values[1].strip()
if uproperty in delim_properties:
if len(values[0].split('..')) == 2:
codepoint_range = values[0].split('..')
Reported by Bandit.
Line: 60
Column: 9
# As of Unicode 8.0.0, all of the delimiters we used for text index
# version 2 are also in the list.
out.write("static const bool englishAsciiDelimiters[128] = {\n")
for cp in range(0x80):
if cp == ord("'"):
out.write(" 0, // ' special case\n")
else:
out.write(" %d, // 0x%x\n" % (cp in delim_codepoints, cp))
out.write("};\n")
Reported by Pylint.
Line: 68
Column: 9
out.write("};\n")
out.write("static const bool nonEnglishAsciiDelimiters[128] = {\n")
for cp in range(0x80):
out.write(" %d, // 0x%x\n" % (cp in delim_codepoints, cp))
out.write("};\n")
out.write("""bool codepointIsDelimiter(char32_t codepoint, DelimiterListLanguage lang) {
if (codepoint <= 0x7f) {
Reported by Pylint.
src/third_party/wiredtiger/test/suite/test_bug020.py
8 issues
Line: 30
Column: 1
# OTHER DEALINGS IN THE SOFTWARE.
import os
import wiredtiger, wttest
from wtdataset import SimpleDataSet
# test_bug020.py
# Test that an existing set file will replace a missing turtle file.
class test_bug020(wttest.WiredTigerTestCase):
Reported by Pylint.
Line: 30
Column: 1
# OTHER DEALINGS IN THE SOFTWARE.
import os
import wiredtiger, wttest
from wtdataset import SimpleDataSet
# test_bug020.py
# Test that an existing set file will replace a missing turtle file.
class test_bug020(wttest.WiredTigerTestCase):
Reported by Pylint.
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.
Line: 30
Column: 1
# OTHER DEALINGS IN THE SOFTWARE.
import os
import wiredtiger, wttest
from wtdataset import SimpleDataSet
# test_bug020.py
# Test that an existing set file will replace a missing turtle file.
class test_bug020(wttest.WiredTigerTestCase):
Reported by Pylint.
Line: 35
Column: 1
# test_bug020.py
# Test that an existing set file will replace a missing turtle file.
class test_bug020(wttest.WiredTigerTestCase):
def test_bug020(self):
SimpleDataSet(self, "table:bug020", 1000).populate()
self.close_conn()
os.rename("WiredTiger.turtle", "WiredTiger.turtle.set")
expectMessage = 'WiredTiger.turtle not found'
Reported by Pylint.
Line: 35
Column: 1
# test_bug020.py
# Test that an existing set file will replace a missing turtle file.
class test_bug020(wttest.WiredTigerTestCase):
def test_bug020(self):
SimpleDataSet(self, "table:bug020", 1000).populate()
self.close_conn()
os.rename("WiredTiger.turtle", "WiredTiger.turtle.set")
expectMessage = 'WiredTiger.turtle not found'
Reported by Pylint.
Line: 36
Column: 5
# test_bug020.py
# Test that an existing set file will replace a missing turtle file.
class test_bug020(wttest.WiredTigerTestCase):
def test_bug020(self):
SimpleDataSet(self, "table:bug020", 1000).populate()
self.close_conn()
os.rename("WiredTiger.turtle", "WiredTiger.turtle.set")
expectMessage = 'WiredTiger.turtle not found'
with self.expectedStdoutPattern(expectMessage):
Reported by Pylint.
Line: 40
Column: 9
SimpleDataSet(self, "table:bug020", 1000).populate()
self.close_conn()
os.rename("WiredTiger.turtle", "WiredTiger.turtle.set")
expectMessage = 'WiredTiger.turtle not found'
with self.expectedStdoutPattern(expectMessage):
self.open_conn()
if __name__ == '__main__':
wttest.run()
Reported by Pylint.
src/third_party/wiredtiger/test/suite/test_bug003.py
8 issues
Line: 32
Column: 1
# test_bug003.py
# Regression tests.
import wiredtiger, wttest
from wtscenario import make_scenarios
# Regression tests.
class test_bug003(wttest.WiredTigerTestCase):
types = [
Reported by Pylint.
Line: 32
Column: 1
# test_bug003.py
# Regression tests.
import wiredtiger, wttest
from wtscenario import make_scenarios
# Regression tests.
class test_bug003(wttest.WiredTigerTestCase):
types = [
Reported by Pylint.
Line: 55
Column: 9
self.session.checkpoint("name=ckpt")
else:
self.session.checkpoint()
cursor = self.session.open_cursor(self.uri, None, "bulk")
if __name__ == '__main__':
wttest.run()
Reported by Pylint.
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.
Line: 32
Column: 1
# test_bug003.py
# Regression tests.
import wiredtiger, wttest
from wtscenario import make_scenarios
# Regression tests.
class test_bug003(wttest.WiredTigerTestCase):
types = [
Reported by Pylint.
Line: 36
Column: 1
from wtscenario import make_scenarios
# Regression tests.
class test_bug003(wttest.WiredTigerTestCase):
types = [
('file', dict(uri='file:data')),
('table', dict(uri='table:data')),
]
ckpt = [
Reported by Pylint.
Line: 36
Column: 1
from wtscenario import make_scenarios
# Regression tests.
class test_bug003(wttest.WiredTigerTestCase):
types = [
('file', dict(uri='file:data')),
('table', dict(uri='table:data')),
]
ckpt = [
Reported by Pylint.
Line: 49
Column: 5
scenarios = make_scenarios(types, ckpt)
# Confirm bulk-load isn't stopped by checkpoints.
def test_bug003(self):
self.session.create(self.uri, "key_format=S,value_format=S")
if self.name == 1:
self.session.checkpoint("name=ckpt")
else:
self.session.checkpoint()
Reported by Pylint.
src/third_party/scons-3.1.2/scons-local-3.1.2/SCons/Tool/f90.py
8 issues
Line: 36
Column: 1
__revision__ = "src/engine/SCons/Tool/f90.py bee7caf9defd6e108fc2998a2520ddb36a967691 2019-12-17 02:07:09 bdeegan"
import SCons.Defaults
import SCons.Scanner.Fortran
import SCons.Tool
import SCons.Util
from SCons.Tool.FortranCommon import add_all_to_env, add_f90_to_env
Reported by Pylint.
Line: 37
Column: 1
__revision__ = "src/engine/SCons/Tool/f90.py bee7caf9defd6e108fc2998a2520ddb36a967691 2019-12-17 02:07:09 bdeegan"
import SCons.Defaults
import SCons.Scanner.Fortran
import SCons.Tool
import SCons.Util
from SCons.Tool.FortranCommon import add_all_to_env, add_f90_to_env
compilers = ['f90']
Reported by Pylint.
Line: 38
Column: 1
import SCons.Defaults
import SCons.Scanner.Fortran
import SCons.Tool
import SCons.Util
from SCons.Tool.FortranCommon import add_all_to_env, add_f90_to_env
compilers = ['f90']
Reported by Pylint.
Line: 39
Column: 1
import SCons.Defaults
import SCons.Scanner.Fortran
import SCons.Tool
import SCons.Util
from SCons.Tool.FortranCommon import add_all_to_env, add_f90_to_env
compilers = ['f90']
def generate(env):
Reported by Pylint.
Line: 34
Column: 1
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
__revision__ = "src/engine/SCons/Tool/f90.py bee7caf9defd6e108fc2998a2520ddb36a967691 2019-12-17 02:07:09 bdeegan"
import SCons.Defaults
import SCons.Scanner.Fortran
import SCons.Tool
import SCons.Util
Reported by Pylint.
Line: 44
Column: 1
compilers = ['f90']
def generate(env):
add_all_to_env(env)
add_f90_to_env(env)
fc = env.Detect(compilers) or 'f90'
env['F90'] = fc
Reported by Pylint.
Line: 48
Column: 5
add_all_to_env(env)
add_f90_to_env(env)
fc = env.Detect(compilers) or 'f90'
env['F90'] = fc
env['SHF90'] = fc
env['FORTRAN'] = fc
env['SHFORTRAN'] = fc
Reported by Pylint.
Line: 55
Column: 1
env['FORTRAN'] = fc
env['SHFORTRAN'] = fc
def exists(env):
return env.Detect(compilers)
# Local Variables:
# tab-width:4
# indent-tabs-mode:nil
Reported by Pylint.