Skip to content

Commit

Permalink
Add glossary definitions for code fixes (#6190)
Browse files Browse the repository at this point in the history
Fixes #6177
  • Loading branch information
MaryaBelanger authored Nov 6, 2024
1 parent b5533ea commit 8d1b1d7
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
48 changes: 48 additions & 0 deletions src/_data/glossary.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
- term: "Assist"
short_description: |-
An automated, local code edit targeted at making common improvements to code.
long_description: |-
An assist is an automated, local code edit targeted at making common
improvements to code.
Examples of assists include converting `switch` statements to `switch`
expressions, reversing the `then` and `else` blocks in an `if` statement,
and inserting widgets into a widget structure.
related_links:
- text: "Refactor"
link: "#refactor"
labels:
- "tools"
- "analyzer"
alternate:
- "Quick assist"

- term: "Constant context"
short_description: |-
A region of code where the const keyword is implied and
Expand Down Expand Up @@ -371,6 +389,36 @@
- "language"
- "libraries"

- term: "Quick fix"
short_description: |-
An automated, local code edit targeted at fixing the issue reported by a
specific diagnostic.
related_links:
- text: "Quick fixes for analysis issues"
link: "https://medium.com/dartlang/quick-fixes-for-analysis-issues-c10df084971a"
- text: "Diagnostic messages"
link: "/tools/diagnostic-messages"
- text: "Linter rules"
link: "/tools/linter-rules"
labels:
- "tools"
- "understanding diagnostics"

- term: "Refactor"
short_description: |-
A code edit targeted at modifications that are either non-local or that
require user interaction.
long_description: |-
A refactor is a code edit targeted at modifications that are either non-local
or that require user interaction.
Examples of refactors include renaming, removing, or extracting code.
related_links:
- text: "Assist"
link: "#assist"
labels:
- "tools"
- "analysis"

- term: "Refutable pattern"
short_description: |-
A pattern that can be tested against a value.
Expand Down
4 changes: 4 additions & 0 deletions src/content/resources/glossary.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ description: A glossary reference for terminology used across dart.dev.
body_class: glossary-page
---

{% comment %}
Write glossary entries into the src/_data/glossary.yml file.
{% endcomment -%}

The following are definitions of terms used across the Dart documentation.

{% assign sorted_terms = glossary | sort: "term" %}
Expand Down

0 comments on commit 8d1b1d7

Please sign in to comment.