Add initial workspace

Signed-off-by: Marcel Müller <neikos@neikos.email>
This commit is contained in:
Marcel Müller 2025-03-04 11:40:38 +01:00
parent 0f2564ead0
commit a894c4c413
11 changed files with 1758 additions and 0 deletions

5
.gitignore vendored
View file

@ -1 +1,6 @@
.direnv/
# Added by cargo
/target

1643
Cargo.lock generated Normal file

File diff suppressed because it is too large Load diff

3
Cargo.toml Normal file
View file

@ -0,0 +1,3 @@
[workspace]
members = [ "lints/*" ]

View 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
View file

@ -0,0 +1 @@
/target

View 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

View 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
```

View file

@ -0,0 +1,3 @@
[toolchain]
channel = "nightly-2025-01-09"
components = ["llvm-tools-preview", "rustc-dev"]

View 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");
}

View file

@ -0,0 +1 @@
fn main() {}

View file