blob: 6c25467a5448a392254abee9e63363836382a57b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
// Copyright (c) 2026 Progmasoft.
// SPDX-License-Identifier: LGPL-3.0-or-later
// bazelisk run //tools:check
#include <iostream>
#include "tools/Amalgamation.hpp"
#include "tools/Checks.hpp"
#include "tools/Repository.hpp"
#include "tools/Versions.hpp"
int
main(int argc, char **)
{
using namespace Progmasoft::Catch3::Tools;
if (argc != 1)
{
std::cerr << "usage: bazelisk run //tools:check\n";
return 2;
}
const auto root = RepositoryRoot();
if (!root)
{
std::cerr << "run this tool with bazelisk run\n";
return 2;
}
Problems problems;
CheckLicenses(*root, problems);
CheckConvenienceHeaders(*root, problems);
CheckPragmaOnce(*root, problems);
CheckDuplicateFilenames(*root, problems);
CheckVersions(*root, problems);
const auto amalgamation = GenerateAmalgamation(*root, problems);
if (problems.empty())
{
CheckAmalgamation(*root, amalgamation, problems);
}
return Finish(problems);
}
|