diff --git a/.codespell_words b/.codespell_words new file mode 100644 index 0000000..21b7f9d --- /dev/null +++ b/.codespell_words @@ -0,0 +1,2 @@ +unexpect +OT diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..05a48fc --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,13 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: "github-actions" + # Workflow files stored in the + # default location of `.github/workflows` + directory: "/" + schedule: + interval: "weekly" diff --git a/.github/workflows/format.yaml b/.github/workflows/format.yaml new file mode 100644 index 0000000..c34f5c4 --- /dev/null +++ b/.github/workflows/format.yaml @@ -0,0 +1,17 @@ +name: Format + +on: + workflow_dispatch: + pull_request: + push: + branches: + - main + +jobs: + pre-commit: + name: pre-commit + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + - uses: pre-commit/action@v3.0.1 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..ecebeb6 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,37 @@ +repos: + # Standard hooks + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v6.0.0 + hooks: + - id: check-added-large-files + - id: check-ast + - id: check-builtin-literals + - id: fix-byte-order-marker + - id: check-case-conflict + - id: check-docstring-first + - id: check-executables-have-shebangs + - id: check-json + - id: check-merge-conflict + - id: check-symlinks + - id: check-toml + - id: check-vcs-permalinks + - id: check-yaml + - id: debug-statements + - id: destroyed-symlinks + - id: detect-private-key + - id: end-of-file-fixer + - id: fix-byte-order-marker + - id: fix-encoding-pragma + - id: forbid-new-submodules + - id: mixed-line-ending + - id: name-tests-test + - id: requirements-txt-fixer + - id: sort-simple-yaml + - id: trailing-whitespace + + - repo: https://github.com/codespell-project/codespell + rev: v2.4.1 + hooks: + - id: codespell + args: ['--write-changes', '--ignore-words=.codespell_words'] + exclude: CHANGELOG.rst diff --git a/tl_expected/include/tl_expected/expected.hpp b/tl_expected/include/tl_expected/expected.hpp index 06e6dc4..ae90975 100644 --- a/tl_expected/include/tl_expected/expected.hpp +++ b/tl_expected/include/tl_expected/expected.hpp @@ -56,7 +56,7 @@ #if (TL_CPLUSPLUS > 201103L) && !defined(TL_EXPECTED_GCC49) #include #define TL_ASSERT(x) assert(x) -#else +#else #define TL_ASSERT(x) #endif #endif @@ -132,7 +132,7 @@ struct is_trivially_copy_constructible> : std::false_type {}; #define TL_EXPECTED_11_CONSTEXPR constexpr #endif -#if TL_CPLUSPLUS >= 201703L +#if TL_CPLUSPLUS >= 201703L #define TL_EXPECTED_NODISCARD [[nodiscard]] #else #define TL_EXPECTED_NODISCARD @@ -534,7 +534,7 @@ template struct expected_storage_base { Args &&...args) : m_unexpect(il, std::forward(args)...), m_has_val(false) {} - expected_storage_base(const expected_storage_base &) = default; + expected_storage_base(const expected_storage_base &) = default; expected_storage_base(expected_storage_base &&) = default; expected_storage_base &operator=(const expected_storage_base &) = default; expected_storage_base &operator=(expected_storage_base &&) = default; @@ -651,9 +651,9 @@ template struct expected_storage_base { //no constexpr for GCC 4/5 bug #else TL_EXPECTED_MSVC2015_CONSTEXPR - #endif + #endif expected_storage_base() : m_has_val(true) {} - + constexpr expected_storage_base(no_init_t) : m_val(), m_has_val(false) {} constexpr expected_storage_base(in_place_t) : m_has_val(true) {}