Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/tools/Checks.hpp
blob: 16d698a0e2c68e985749342ad181f3da29b33405 (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
// Copyright (c) 2026 Progmasoft.
// SPDX-License-Identifier: MPL-2.0 WITH AdditionRef-Progmasoft-Exception-2.0
#pragma once

#include <filesystem>

#include "tools/Repository.hpp"

namespace Progmasoft::Catch3::Tools
{
    /// Every source file starts with the license of its part: engine files
    /// keep Catch2's, the rest carry Progmasoft's.
    void
    CheckLicenses(const std::filesystem::path &root, Problems &problems);

    /// Every `All.hpp` of the engine includes the engine headers of its folder
    /// and nothing else, sorted and once each.
    void
    CheckConvenienceHeaders(const std::filesystem::path &root,
                            Problems &problems);

    /// Every header of the library has `#pragma once`.
    void
    CheckPragmaOnce(const std::filesystem::path &root, Problems &problems);

    /// No two sources of the library share a file name: build tools that keep
    /// object files in one directory would compile one over the other.
    void
    CheckDuplicateFilenames(const std::filesystem::path &root,
                            Problems &problems);
} // namespace Progmasoft::Catch3::Tools