mirror of
https://github.com/facebook/rocksdb.git
synced 2024-12-02 20:52:55 +00:00
a1581eca87
Summary: This was motivated by t7518166. checkCpp crashes on db_test.cc because the file is too big :( Couple of changes: * Added clang-format linter. Now we can catch all code that is not formatted correctly. * Added Howtoeven in our list of linters * Replaced cpplint with flint * Removed checkCpp lint. Nobody ownes it and it doesn't work on db_test.cc Test Plan: Made a random lint error and `arc lint`. Saw an error. Reviewers: yhchiang, kradhakrishnan, anthony, sdong Reviewed By: sdong Subscribers: dhruba, leveldb Differential Revision: https://reviews.facebook.net/D41949
28 lines
846 B
PHP
28 lines
846 B
PHP
<?php
|
|
// Copyright 2015-present Facebook. All Rights Reserved.
|
|
// This source code is licensed under the BSD-style license found in the
|
|
// LICENSE file in the root directory of this source tree. An additional grant
|
|
// of patent rights can be found in the PATENTS file in the same directory.
|
|
|
|
final class FacebookHowtoevenLintEngine extends ArcanistLintEngine {
|
|
|
|
public function buildLinters() {
|
|
$paths = array();
|
|
|
|
foreach ($this->getPaths() as $path) {
|
|
// Don't try to lint deleted files or changed directories.
|
|
if (!Filesystem::pathExists($path) || is_dir($path)) {
|
|
continue;
|
|
}
|
|
|
|
if (preg_match('/\.(cpp|c|cc|cxx|h|hh|hpp|hxx|tcc)$/', $path)) {
|
|
$paths[] = $path;
|
|
}
|
|
}
|
|
|
|
$howtoeven = new FacebookHowtoevenLinter();
|
|
$howtoeven->setPaths($paths);
|
|
return array($howtoeven);
|
|
}
|
|
}
|