Skip to content

Commit 1a0cd95

Browse files
Add simple pre-commit job and dependabot config (#7)
1 parent 01965cc commit 1a0cd95

File tree

5 files changed

+74
-5
lines changed

5 files changed

+74
-5
lines changed

.codespell_words

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
unexpect
2+
OT

.github/dependabot.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "github-actions"
9+
# Workflow files stored in the
10+
# default location of `.github/workflows`
11+
directory: "/"
12+
schedule:
13+
interval: "weekly"

.github/workflows/format.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Format
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
push:
7+
branches:
8+
- main
9+
10+
jobs:
11+
pre-commit:
12+
name: pre-commit
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: actions/setup-python@v5
17+
- uses: pre-commit/[email protected]

.pre-commit-config.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
repos:
2+
# Standard hooks
3+
- repo: https://github.com/pre-commit/pre-commit-hooks
4+
rev: v6.0.0
5+
hooks:
6+
- id: check-added-large-files
7+
- id: check-ast
8+
- id: check-builtin-literals
9+
- id: fix-byte-order-marker
10+
- id: check-case-conflict
11+
- id: check-docstring-first
12+
- id: check-executables-have-shebangs
13+
- id: check-json
14+
- id: check-merge-conflict
15+
- id: check-symlinks
16+
- id: check-toml
17+
- id: check-vcs-permalinks
18+
- id: check-yaml
19+
- id: debug-statements
20+
- id: destroyed-symlinks
21+
- id: detect-private-key
22+
- id: end-of-file-fixer
23+
- id: fix-byte-order-marker
24+
- id: fix-encoding-pragma
25+
- id: forbid-new-submodules
26+
- id: mixed-line-ending
27+
- id: name-tests-test
28+
- id: requirements-txt-fixer
29+
- id: sort-simple-yaml
30+
- id: trailing-whitespace
31+
32+
- repo: https://github.com/codespell-project/codespell
33+
rev: v2.4.1
34+
hooks:
35+
- id: codespell
36+
args: ['--write-changes', '--ignore-words=.codespell_words']
37+
exclude: CHANGELOG.rst

tl_expected/include/tl_expected/expected.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
#if (TL_CPLUSPLUS > 201103L) && !defined(TL_EXPECTED_GCC49)
5757
#include <cassert>
5858
#define TL_ASSERT(x) assert(x)
59-
#else
59+
#else
6060
#define TL_ASSERT(x)
6161
#endif
6262
#endif
@@ -132,7 +132,7 @@ struct is_trivially_copy_constructible<std::vector<T, A>> : std::false_type {};
132132
#define TL_EXPECTED_11_CONSTEXPR constexpr
133133
#endif
134134

135-
#if TL_CPLUSPLUS >= 201703L
135+
#if TL_CPLUSPLUS >= 201703L
136136
#define TL_EXPECTED_NODISCARD [[nodiscard]]
137137
#else
138138
#define TL_EXPECTED_NODISCARD
@@ -534,7 +534,7 @@ template <class T, class E> struct expected_storage_base<T, E, true, true> {
534534
Args &&...args)
535535
: m_unexpect(il, std::forward<Args>(args)...), m_has_val(false) {}
536536

537-
expected_storage_base(const expected_storage_base &) = default;
537+
expected_storage_base(const expected_storage_base &) = default;
538538
expected_storage_base(expected_storage_base &&) = default;
539539
expected_storage_base &operator=(const expected_storage_base &) = default;
540540
expected_storage_base &operator=(expected_storage_base &&) = default;
@@ -651,9 +651,9 @@ template <class E> struct expected_storage_base<void, E, false, true> {
651651
//no constexpr for GCC 4/5 bug
652652
#else
653653
TL_EXPECTED_MSVC2015_CONSTEXPR
654-
#endif
654+
#endif
655655
expected_storage_base() : m_has_val(true) {}
656-
656+
657657
constexpr expected_storage_base(no_init_t) : m_val(), m_has_val(false) {}
658658

659659
constexpr expected_storage_base(in_place_t) : m_has_val(true) {}

0 commit comments

Comments
 (0)