Urgau
1e4857a4d9
Allow lint config to have extra custom configs
...
And report the unused manifest key warning for every key that we do not
use, which is currently every of them.
2024-05-16 17:03:42 +02:00
Scott Schafer
6f81cff16c
refactor: Move lint specific tests to lints/mod.rs
2024-05-08 15:18:49 -06:00
Scott Schafer
6c2334613c
fix(lints): Prevent inheritance from bring exposed for published packages
2024-05-02 15:37:53 -06:00
Scott Schafer
6c08e58de9
feat(cargo-lints): Add a lint for unknown_lints
2024-05-01 10:45:09 -06:00
Scott Schafer
9159ebb083
fix(cargo-lints): Don't rewrite dash to underscore in lint name
2024-05-01 10:41:35 -06:00
bors
6fc9e4b9a1
Auto merge of #13805 - Muscraft:im-a-teapot-lint-unstable, r=epage
...
Error when unstable lints are specified but not enabled
In [#13797 , it was noted that](https://github.com/rust-lang/cargo/pull/13797#discussion_r1578162057 ) the `im-a-teapot` lint should always be unstable. This PR makes it so that `im-a-teapot` is unstable, and it is an error to specify it without the `test-dummy-unstable` cargo feature.
It does this by adding a `feature-gate` field to `Lint` and `LintGroup` that optionally
puts the lint/lint group behind a feature. The `feature-gate` is then checked during the new `analyze_cargo_lints_table` step that runs across all lints (and groups) specified in `[lints.cargo]` or `[workspace.lints]` if the package is inheriting its lints from a workspace.
The error looks like the following:
No inherit

Inherited

2024-05-01 13:59:51 +00:00
Scott Schafer
712946c518
fix(lints): Mark the test_dummy_unstable lint group as unstable
2024-04-30 20:35:50 -06:00
Scott Schafer
f007527291
fix(lints): Mark the im_a_teapot lint as unstable
2024-04-30 20:34:17 -06:00
Scott Schafer
2df02f07d8
fix(lints): Feature-gate the im_a_teapot lint
2024-04-30 20:31:12 -06:00
Scott Schafer
72f265b22d
refactor: Warn not Error on unsupported lint tool
2024-04-30 10:46:07 -06:00
Scott Schafer
cbb1cd2382
test(cargo-lints): Add a test to ensure cap-lints works
2024-04-29 10:36:29 -06:00
Scott Schafer
cf197fc499
fix(cargo-lints): Don't always inherit workspace lints
2024-04-26 16:37:41 -06:00
Scott Schafer
c3b104e11e
test(cargo-lints): Show workspace lints always inherited
2024-04-26 16:26:36 -06:00
Scott Schafer
dfc9bd2068
feat(lints): Add where lint level was set
2024-04-24 14:57:36 -06:00
Scott Schafer
2655b069c6
test(cargo-lints): Add a test for workspace inheritance
2024-04-24 14:48:48 -06:00
Scott Schafer
11d6013c1d
fix(cargo-lints): Respect Forbid lint level
2024-04-20 20:12:47 -06:00
Scott Schafer
2d40a475d9
feat: Add unstable im_a_teapot lint
2024-04-20 19:33:13 -06:00
Scott Schafer
8d676dde40
feat(implicit_features): Show why lint was emiited
2024-04-19 11:41:28 -06:00
Scott Schafer
495f94e80e
refactor(implicit_features): Use lint description for title
2024-04-19 10:58:55 -06:00
Ed Page
1876326b6b
feat(resolve): Tell the user the style of resovle done
...
This is to help with #9930
Example changes:
```diff
-[LOCKING] 4 packages
+[LOCKING] 4 packages to latest version
-[LOCKING] 2 packages
+[LOCKING] 2 packages to latest Rust 1.60.0 compatible versions
-[LOCKING] 2 packages
+[LOCKING] 2 packages to earliest versions
```
Benefits
- The package count is of "added" packages and this makes that more
logically clear
- This gives users transparency into what is happening, especially with
- what rust-version is use
- the transition to this feature in the new edition
- whether the planned config was applied or not (as I don't want it to
require an MSRV bump)
- Will make it easier in tests to show what changed
- Provides more motiviation to show this message in `cargo update` and
`cargo install` (that will be explored in a follow up PR)
This does come at the cost of more verbose output but hopefully not too
verbose. This is why I left off other factors, like avoid-dev-deps.
2024-04-13 20:39:59 -05:00
Scott Schafer
0a400d5ef0
refactor: Make lint names snake_case
2024-03-25 12:44:12 -06:00
Scott Schafer
abf0953292
feat: Add -Zcargo-lints
2024-03-23 10:24:50 -06:00
Scott Schafer
31c3052524
refactor(testsuite): Rename lints to lints_table
2024-03-22 11:33:58 -06:00