Skip to content

Commit e4dbafa

Browse files
committed
feat: Remove 'No sorting...' & 'No grouping...' from explain output
1 parent 4cfca48 commit e4dbafa

16 files changed

+2
-128
lines changed

src/Query/Explain/Explainer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,15 @@ export class Explainer {
5858

5959
public explainGroups(query: Query) {
6060
if (query.grouping.length === 0) {
61-
return this.indent('No grouping instructions supplied.\n');
61+
return '';
6262
}
6363

6464
return query.grouping.map((group) => group.statement.explainStatement(this.indentation)).join('\n\n') + '\n';
6565
}
6666

6767
public explainSorters(query: Query) {
6868
if (query.sorting.length === 0) {
69-
return this.indent('No sorting instructions supplied.\n');
69+
return '';
7070
}
7171

7272
return query.sorting.map((sort) => sort.statement.explainStatement(this.indentation)).join('\n\n') + '\n';

tests/Config/DebugSettings.test.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ describe('DebugSettings', () => {
3737
expect(query.explainQuery()).toMatchInlineSnapshot(`
3838
"No filters supplied. All tasks will match the query.
3939
40-
No grouping instructions supplied.
41-
4240
sort by status
4341
4442
NOTE: All sort instructions, including default sort order, are disabled, due to 'ignoreSortInstructions' setting.

tests/Query/Explain/DocsSamplesForExplain.test.explain_boolean_combinations.approved.explanation.text

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,3 @@ Explanation of this Tasks code block query:
77
due before tomorrow =>
88
due date is before 2022-10-22 (Saturday 22nd October 2022)
99
is recurring
10-
11-
No grouping instructions supplied.
12-
13-
No sorting instructions supplied.

tests/Query/Explain/DocsSamplesForExplain.test.explain_expands_dates.approved.explanation.text

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,3 @@ Explanation of this Tasks code block query:
88

99
due before tomorrow =>
1010
due date is before 2022-10-22 (Saturday 22nd October 2022)
11-
12-
No grouping instructions supplied.
13-
14-
No sorting instructions supplied.

tests/Query/Explain/DocsSamplesForExplain.test.explain_explains_task_block_with_global_query_active.approved.explanation.text

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@ Explanation of the global query:
22

33
heading includes tasks
44

5-
No grouping instructions supplied.
6-
7-
No sorting instructions supplied.
8-
95
At most 50 tasks.
106

117
Explanation of this Tasks code block query:
@@ -16,7 +12,3 @@ Explanation of this Tasks code block query:
1612
due date is between:
1713
2022-10-24 (Monday 24th October 2022) and
1814
2022-10-30 (Sunday 30th October 2022) inclusive
19-
20-
No grouping instructions supplied.
21-
22-
No sorting instructions supplied.

tests/Query/Explain/DocsSamplesForExplain.test.explain_line_continuation_-_double_slash.approved.explanation.text

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,3 @@ Explanation of this Tasks code block query:
22

33
description includes \\ =>
44
description includes \
5-
6-
No grouping instructions supplied.
7-
8-
No sorting instructions supplied.

tests/Query/Explain/DocsSamplesForExplain.test.explain_line_continuation_-_single_slash.approved.explanation.text

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,3 @@ Explanation of this Tasks code block query:
77
OR (At least one of):
88
priority is highest
99
priority is lowest
10-
11-
No grouping instructions supplied.
12-
13-
No sorting instructions supplied.

tests/Query/Explain/DocsSamplesForExplain.test.explain_nested_boolean_combinations.approved.explanation.text

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,3 @@ Explanation of this Tasks code block query:
2020
description includes 7
2121
NOT:
2222
description includes 7
23-
24-
No grouping instructions supplied.
25-
26-
No sorting instructions supplied.

tests/Query/Explain/DocsSamplesForExplain.test.explain_placeholders.approved.explanation.text

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,3 @@ Explanation of this Tasks code block query:
2020

2121
description includes Some Cryptic String {{! Inline comments are removed before search }} =>
2222
description includes Some Cryptic String
23-
24-
No grouping instructions supplied.
25-
26-
No sorting instructions supplied.

tests/Query/Explain/DocsSamplesForExplain.test.explain_regular_expression.approved.explanation.text

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,3 @@ Explanation of this Tasks code block query:
22

33
path regex matches /^Root/Sub-Folder/Sample File\.md/i =>
44
using regex: '^Root\/Sub-Folder\/Sample File\.md' with flag 'i'
5-
6-
No grouping instructions supplied.
7-
8-
No sorting instructions supplied.

0 commit comments

Comments
 (0)