dart-sdk/pkg/analyzer/tool
Moritz b321254093 Add @mustBeConst annotation for parameters which should be
constant.

As const-only parameters are not planned, see
https://github.com/dart-lang/language/issues/1684, an annotation with analyzer support could help a bit at least, see
https://github.com/dart-lang/sdk/issues/29381.

The motivation is to enforce const arguments for methods annotated with
`@ResourceIdentifier`, to be able to record the argument values at build time, see https://dart-review.googlesource.com/c/sdk/+/329961.

Tested: pkg/analyzer/test/src/diagnostics/const_argument_test.dart
Change-Id: I2b8d2dce0c899fc0caa4985d892a5d031c747521
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/357701
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Moritz Sümmermann <mosum@google.com>
Reviewed-by: Marya Belanger <mbelanger@google.com>
2024-04-04 15:22:31 +00:00
..
analysis_driver migrate analyzer to recommended lints 2022-04-11 22:47:41 +00:00
benchmark/heap Update flutter_elements.xml baseline. 2024-03-06 00:40:18 +00:00
diagnostics Add @mustBeConst annotation for parameters which should be 2024-04-04 15:22:31 +00:00
experiments fixed dangling library doc comments 2023-04-12 00:29:48 +00:00
messages [analyzer] Update diagnostic messages to use markdown codeblocks 2024-02-02 18:42:28 +00:00
summary Augment. Parse 'augment' for enum declaration. 2024-04-03 15:59:49 +00:00
test_log_parser Add some recent lint rules to analyzer 2022-11-14 04:14:40 +00:00
wolf CQ. Enable avoid_redundant_argument_values in analyzer/ 2024-02-26 19:55:13 +00:00
fasta_migration_progress.sh [test_runner] Use package:args 2022-05-24 10:51:51 +00:00
generate_files [analyzer] Fix bugs in generate_files script. 2022-08-17 15:43:13 +00:00
update_id_tests.dart Flow analysis: begin tracking non-promotion reasons. 2021-02-02 16:15:34 +00:00