Commit f777afa
Don't warn about absolute home paths in build scripts
This change allows abs_home_path to skip checking in build scripts, avoiding false positives when building packages. Build scripts are detected by checking if the crate name is "build_script_build".
Update list of architectures
Refactor build script detection and add test
Updated the logic for detecting build scripts in the `check_expr` method to improve clarity. Added a test to verify that the lint does not trigger in build scripts, ensuring the functionality is documented and tested.
Enhance documentation for absolute home path lint
Added notes in the README and code comments to clarify that the lint does not warn in build scripts (`build.rs`). Updated the test function name to better reflect its purpose and documented the behavior of the build script detection functionality.
Refine test for build script detection
Added an allowance for Clippy lint in the test function to prevent warnings during compilation.
Skip abs_home_path lint in build scripts
The abs_home_path lint checks for absolute paths into the user's home directory,
which might not exist in production. However, build scripts often need to
reference absolute paths, so skip the lint in build.rs files.1 parent 5aad720 commit f777afa
2 files changed
+20
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
16 | 20 | | |
17 | 21 | | |
18 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
35 | 39 | | |
36 | 40 | | |
37 | 41 | | |
| |||
67 | 71 | | |
68 | 72 | | |
69 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
70 | 85 | | |
71 | 86 | | |
72 | 87 | | |
| |||
0 commit comments