Skip to content

Commit 0977ac5

Browse files
augustin-vsmoelius
authored andcommitted
feat: happy ci
1 parent 50a0c05 commit 0977ac5

File tree

5 files changed

+36
-3
lines changed

5 files changed

+36
-3
lines changed

examples/supplementary/Cargo.lock

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/supplementary/nonexistent_path_in_comment/README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,40 @@
11
# nonexistent_path_in_comment
22

33
### What it does
4+
45
This lint checks code comments, including both line comments (using `//`) and block comments
56
(`/*...*/`) for file path references. It then validates that the referenced files exist either
67
relative to the source file's directory or relative to the workspace root. When a file path
78
reference does not point to an existing file, the lint emits a warning.
89

910
### Why is this bad?
11+
1012
References to nonexistent files in comments can be misleading:
13+
1114
- They clutter the code with outdated or inaccurate references.
1215
- They may cause confusion among developers who are trying to trace implementation details
13-
or documentation.
16+
or documentation.
1417

1518
### Known problems
19+
1620
- This example:
21+
1722
```rust
1823
// dylint/dylint/build.rs (it exists)
1924
```
25+
2026
would get flagged here because the workspace root is `supplementary`
2127
it did exist, as this lint doesn't check for project root.
2228

2329
### Example
30+
2431
```
2532
// See ../nonexistent/path/file.rs for implementation details
2633
fn main() {}
2734
```
35+
2836
Use instead:
37+
2938
```
3039
// See ../actual/path/file.rs for implementation details
3140
fn main() {}

examples/supplementary/nonexistent_path_in_comment/src/lib.rs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,31 +13,40 @@ use rustc_span::{BytePos, FileName, Span, SyntaxContext};
1313

1414
dylint_linting::declare_late_lint! {
1515
/// ### What it does
16+
///
1617
/// This lint checks code comments, including both line comments (using `//`) and block comments
1718
/// (`/*...*/`) for file path references. It then validates that the referenced files exist either
1819
/// relative to the source file's directory or relative to the workspace root. When a file path
1920
/// reference does not point to an existing file, the lint emits a warning.
2021
///
2122
/// ### Why is this bad?
23+
///
2224
/// References to nonexistent files in comments can be misleading:
25+
///
2326
/// - They clutter the code with outdated or inaccurate references.
2427
/// - They may cause confusion among developers who are trying to trace implementation details
25-
/// or documentation.
28+
/// or documentation.
2629
///
2730
/// ### Known problems
31+
///
2832
/// - This example:
33+
///
2934
/// ```rust
3035
/// // dylint/dylint/build.rs (it exists)
3136
/// ```
37+
///
3238
/// would get flagged here because the workspace root is `supplementary`
3339
/// it did exist, as this lint doesn't check for project root.
3440
///
3541
/// ### Example
42+
///
3643
/// ```
3744
/// // See ../nonexistent/path/file.rs for implementation details
3845
/// fn main() {}
3946
/// ```
47+
///
4048
/// Use instead:
49+
///
4150
/// ```
4251
/// // See ../actual/path/file.rs for implementation details
4352
/// fn main() {}

examples/testing/clippy/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
# clippy
2-

internal/template/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,17 @@
55
### Why is this bad?
66

77
### Known problems
8+
89
Remove if none.
910

1011
### Example
12+
1113
```rust
1214
// example code where a warning is issued
1315
```
16+
1417
Use instead:
18+
1519
```rust
1620
// example code that does not raise a warning
1721
```

0 commit comments

Comments
 (0)