Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 0 additions & 28 deletions docs/Queries/Explaining Queries.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,6 @@ Explanation of this Tasks code block query:

due before tomorrow =>
due date is before 2022-10-22 (Saturday 22nd October 2022)

No grouping instructions supplied.

No sorting instructions supplied.
```
<!-- endSnippet -->

Expand Down Expand Up @@ -85,10 +81,6 @@ Explanation of this Tasks code block query:

path regex matches /^Root/Sub-Folder/Sample File\.md/i =>
using regex: '^Root\/Sub-Folder\/Sample File\.md' with flag 'i'

No grouping instructions supplied.

No sorting instructions supplied.
```
<!-- endSnippet -->

Expand Down Expand Up @@ -117,10 +109,6 @@ Explanation of this Tasks code block query:
due before tomorrow =>
due date is before 2022-10-22 (Saturday 22nd October 2022)
is recurring

No grouping instructions supplied.

No sorting instructions supplied.
```
<!-- endSnippet -->

Expand Down Expand Up @@ -170,10 +158,6 @@ Explanation of this Tasks code block query:
description includes 7
NOT:
description includes 7

No grouping instructions supplied.

No sorting instructions supplied.
```
<!-- endSnippet -->

Expand Down Expand Up @@ -209,10 +193,6 @@ Explanation of the global query:

heading includes tasks

No grouping instructions supplied.

No sorting instructions supplied.

At most 50 tasks.

Explanation of this Tasks code block query:
Expand All @@ -223,10 +203,6 @@ Explanation of this Tasks code block query:
due date is between:
2022-10-24 (Monday 24th October 2022) and
2022-10-30 (Sunday 30th October 2022) inclusive

No grouping instructions supplied.

No sorting instructions supplied.
```
<!-- endSnippet -->

Expand Down Expand Up @@ -277,10 +253,6 @@ Explanation of this Tasks code block query:

description includes Some Cryptic String {{! Inline comments are removed before search }} =>
description includes Some Cryptic String

No grouping instructions supplied.

No sorting instructions supplied.
```
<!-- endSnippet -->

Expand Down
8 changes: 0 additions & 8 deletions docs/Queries/Line Continuations.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@ Explanation of this Tasks code block query:
OR (At least one of):
priority is highest
priority is lowest

No grouping instructions supplied.

No sorting instructions supplied.
```
<!-- endSnippet -->

Expand Down Expand Up @@ -81,10 +77,6 @@ Explanation of this Tasks code block query:

description includes \\ =>
description includes \

No grouping instructions supplied.

No sorting instructions supplied.
```
<!-- endSnippet -->

Expand Down
4 changes: 0 additions & 4 deletions docs/Queries/Regular Expressions.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,6 @@ Explanation of this Tasks code block query:

path regex matches /^Root/Sub-Folder/Sample File\.md/i =>
using regex: '^Root\/Sub-Folder\/Sample File\.md' with flag 'i'

No grouping instructions supplied.

No sorting instructions supplied.
```
<!-- endSnippet -->

Expand Down
4 changes: 0 additions & 4 deletions docs/Scripting/Placeholders.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,6 @@ Explanation of this Tasks code block query:

description includes Some Cryptic String {{! Inline comments are removed before search }} =>
description includes Some Cryptic String

No grouping instructions supplied.

No sorting instructions supplied.
```
<!-- endSnippet -->

