Skip to content
This repository has been archived by the owner on Jul 8, 2023. It is now read-only.

PatchMixolydic/patchmixolint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Patchmixolint

A personal set of lints for the Dylint utility. These are incredibly opinionated and will probably produce warnings that you don't care about (ex. linting on a missing lint level declaration for meta_variable_misuse in a crate that will never use macros).

The code for the lints themselves might not be that great. Please tread with caution!

Currently targets rustc 1.59.0-nightly (0b6f079e4 2021-12-07).

Setting Patchmixolint lint levels

You can modify Patchmixolint's lint levels in about the way you'd expect.

  • You can specify them in DYLINT_RUSTFLAGS:
    $ DYLINT_RUSTFLAGS="-Apatchmixolint::missing_lints" cargo dylint $TARGET_DIR/[email protected]
    
  • You can declare them in main.rs/lib.rs. Since Patchmixolint registers its lints as tool lints, you must use #![feature(register_tool)] for this to work. This shouldn't affect normal operation.
#![allow(patchmixolint::macro_rules_over_macro)] // << lint level changed
#![feature(decl_macro, register_tool)] // << register_tool feature must be enabled
#![register_tool(patchmixolint)] // << register `patchmixolint`

macro_rules! dont_change_me {
  () => {};
}

About

Set of personal Dylint lints

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published