From fdba4e3a656317ae3688f9270951918c50b15e88 Mon Sep 17 00:00:00 2001 From: Sam Rawlins Date: Fri, 2 Apr 2021 02:20:48 +0000 Subject: [PATCH] Add CHANGELOG notes about analyzer's cannot-ignore configuration Change-Id: I99e28126c64b34799c1d34251b1e6c318d2f8e5f Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193753 Reviewed-by: Brian Wilkerson Reviewed-by: Konstantin Shcheglov Commit-Queue: Samuel Rawlins --- CHANGELOG.md | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f9bed690037..4028c90daed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,7 +20,23 @@ ### Tools -#### Dartanalyzer +#### Analyzer + +- Static analyses with "error" severity can once again be ignored with + comments like `// ignore: code` and `// ignore_for_file: code`. To declare + that certain analysis codes, or codes with certain severities ("error", + "warning", and "info") cannot be ignored with such comments, list them in + `analysis_options.yaml`, under the `analyzer` heading, with a new YAML key, + `cannot-ignore`. For example, to declare that "error" codes and + `unused_import` cannot be ignored, write the following into + `analysis_options.yaml`: + + ```yaml + analyzer: + cannot-ignore: + - error + - unused_import + ``` #### Linter @@ -180,7 +196,7 @@ This is a patch release that fixes: ### Tools -#### Dartanalyzer +#### Analyzer * Remove the `--use-fasta-parser`, `--preview-dart-2`, and `--enable-assert-initializers` command line options. These options haven't @@ -614,6 +630,11 @@ applications (issue [flutter/flutter#63038][]). * Indent blocks in initializers of multiple-variable declarations. * Update the null-aware subscript syntax from `?.[]` to `?[]`. +#### Analyzer + +* Static analyses with a severity of "error" can no longer be ignored with + comments (`// ignore: code` and `// ignore_for_file: code`). + #### Linter Updated the Linter to `0.1.117`, which includes: