lints: Scheme for allowing us to name nightly lints

As per
  https://gitlab.torproject.org/tpo/core/arti/-/issues/501
This commit is contained in:
Ian Jackson 2022-06-23 19:14:11 +01:00
parent e59fa141b7
commit 28dea73523
1 changed files with 3 additions and 1 deletions

View File

@ -10,6 +10,8 @@ import subprocess
# ---------- actual list of lints to apply (or disapply) ---------- # ---------- actual list of lints to apply (or disapply) ----------
WANT_LINTS = """ WANT_LINTS = """
#![cfg_attr(not(ci_arti_stable), allow(renamed_and_removed_lints))]
#![cfg_attr(not(ci_arti_nightly), allow(unknown_lints))]
#![deny(missing_docs)] #![deny(missing_docs)]
#![warn(noop_method_call)] #![warn(noop_method_call)]
#![deny(unreachable_pub)] #![deny(unreachable_pub)]
@ -65,7 +67,7 @@ DECIDED_NOT = """
# ---------- code for autoprocessing Rust source files ---------- # ---------- code for autoprocessing Rust source files ----------
PAT = re.compile(r'^#!\[(allow|deny|warn)') PAT = re.compile(r'^#!\[(?:cfg_attr\(.*)?(allow|deny|warn)')
opts = None opts = None
deferred_errors = [] deferred_errors = []