# get all .cc / .c files
def get_cc_files(repo_path):
cc_files = []
- for root, dirnames, filenames in os.walk(repo_path):
+ for root, dirnames, filenames in os.walk(repo_path): # noqa: B007 T25377293 Grandfathered in
root = root[(len(repo_path) + 1):]
if "java" in root:
# Skip java
#!/usr/bin/env bash
# Create a tmp directory for the test to use
TEST_DIR=$(mktemp -d /dev/shm/fbcode_rocksdb_XXXXXXX)
+# shellcheck disable=SC2068
TEST_TMPDIR="$TEST_DIR" $@ && rm -rf "$TEST_DIR"
function log {
DATE=`date +%Y-%m-%d:%H:%M:%S`
+ # shellcheck disable=SC2068
echo $DATE $@
}
function log_err {
+ # shellcheck disable=SC2145
log "ERROR: $@ Error code: $error."
}
+# shellcheck disable=SC2148
GCC_BASE=/mnt/gvfs/third-party2/gcc/8219ec1bcedf8ad9da05e121e193364de2cc4f61/5.x/centos6-native/c447969
CLANG_BASE=/mnt/gvfs/third-party2/llvm-fb/64d8d58e3d84f8bde7a029763d4f5baf39d0d5b9/stable/centos6-native/6aaf4de
LIBGCC_BASE=/mnt/gvfs/third-party2/libgcc/ba9be983c81de7299b59fe71950c664a84dcb5f8/5.x/gcc-5-glibc-2.23/339d858
+# shellcheck disable=SC2148
GCC_BASE=/mnt/gvfs/third-party2/gcc/cf7d14c625ce30bae1a4661c2319c5a283e4dd22/4.8.1/centos6-native/cc6c9dc
CLANG_BASE=/mnt/gvfs/third-party2/llvm-fb/8598c375b0e94e1448182eb3df034704144a838d/stable/centos6-native/3f16ddd
LIBGCC_BASE=/mnt/gvfs/third-party2/libgcc/d6e0a7da6faba45f5e5b1638f9edd7afc2f34e7d/4.8.1/gcc-4.8.1-glibc-2.17/8aac7fc
+# shellcheck disable=SC1113
#/usr/bin/env bash
set -e
if dpkg --get-selections | grep --quiet $1; then
log "$1 is already installed. skipping."
else
+ # shellcheck disable=SC2068
apt-get install $@ -y
fi
elif [[ $OS = "centos" ]]; then
if rpm -qa | grep --quiet $1; then
log "$1 is already installed. skipping."
else
+ # shellcheck disable=SC2068
yum install $@ -y
fi
fi
if gem list | grep --quiet $1; then
log "$1 is already installed. skipping."
else
+ # shellcheck disable=SC2068
gem install $@
fi
}
include $LIB_DIR
}
+# shellcheck disable=SC2068
main $@
header_template = \
"%" + str(max_file_name_length) + "s\t%s\t%s"
separator = "-" * (max_file_name_length + 10 + 20)
- print header_template % ("Filename", "Coverage", "Lines")
+ print header_template % ("Filename", "Coverage", "Lines") # noqa: E999 T25377293 Grandfathered in
print separator
# -- Print body
// The Reader will start reading at the first record located at physical
// position >= initial_offset within the file.
Reader(std::shared_ptr<Logger> info_log,
+ // @lint-ignore TXT2 T25377293 Grandfathered in
unique_ptr<SequentialFileReader>&& file,
Reporter* reporter, bool checksum, uint64_t initial_offset,
uint64_t log_num);
+# shellcheck disable=SC2148
export USE_HDFS=1
export LD_LIBRARY_PATH=$JAVA_HOME/jre/lib/amd64/server:$JAVA_HOME/jre/lib/amd64:/usr/lib/hadoop/lib/native
+# shellcheck disable=SC2148
PLATFORM=64
if [ `getconf LONG_BIT` != "64" ]
then
ROCKS_JAR=`find target -name rocksdbjni*.jar`
echo "Running benchmark in $PLATFORM-Bit mode."
+# shellcheck disable=SC2068
java -server -d$PLATFORM -XX:NewSize=4m -XX:+AggressiveOpts -Djava.library.path=target -cp "${ROCKS_JAR}:benchmark/target/classes" org.rocksdb.benchmark.DbBenchmark $@
auto* ptr_sptr_cff =
reinterpret_cast<std::shared_ptr<rocksdb::CompactionFilterFactoryJniCallback> *>(jhandle);
delete ptr_sptr_cff;
+// @lint-ignore TXT4 T25377293 Grandfathered in
}
\ No newline at end of file
auto* options =
reinterpret_cast<rocksdb::IngestExternalFileOptions*>(jhandle);
delete options;
+// @lint-ignore TXT4 T25377293 Grandfathered in
}
\ No newline at end of file
releaseJniEnv(attached_thread);
}
+// @lint-ignore TXT4 T25377293 Grandfathered in
} // namespace rocksdb
\ No newline at end of file
};
}
+// @lint-ignore TXT4 T25377293 Grandfathered in
#endif // JAVA_ROCKSJNI_JNICALLBACK_H_
\ No newline at end of file
// 2) Comparator -> BaseComparatorJniCallback + JniCallback -> ComparatorJniCallback
// I think this is okay, as Comparator and JniCallback both have virtual destructors...
delete reinterpret_cast<rocksdb::JniCallback*>(handle);
+// @lint-ignore TXT4 T25377293 Grandfathered in
}
\ No newline at end of file
return true;
}
+// @lint-ignore TXT4 T25377293 Grandfathered in
};
\ No newline at end of file
} // namespace rocksdb
+// @lint-ignore TXT4 T25377293 Grandfathered in
#endif // JAVA_ROCKSJNI_STATISTICSJNI_H_
\ No newline at end of file
uint64_t read_file_size;
ASSERT_OK(env_->GetFileSize(fname, &read_file_size));
+ // @lint-ignore TXT2 T25377293 Grandfathered in
Options options;
options.allow_mmap_reads = true;
ImmutableCFOptions ioptions(options);
+# shellcheck disable=SC2148
TMP_DIR="${TMPDIR:-/tmp}/rocksdb-sanity-test"
if [ "$#" -lt 2 ]; then
# Run!!!
IFS=',' read -a jobs <<< $1
+# shellcheck disable=SC2068
for job in ${jobs[@]}; do
if [ $job != debug ]; then
# Run!!!
IFS=',' read -a jobs <<< $1
+# shellcheck disable=SC2068
for job in ${jobs[@]}; do
if [ $job != debug ]; then
cmd = gen_cmd(dict(cmd_params.items() + additional_opts.items()
+ {'db': dbname}.items()))
- print "Running:" + ' '.join(cmd) + "\n"
+ print "Running:" + ' '.join(cmd) + "\n" # noqa: E999 T25377293 Grandfathered in
popen = subprocess.Popen(cmd, stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)
self.assertRunFAIL("get --ttl a3")
self.assertRunOK("checkconsistency", "OK")
- def testInvalidCmdLines(self):
+ def testInvalidCmdLines(self): # noqa: F811 T25377293 Grandfathered in
print "Running testInvalidCmdLines..."
# db not specified
self.assertRunFAILFull("put 0x6133 0x6233 --hex --create_if_missing")
def testColumnFamilies(self):
print "Running testColumnFamilies..."
- dbPath = os.path.join(self.TMP_DIR, self.DB_NAME)
+ dbPath = os.path.join(self.TMP_DIR, self.DB_NAME) # noqa: F841 T25377293 Grandfathered in
self.assertRunOK("put cf1_1 1 --create_if_missing", "OK")
self.assertRunOK("put cf1_2 2 --create_if_missing", "OK")
self.assertRunOK("put cf1_3 3 --try_load_options", "OK")
############################################################################
+# shellcheck disable=SC2068
main $@
+# shellcheck disable=SC2148
TESTDIR=`mktemp -d ${TMPDIR:-/tmp}/rocksdb-dump-test.XXXXX`
DUMPFILE="tools/sample-dump.dmp"
def main(args):
runtimes = generate_runtimes(int(args.runtime_sec))
- print "Going to execute write stress for " + str(runtimes)
+ print "Going to execute write stress for " + str(runtimes) # noqa: E999 T25377293 Grandfathered in
first_time = True
for runtime in runtimes:
default_pool_name);
return &default_env;
}
+// @lint-ignore TXT4 T25377293 Grandfathered in
}
\ No newline at end of file
log_line += key.ToString(true);
log_line += " - ";
AppendNumberTo(&log_line, size);
+ // @lint-ignore TXT2 T25377293 Grandfathered in
log_line += "\n";
// line format: "ADD - <KEY> - <KEY-SIZE>"
ASSERT_EQ(add_num, num_block_entries);
// Log things again but stop logging automatically after reaching 512 bytes
+ // @lint-ignore TXT2 T25377293 Grandfathered in
int max_size = 512;
ASSERT_OK(sim_cache->StartActivityLogging(log_file, env_, max_size));
for (int it = 0; it < 10; it++) {