Add initial workspace
Signed-off-by: Marcel Müller <neikos@neikos.email>
This commit is contained in:
parent
0f2564ead0
commit
a894c4c413
11 changed files with 1758 additions and 0 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
|
@ -1 +1,6 @@
|
||||||
.direnv/
|
.direnv/
|
||||||
|
|
||||||
|
|
||||||
|
# Added by cargo
|
||||||
|
|
||||||
|
/target
|
||||||
|
|
|
||||||
1643
Cargo.lock
generated
Normal file
1643
Cargo.lock
generated
Normal file
File diff suppressed because it is too large
Load diff
3
Cargo.toml
Normal file
3
Cargo.toml
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
[workspace]
|
||||||
|
|
||||||
|
members = [ "lints/*" ]
|
||||||
6
lints/dashmap-ref/.cargo/config.toml
Normal file
6
lints/dashmap-ref/.cargo/config.toml
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
[target.'cfg(all())']
|
||||||
|
rustflags = ["-C", "linker=dylint-link"]
|
||||||
|
|
||||||
|
# For Rust versions 1.74.0 and onward, the following alternative can be used
|
||||||
|
# (see https://github.com/rust-lang/cargo/pull/12535):
|
||||||
|
# linker = "dylint-link"
|
||||||
1
lints/dashmap-ref/.gitignore
vendored
Normal file
1
lints/dashmap-ref/.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
/target
|
||||||
18
lints/dashmap-ref/Cargo.toml
Normal file
18
lints/dashmap-ref/Cargo.toml
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
[package]
|
||||||
|
name = "dashmap_ref"
|
||||||
|
version = "0.1.0"
|
||||||
|
edition = "2021"
|
||||||
|
publish = false
|
||||||
|
|
||||||
|
[lib]
|
||||||
|
crate-type = ["cdylib"]
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
clippy_utils = { git = "https://github.com/rust-lang/rust-clippy", rev = "19e305bb57a7595f2a8d81f521c0dd8bf854e739" }
|
||||||
|
dylint_linting = "4.0.0"
|
||||||
|
|
||||||
|
[dev-dependencies]
|
||||||
|
dylint_testing = "4.0.0"
|
||||||
|
|
||||||
|
[package.metadata.rust-analyzer]
|
||||||
|
rustc_private = true
|
||||||
21
lints/dashmap-ref/README.md
Normal file
21
lints/dashmap-ref/README.md
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
# template
|
||||||
|
|
||||||
|
### What it does
|
||||||
|
|
||||||
|
### Why is this bad?
|
||||||
|
|
||||||
|
### Known problems
|
||||||
|
|
||||||
|
Remove if none.
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```rust
|
||||||
|
// example code where a warning is issued
|
||||||
|
```
|
||||||
|
|
||||||
|
Use instead:
|
||||||
|
|
||||||
|
```rust
|
||||||
|
// example code that does not raise a warning
|
||||||
|
```
|
||||||
3
lints/dashmap-ref/rust-toolchain
Normal file
3
lints/dashmap-ref/rust-toolchain
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
[toolchain]
|
||||||
|
channel = "nightly-2025-01-09"
|
||||||
|
components = ["llvm-tools-preview", "rustc-dev"]
|
||||||
57
lints/dashmap-ref/src/lib.rs
Normal file
57
lints/dashmap-ref/src/lib.rs
Normal file
|
|
@ -0,0 +1,57 @@
|
||||||
|
#![feature(rustc_private)]
|
||||||
|
#![feature(let_chains)]
|
||||||
|
#![warn(unused_extern_crates)]
|
||||||
|
|
||||||
|
extern crate rustc_arena;
|
||||||
|
extern crate rustc_ast;
|
||||||
|
extern crate rustc_ast_pretty;
|
||||||
|
extern crate rustc_data_structures;
|
||||||
|
extern crate rustc_errors;
|
||||||
|
extern crate rustc_hir;
|
||||||
|
extern crate rustc_hir_pretty;
|
||||||
|
extern crate rustc_index;
|
||||||
|
extern crate rustc_infer;
|
||||||
|
extern crate rustc_lexer;
|
||||||
|
extern crate rustc_middle;
|
||||||
|
extern crate rustc_mir_dataflow;
|
||||||
|
extern crate rustc_parse;
|
||||||
|
extern crate rustc_span;
|
||||||
|
extern crate rustc_target;
|
||||||
|
extern crate rustc_trait_selection;
|
||||||
|
|
||||||
|
use rustc_lint::LateLintPass;
|
||||||
|
|
||||||
|
dylint_linting::declare_late_lint! {
|
||||||
|
/// ### What it does
|
||||||
|
///
|
||||||
|
/// ### Why is this bad?
|
||||||
|
///
|
||||||
|
/// ### Known problems
|
||||||
|
///
|
||||||
|
/// Remove if none.
|
||||||
|
///
|
||||||
|
/// ### Example
|
||||||
|
///
|
||||||
|
/// ```rust
|
||||||
|
/// // example code where a warning is issued
|
||||||
|
/// ```
|
||||||
|
///
|
||||||
|
/// Use instead:
|
||||||
|
///
|
||||||
|
/// ```rust
|
||||||
|
/// // example code that does not raise a warning
|
||||||
|
/// ```
|
||||||
|
pub DASHMAP_REF,
|
||||||
|
Warn,
|
||||||
|
"description goes here"
|
||||||
|
}
|
||||||
|
|
||||||
|
impl<'tcx> LateLintPass<'tcx> for DashmapRef {
|
||||||
|
// A list of things you might check can be found here:
|
||||||
|
// https://doc.rust-lang.org/stable/nightly-rustc/rustc_lint/trait.LateLintPass.html
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn ui() {
|
||||||
|
dylint_testing::ui_test(env!("CARGO_PKG_NAME"), "ui");
|
||||||
|
}
|
||||||
1
lints/dashmap-ref/ui/main.rs
Normal file
1
lints/dashmap-ref/ui/main.rs
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
fn main() {}
|
||||||
0
lints/dashmap-ref/ui/main.stderr
Normal file
0
lints/dashmap-ref/ui/main.stderr
Normal file
Loading…
Add table
Add a link
Reference in a new issue