Commit a8331c58 authored by Ian Jackson's avatar Ian Jackson
Browse files

maint/add_warnings: Tidy up, and add some commentary

This puts the actually-used lint list at the top.

No functional change.
parent eb49bc7f
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@ import os
import re
import shutil

PAT = re.compile(r'^#!\[(allow|deny|warn)')
# ---------- actual list of lints to apply (or disapply) ----------

WANT_LINTS = """
#![deny(missing_docs)]
@@ -36,7 +36,8 @@ WANT_LINTS = """
#![warn(clippy::unseparated_literal_suffix)]
#![deny(clippy::unwrap_used)]
"""
WANT_LINTS = [ "%s\n" % w for w in WANT_LINTS.split() ]

# ---------- some notes about lints we might use - NOT USED by any code here ----------

SOON="""
"""
@@ -57,6 +58,10 @@ DECIDED_NOT = """
#![deny(clippy::pub_enum_variant_names)]
"""

# ---------- code for autoprocessing Rust source files ----------

WANT_LINTS = [ "%s\n" % w for w in WANT_LINTS.split() ]
PAT = re.compile(r'^#!\[(allow|deny|warn)')

PAT2 = re.compile(r'^#!\[(allow|deny|warn)\(((?:clippy::)?)([^\)]*)')
def warning_key(w):