2019-02-10 21:07:51 -05:00
|
|
|
/******************************************************************************
|
|
|
|
|
*
|
|
|
|
|
* Copyright (c) 2017, the Perspective Authors.
|
|
|
|
|
*
|
|
|
|
|
* This file is part of the Perspective library, distributed under the terms of
|
|
|
|
|
* the Apache License 2.0. The full license can be found in the LICENSE file.
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
2019-12-06 23:30:51 -05:00
|
|
|
const {execute, bash, path} = require("./script_utils.js");
|
2019-02-10 21:07:51 -05:00
|
|
|
const minimatch = require("minimatch");
|
|
|
|
|
|
|
|
|
|
function lint(dir) {
|
2019-12-06 23:30:51 -05:00
|
|
|
execute(bash`clang-format -i -style=file ${dir}`);
|
2019-02-10 21:07:51 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
try {
|
2021-09-19 16:55:14 -04:00
|
|
|
lint(path`./cpp/perspective/src/cpp/*.cpp`);
|
|
|
|
|
lint(path`./cpp/perspective/src/include/perspective/*.h`);
|
2022-01-05 01:01:33 -06:00
|
|
|
lint(path`./python/perspective/perspective/src/*.cpp`);
|
|
|
|
|
lint(path`./python/perspective/perspective/include/perspective/*.h`);
|
|
|
|
|
lint(path`./python/perspective/perspective/include/perspective/python/*.h`);
|
2019-02-10 21:07:51 -05:00
|
|
|
} catch (e) {
|
|
|
|
|
console.error(e.message);
|
|
|
|
|
process.exit(1);
|
|
|
|
|
}
|