diff options
| author | Felix Morgner <felix.morgner@ost.ch> | 2025-12-22 15:25:59 +0100 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@ost.ch> | 2025-12-22 15:25:59 +0100 |
| commit | 86635f9686826c2857ad749bad5e982876928d84 (patch) | |
| tree | c1e8a614b5a758b2a2e3d57f121023c030f55f4e | |
| parent | b4ff67c8a9bebd99eb3c06ea141fe0f1b8feb5a4 (diff) | |
| download | teachos-86635f9686826c2857ad749bad5e982876928d84.tar.xz teachos-86635f9686826c2857ad749bad5e982876928d84.zip | |
chore: ensure headers are linted
| -rw-r--r-- | .clang-tidy | 4 | ||||
| -rw-r--r-- | .vscode/settings.json | 12 | ||||
| -rw-r--r-- | arch/x86_64/include/x86_64/cpu/control_register.hpp | 3 | ||||
| -rw-r--r-- | arch/x86_64/include/x86_64/cpu/model_specific_register.hpp | 3 | ||||
| -rw-r--r-- | arch/x86_64/include/x86_64/device_io/port_io.hpp | 6 |
5 files changed, 28 insertions, 0 deletions
diff --git a/.clang-tidy b/.clang-tidy index 6b3bfd9..e802dbd 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -64,3 +64,7 @@ CheckOptions: readability-magic-numbers.IgnorePowersOf2IntegerValues: true readability-magic-numbers.IgnoreBitFieldsWidths: true readability-magic-numbers.IgnoreTypeAliases: true + +FormatStyle: file +HeaderFilterRegex: '(.*/kstd/.*)|.*\.hpp' +SystemHeaders: true
\ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index 7f588f4..96d6ab4 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -23,8 +23,12 @@ }, "cSpell.words": [ "acpi", + "bugprone", + "cppcoreguidelines", "crtc", + "crtp", "efer", + "functors", "initializable", "interprocedural", "invlpg", @@ -32,13 +36,21 @@ "iwyu", "kapi", "kstd", + "malloc", "memcmp", + "memset", "multiboot", + "nodiscard", "nolintnextline", + "nullptr", + "println", + "raii", "rdmsr", "rvalues", + "stringview", "sysret", "teachos", + "undelegated", "wrmsr" ] }
\ No newline at end of file diff --git a/arch/x86_64/include/x86_64/cpu/control_register.hpp b/arch/x86_64/include/x86_64/cpu/control_register.hpp index 9c3bad5..67ae87e 100644 --- a/arch/x86_64/include/x86_64/cpu/control_register.hpp +++ b/arch/x86_64/include/x86_64/cpu/control_register.hpp @@ -85,6 +85,9 @@ namespace teachos::cpu::x86_64 template<typename Derived, typename ValueType, typename = void> struct control_register_with_flags { + private: + constexpr control_register_with_flags() noexcept = default; + friend Derived; }; //! @copydoc control_register_with_flags diff --git a/arch/x86_64/include/x86_64/cpu/model_specific_register.hpp b/arch/x86_64/include/x86_64/cpu/model_specific_register.hpp index 857b444..39765fe 100644 --- a/arch/x86_64/include/x86_64/cpu/model_specific_register.hpp +++ b/arch/x86_64/include/x86_64/cpu/model_specific_register.hpp @@ -52,6 +52,9 @@ namespace teachos::cpu::x86_64 template<typename Derived, typename ValueType, typename = void> struct model_specific_register_with_flags { + private: + constexpr model_specific_register_with_flags() noexcept = default; + friend Derived; }; //! @copydoc model_specific_register_with_flags diff --git a/arch/x86_64/include/x86_64/device_io/port_io.hpp b/arch/x86_64/include/x86_64/device_io/port_io.hpp index c3e5271..295a0cd 100644 --- a/arch/x86_64/include/x86_64/device_io/port_io.hpp +++ b/arch/x86_64/include/x86_64/device_io/port_io.hpp @@ -38,6 +38,9 @@ namespace teachos::io::x86_64 } private: + constexpr port_read() noexcept = default; + friend Derived; + //! The assembly templates used for reading from an I/O port. constexpr auto static code = std::array{ std::string_view{"mov %[port], %%dx\nin %%dx, %%al\nmov %%al, %[data]"}, @@ -61,6 +64,9 @@ namespace teachos::io::x86_64 } private: + constexpr port_write() noexcept = default; + friend Derived; + //! The assembly templates used for writing to an I/O port. constexpr auto static code = std::array{ std::string_view{"mov %[port], %%dx\nmov %%dx, %[data]\nout %%al, %%dx"}, |
