Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(81)

Side by Side Diff: lib/src/rules/slash_for_doc_comments.dart

Issue 2318333002: Fix broken markdown in docs (#306). (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « lib/src/rules/one_member_abstracts.dart ('k') | lib/src/rules/super_goes_last.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library linter.src.rules.slash_for_doc_comments; 5 library linter.src.rules.slash_for_doc_comments;
6 6
7 import 'package:analyzer/dart/ast/ast.dart'; 7 import 'package:analyzer/dart/ast/ast.dart';
8 import 'package:analyzer/dart/ast/visitor.dart'; 8 import 'package:analyzer/dart/ast/visitor.dart';
9 import 'package:linter/src/linter.dart'; 9 import 'package:linter/src/linter.dart';
10 10
11 const desc = r'Prefer to use /// for doc comments'; 11 const desc = r'Prefer to use /// for doc comments';
12 12
13 const details = r''' 13 const details = r'''
14 From the [style guide] (https://www.dartlang.org/articles/style-guide/): 14 From the [style guide](https://www.dartlang.org/articles/style-guide/):
15 15
16 **PREFER** to use `///` for doc comments. 16 **PREFER** to use `///` for doc comments.
17 17
18 Although Dart supports two syntaxes of doc comments (`///` and `/**`), we 18 Although Dart supports two syntaxes of doc comments (`///` and `/**`), we
19 prefer using `///` for doc comments. 19 prefer using `///` for doc comments.
20 20
21 **GOOD:** 21 **GOOD:**
22 ``` 22 ```
23 /// Parses a set of option strings. For each option: 23 /// Parses a set of option strings. For each option:
24 /// 24 ///
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 @override 111 @override
112 visitMethodDeclaration(MethodDeclaration node) { 112 visitMethodDeclaration(MethodDeclaration node) {
113 checkComment(node.documentationComment); 113 checkComment(node.documentationComment);
114 } 114 }
115 115
116 @override 116 @override
117 visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) { 117 visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) {
118 checkComment(node.documentationComment); 118 checkComment(node.documentationComment);
119 } 119 }
120 } 120 }
OLDNEW
« no previous file with comments | « lib/src/rules/one_member_abstracts.dart ('k') | lib/src/rules/super_goes_last.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698