Skip to content

Commit 1d1b7ad

Browse files
authored
Add issue templates (#13)
1 parent 4a1e327 commit 1d1b7ad

File tree

17 files changed

+480
-20
lines changed

17 files changed

+480
-20
lines changed

.editorconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# EditorConfig is awesome: https://EditorConfig.org
1+
# https://EditorConfig.org
22

33
root = true
44

@@ -15,7 +15,7 @@ max_line_length = 100
1515

1616
[*.md]
1717
max_line_length = 130
18-
trim_trailing_whitespace = false # Don't remove trailing whitespace in Markdown files
18+
trim_trailing_whitespace = false
1919

2020
[*.{yml,yaml}]
2121
indent_size = 2

.github/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github: [ habedi ]
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
16+
1.
17+
18+
**Expected behavior**
19+
A clear and concise description of what you expected to happen.
20+
21+
**Logs**
22+
If applicable, add logs to help explain your problem.
23+
24+
**Additional context**
25+
Add any other context about the problem here.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Discussions
4+
url: https://github.com/habedi/bptree/discussions
5+
about: Please ask and answer general questions here
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: enhancement
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/workflows/benches.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
name: Run Benchmarks
22

33
on:
4-
workflow_dispatch: # Allow manual runs
4+
workflow_dispatch:
55
push:
66
tags:
7-
- 'v*' # Trigger on version tags
7+
- 'v*'
8+
9+
permissions:
10+
contents: read
811

912
jobs:
10-
lint:
13+
benchmark:
1114
runs-on: ubuntu-latest
1215

1316
steps:

.github/workflows/lints.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
1-
name: Run Linters
1+
name: Run Linter Checks
22

33
on:
4-
workflow_dispatch: # Allow manual runs
4+
workflow_dispatch:
55
push:
66
tags:
7-
- 'v*' # Trigger on version tags
7+
- 'v*'
8+
pull_request:
9+
branches:
10+
- main
11+
paths-ignore:
12+
- '**.md'
13+
14+
permissions:
15+
contents: read
816

917
jobs:
1018
lint:

.github/workflows/tests.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
11
name: Run Test
22

33
on:
4-
workflow_dispatch: # Allow manual runs
4+
workflow_dispatch:
55
push:
66
tags:
7-
- 'v*' # Trigger on version tags
7+
- 'v*'
8+
pull_request:
9+
branches:
10+
- main
11+
paths-ignore:
12+
- '**.md'
13+
14+
permissions:
15+
contents: read
816

917
jobs:
10-
build:
18+
test:
1119
runs-on: ubuntu-latest
1220

1321
steps:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,3 +145,4 @@ perf.data
145145
*.old
146146
*.folded
147147
*.perf
148+
core.*

include/bptree.h

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
* - This implementation is NOT thread-safe. Caller must provide external
4444
* synchronization (e.g., mutexes) for concurrent access.
4545
*
46-
* @version 0.4.1-beta
46+
* @version 0.4.3
4747
* @author
4848
* "Hassan Abedi <hassan.abedi.t+bptree@gmail.com>"
4949
* @copyright MIT License
@@ -546,10 +546,18 @@ static bool bptree_check_invariants_node(bptree_node* node, const bptree* tree,
546546
const bptree_key_t max_in_child0 =
547547
bptree_find_largest_key(children[0], tree->max_keys);
548548
if (tree->compare(&max_in_child0, &keys[0]) >= 0) {
549+
#ifdef BPTREE_KEY_TYPE_STRING
550+
bptree_debug_print(tree->enable_debug,
551+
"Invariant Fail: max(child[0]) >= key[0] in node %p -- "
552+
"MaxChild=%.*s Key=%.*s\n",
553+
(void*)node, (int)BPTREE_KEY_SIZE, max_in_child0.data,
554+
(int)BPTREE_KEY_SIZE, keys[0].data);
555+
#else
549556
bptree_debug_print(tree->enable_debug,
550557
"Invariant Fail: max(child[0]) >= key[0] in node %p -- "
551558
"MaxChild=%lld Key=%lld\n",
552559
(void*)node, (long long)max_in_child0, (long long)keys[0]);
560+
#endif
553561
return false;
554562
}
555563
}

0 commit comments

Comments
 (0)