Expand Down
4 changes: 2 additions & 2 deletions src/Query/Explain/Explainer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@ export class Explainer {

public explainGroups(query: Query) {
if (query.grouping.length === 0) {
return this.indent('No grouping instructions supplied.\n');
return '';
}

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

public explainSorters(query: Query) {
if (query.sorting.length === 0) {
return this.indent('No sorting instructions supplied.\n');
return '';
}

return query.sorting.map((sort) => sort.statement.explainStatement(this.indentation)).join('\n\n') + '\n';
Expand Down
2 changes: 0 additions & 2 deletions tests/Config/DebugSettings.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ describe('DebugSettings', () => {
expect(query.explainQuery()).toMatchInlineSnapshot(`
"No filters supplied. All tasks will match the query.
No grouping instructions supplied.
sort by status
NOTE: All sort instructions, including default sort order, are disabled, due to 'ignoreSortInstructions' setting.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,3 @@ Explanation of this Tasks code block query:
due before tomorrow =>
due date is before 2022-10-22 (Saturday 22nd October 2022)
is recurring

No grouping instructions supplied.

No sorting instructions supplied.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,3 @@ Explanation of this Tasks code block query:

due before tomorrow =>
due date is before 2022-10-22 (Saturday 22nd October 2022)

No grouping instructions supplied.

No sorting instructions supplied.
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ Explanation of the global query:

heading includes tasks

No grouping instructions supplied.

No sorting instructions supplied.

At most 50 tasks.

Explanation of this Tasks code block query:
Expand All @@ -16,7 +12,3 @@ Explanation of this Tasks code block query:
due date is between:
2022-10-24 (Monday 24th October 2022) and
2022-10-30 (Sunday 30th October 2022) inclusive

No grouping instructions supplied.

No sorting instructions supplied.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,3 @@ Explanation of this Tasks code block query:

description includes \\ =>
description includes \

No grouping instructions supplied.

No sorting instructions supplied.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,3 @@ Explanation of this Tasks code block query:
OR (At least one of):
priority is highest
priority is lowest

No grouping instructions supplied.

No sorting instructions supplied.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,3 @@ Explanation of this Tasks code block query:
description includes 7
NOT:
description includes 7

No grouping instructions supplied.

No sorting instructions supplied.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,3 @@ Explanation of this Tasks code block query:

description includes Some Cryptic String {{! Inline comments are removed before search }} =>
description includes Some Cryptic String

No grouping instructions supplied.

No sorting instructions supplied.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,3 @@ Explanation of this Tasks code block query:

path regex matches /^Root/Sub-Folder/Sample File\.md/i =>
using regex: '^Root\/Sub-Folder\/Sample File\.md' with flag 'i'

No grouping instructions supplied.

No sorting instructions supplied.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,3 @@ due 14 October =>

due May =>
due date is on 2023-05-01 (Monday 1st May 2023)

No grouping instructions supplied.

No sorting instructions supplied.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,3 @@ due next year =>
2024-12-31 (Tuesday 31st December 2024) inclusive

description includes ------------------------------

No grouping instructions supplied.

No sorting instructions supplied.
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,3 @@ due next sunday =>
due date is on 2023-04-23 (Sunday 23rd April 2023)

description includes ------------------------------

No grouping instructions supplied.

No sorting instructions supplied.
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,4 @@ tags regex does not match /(home|town)/ =>
tags regex matches /(home|pc_mac|town)/ =>
using regex: '(home|pc_mac|town)' with no flags

No grouping instructions supplied.

No sorting instructions supplied.

Error: None
24 changes: 0 additions & 24 deletions tests/Query/Query.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -817,8 +817,6 @@ Problem statement:
{{query.file.property('task_instruction')}} =>
group by filename
No sorting instructions supplied.
"
`);
});
Expand All @@ -831,10 +829,6 @@ Problem statement:
expect(query.explainQuery()).toMatchInlineSnapshot(`
"{{query.file.property('task_instruction_with_spaces')}} =>
path includes query_using_properties
No grouping instructions supplied.
No sorting instructions supplied.
"
`);
});
Expand All @@ -860,8 +854,6 @@ group by folder
{{query.file.property('task_instructions')}}: statement 3 after expansion of placeholder =>
group by filename
No sorting instructions supplied.
"
`);
});
Expand Down Expand Up @@ -911,10 +903,6 @@ filter by function \\
return roots.includes(task.file.root);
=>
filter by function if (!query.file.hasProperty('root_dirs_to_search')) { throw Error('Please set the "root_dirs_to_search" list property, with each value ending in a backslash...'); } const roots = query.file.property('root_dirs_to_search'); return roots.includes(task.file.root);
No grouping instructions supplied.
No sorting instructions supplied.
"
`);

Expand Down Expand Up @@ -1541,10 +1529,6 @@ describe('Query', () => {
const query = new Query(source);
expect(query.explainQuery()).toMatchInlineSnapshot(`
"description includes hello
No grouping instructions supplied.
No sorting instructions supplied.
"
`);
});
Expand Down Expand Up @@ -1824,10 +1808,6 @@ with \ backslash)`;
OR (At least one of):
description includes line 1
description includes line 1 continued with \\ backslash
No grouping instructions supplied.
No sorting instructions supplied.
"
`);
expect(queryUpperCase.explainQuery()).toMatchInlineSnapshot(`
Expand All @@ -1839,10 +1819,6 @@ with \ backslash)`;
OR (At least one of):
description includes line 1
description includes line 1 continued with \\ backslash
No grouping instructions supplied.
No sorting instructions supplied.
"
`);
});
Expand Down
Loading