Skip to content

Conversation

@claremacrae
Copy link
Collaborator

@claremacrae claremacrae commented Dec 5, 2024

Types of changes

Changes visible to users:

Internal changes:

  • Refactor (prefix: refactor - non-breaking change which only improves the design or structure of existing code, and making no changes to its external behaviour)
  • Tests (prefix: test - additions and improvements to unit tests and the smoke tests)

Description

The explanations of sort by and group by now reveal any placeholders and continuation lines, making it easier to understand the underlying query.

Note that there is one change in behaviour, revealed by a probable typo in an old test...

This:

sort by priority()

Used to be explained as:

sort by priority

And is now explained as:

sort by priority()

I was not immediately able to see the cause of the change. But decided to accept it, as it makes the explain output better match the underlying text - and also if any users share explanations in GitHub or Discord, the extra characters will at least be visible.

Motivation and Context

Fix #2349.

How has this been tested?

  • Automated tests
  • Exploratory testing

Screenshots (if appropriate)

image

Checklist

Terms

This was a copy-and-paste typo in the original code
… as for filters

The extra blank line makes the explanations readable with custom sorting and grouping,
where the continuation characters and/or placeholders are used.
@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 5, 2024

@claremacrae claremacrae added the scope: explain About the `explain` instruction which generates explanations of tasks query blocks label Dec 5, 2024
@claremacrae claremacrae merged commit 3700d09 into main Dec 5, 2024
4 checks passed
@claremacrae claremacrae deleted the explain-grouping-and-sorting branch December 5, 2024 10:10
claremacrae added a commit that referenced this pull request Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: explain About the `explain` instruction which generates explanations of tasks query blocks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make 'explain' show the effect of Line Continuations and Placeholders

2 participants