Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing_code_block_language_in_doc_comment lint to flutter/engine. #51944

Merged
merged 3 commits into from
Apr 8, 2024
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
1 change: 1 addition & 0 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ linter:
# - lines_longer_than_80_chars # not required by flutter style
- literal_only_boolean_expressions
# - matching_super_parameters # blocked on https://github.com/dart-lang/language/issues/2509
- missing_code_block_language_in_doc_comment
# - missing_whitespace_between_adjacent_strings # DIFFERENT FROM FLUTTER/FLUTTER (too many false positives)
- no_adjacent_strings_in_list
- no_default_cases
Expand Down
8 changes: 4 additions & 4 deletions lib/web_ui/lib/src/engine/color_filter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class EngineColorFilter implements SceneImageFilter, ui.ColorFilter {
/// The matrix is in row-major order and the translation column is specified
/// in unnormalized, 0...255, space. For example, the identity matrix is:
///
/// ```
/// ```dart
/// const ColorMatrix identity = ColorFilter.matrix(<double>[
/// 1, 0, 0, 0, 0,
/// 0, 1, 0, 0, 0,
Expand All @@ -62,7 +62,7 @@ class EngineColorFilter implements SceneImageFilter, ui.ColorFilter {
///
/// An inversion color matrix:
///
/// ```
/// ```dart
/// const ColorFilter invert = ColorFilter.matrix(<double>[
/// -1, 0, 0, 0, 255,
/// 0, -1, 0, 0, 255,
Expand All @@ -73,7 +73,7 @@ class EngineColorFilter implements SceneImageFilter, ui.ColorFilter {
///
/// A sepia-toned color matrix (values based on the [Filter Effects Spec](https://www.w3.org/TR/filter-effects-1/#sepiaEquivalent)):
///
/// ```
/// ```dart
/// const ColorFilter sepia = ColorFilter.matrix(<double>[
/// 0.393, 0.769, 0.189, 0, 0,
/// 0.349, 0.686, 0.168, 0, 0,
Expand All @@ -84,7 +84,7 @@ class EngineColorFilter implements SceneImageFilter, ui.ColorFilter {
///
/// A greyscale color filter (values based on the [Filter Effects Spec](https://www.w3.org/TR/filter-effects-1/#grayscaleEquivalent)):
///
/// ```
/// ```dart
/// const ColorFilter greyscale = ColorFilter.matrix(<double>[
/// 0.2126, 0.7152, 0.0722, 0, 0,
/// 0.2126, 0.7152, 0.0722, 0, 0,
Expand Down
4 changes: 2 additions & 2 deletions lib/web_ui/lib/src/engine/configuration.dart
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ class FlutterConfiguration {
///
/// Example:
///
/// ```
/// ```bash
/// flutter run \
/// -d chrome \
/// --web-renderer=canvaskit \
Expand Down Expand Up @@ -279,7 +279,7 @@ class FlutterConfiguration {
///
/// Example:
///
/// ```
/// ```bash
/// flutter run -d chrome --profile --dart-define=FLUTTER_WEB_DEBUG_SHOW_SEMANTICS=true
/// ```
bool get debugShowSemanticsNodes =>
Expand Down
4 changes: 2 additions & 2 deletions lib/web_ui/lib/src/engine/profiler.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ typedef Action<R> = R Function();
///
/// Example:
///
/// ```
/// ```dart
/// final result = timeAction('expensive_operation', () {
/// ... expensive work ...
/// // ... expensive work ...
/// return someValue;
/// });
/// ```
Expand Down
2 changes: 1 addition & 1 deletion lib/web_ui/lib/src/engine/text/line_breaker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ bool _isSurrogatePair(int? codePoint) {
/// way from 0 to the string length. For example, here are the indices for the
/// string "foo bar":
///
/// ```
/// ```none
/// f o o b a r
/// ^ ^ ^ ^ ^ ^ ^ ^
/// 0 1 2 3 4 5 6 7
Expand Down
2 changes: 1 addition & 1 deletion lib/web_ui/lib/src/engine/window.dart
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ base class EngineFlutterView implements ui.FlutterView {
/// so it can push/shrink inside its `hostElement`. That way, a Flutter app
/// can change the layout of the container page.
///
/// ```
/// ```none
/// <p>Some HTML content...</p>
/// +--- (div) hostElement ------------------------------------+
/// | +--- rootElement ---------------------+ |
Expand Down
4 changes: 2 additions & 2 deletions lib/web_ui/test/canvaskit/fragment_program_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,8 @@ const String kJsonIPLR = r'''
}
''';

/// Geenrated by impellerc from
/// ```
/// Generated by impellerc from
/// ```cpp
/// #include <flutter/runtime_effect.glsl>
/// uniform vec2 uSize;
/// uniform float[10] uFloats;
Expand Down
4 changes: 2 additions & 2 deletions testing/scenario_app/bin/utils/options.dart
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ extension type const Options._(ArgResults _args) {
/// This is a shortcut that can be used to determine if the usage information
/// before parsing the remaining command line arguments. For example:
///
/// ```
/// ```dart
/// void main(List<String> args) {
/// if (Options.showUsage(args)) {
/// stdout.writeln(Options.usage);
Expand All @@ -88,7 +88,7 @@ extension type const Options._(ArgResults _args) {
/// be enabled before parsing the remaining command line arguments. For
/// example:
///
/// ```
/// ```dart
/// void main(List<String> args) {
/// final bool verbose = Options.showVerbose(args);
/// // ...
Expand Down
2 changes: 1 addition & 1 deletion testing/skia_gold_client/lib/skia_gold_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ interface class SkiaGoldClient {
/// [pixelColorDelta] defines maximum acceptable difference in RGB channels of
/// each pixel, such that:
///
/// ```
/// ```dart
/// bool isSame(Color image, Color golden, int pixelDeltaThreshold) {
/// return abs(image.r - golden.r)
/// + abs(image.g - golden.g)
Expand Down
4 changes: 2 additions & 2 deletions third_party/web_unicode/tool/unicode_sync_script.dart
Original file line number Diff line number Diff line change
Expand Up @@ -369,15 +369,15 @@ Iterable<UnicodeRange> processRanges(

/// Example:
///
/// ```
/// ```none
/// 0x01C4..0x0293; ALetter
/// 0x0294..0x0294; ALetter
/// 0x0295..0x02AF; ALetter
/// ```
///
/// will get combined into:
///
/// ```
/// ```none
/// 0x01C4..0x02AF; ALetter
/// ```
List<UnicodeRange> combineAdjacentRanges(
Expand Down